A landscape. More...
#include <landscape.h>
Inherits NLMISC::CRefCount.
Classes | |
| struct | CBezierPatchZ |
| A Bezier patch of One value only. More... | |
| struct | CHeightField |
| struct | CPatchIdentEx |
| struct | CTileInfo |
Public Member Functions | |
| CLandscape () | |
| Constructor. | |
| virtual | ~CLandscape () |
| Destructor. clear(). | |
| void | lockBuffers () |
| void | unlockBuffers (bool force=false) |
| bool | isLocked () const |
| CShadowPolyReceiver & | getShadowPolyReceiver () |
| virtual void | setZFunc (CMaterial::ZFunc val) |
Init/Build. | |
| void | init () |
| init the landscape VBuffers, texture cache etc... | |
| bool | addZone (const CZone &newZone) |
| Add a zone which should be builded (or loaded), but not compiled. | |
| bool | removeZone (uint16 zoneId) |
| remove a zone by its unique Id. | |
| void | clear () |
| Disconnect, and Delete all zones. | |
| void | checkBinds () throw (EBadBind) |
| Verify the binding of patchs of all zones. throw EBadBind if error. | |
| void | checkBinds (uint16 zoneId) throw (EBadBind) |
| Verify the binding of patchs of one zone. throw EBadBind if error. nop if zone not loaded. | |
| bool | initTileBanks () |
| Build tileBank. | |
Landscape Parameters. | |
| void | setTileNear (float tileNear) |
| Set tile near distance. Default 50.f. maximized to length of Far alpha transition). | |
| float | getTileNear () const |
| Get tile near distance. | |
| void | setThreshold (float thre) |
| Set threshold for subdivsion quality. The lower is threshold, the more the landscape is subdivided. Default: 0.001. | |
| float | getThreshold () const |
| Get threshold. | |
| void | setRefineMode (bool enabled) |
| bool | getRefineMode () const |
| void | setTileMaxSubdivision (uint tileDiv) |
| Set Maximum Tile subdivision. Valid values must be in [0..4] (assert). Default is 0 (for now :) ). | |
| uint | getTileMaxSubdivision () |
| Get Maximum Tile subdivision. | |
| void | setNoiseMode (bool enabled) |
| Enable the noise or not. NB: only new tesselation computed is modified, so you should call it only at init time. | |
| bool | getNoiseMode () const |
| void | invalidateAllTiles () |
Render methods. | |
| void | setDriver (IDriver *drv) |
| A driver is needed for VB allocation. | |
| void | clip (const CVector &refineCenter, const std::vector< CPlane > &pyramid) |
| Clip the landscape according to frustum. | |
| void | refine (const CVector &refineCenter) |
| Refine/Geomorph the tesselation of the landscape. | |
| void | render (const CVector &refineCenter, const CVector &frontVector, const CPlane pyramid[NL3D_TESSBLOCK_NUM_CLIP_PLANE], bool doTileAddPass=false) |
| Render the landscape. | |
| void | refineAll (const CVector &refineCenter) |
| Refine/Geomorph ALL the tesselation of the landscape, from the view point refineCenter. Even if !RefineMode. | |
| void | excludePatchFromRefineAll (sint zoneId, uint patch, bool exclude) |
| This is especially for Pacs. exlude a patch to be refineAll()ed. | |
| void | averageTesselationVertices () |
| This is especially for Pacs. | |
| void | profileRender () |
| const CVector & | getOldRefineCenter () const |
Collision methods. | |
| void | buildCollideFaces (const CAABBoxExt &bbox, std::vector< CTriangle > &faces, bool faceSplit) |
| Build the set of faces of landscape, which are IN a bbox. | |
| void | buildCollideFaces (sint zoneId, sint patch, std::vector< CTriangle > &faces) |
| Build the set of faces of landscape, from a certain patch. | |
| void | buildTrianglesInBBox (const CAABBox &bbox, std::vector< CTrianglePatch > &triangles, uint8 tileTessLevel) |
| method relatively identical than buildCollideFaces(bbox. | |
| void | buildPatchBlocksInBBox (const CAABBox &bbox, std::vector< CPatchBlockIdent > &paBlockIds) |
| Same as buildTrianglesInBBox(), but fill blockId instead of raw triangles. | |
| void | fillPatchQuadBlock (CPatchQuadBlock &quadBlock) const |
| Fill a CPatchQuadBlock, from its required PatchId. | |
| CVector | getTesselatedPos (const CPatchIdent &patchId, const CUV &uv) const |
| From the current tesselation of a patch of landscape, and a UV in this patch, return tesselated position. | |
| void | getTessellationLeaves (std::vector< const CTessFace * > &leaves) const |
| From the current tesselation of landscape, build the list of leaves faces. | |
| float | getCameraCollision (const CVector &start, const CVector &end, float radius, bool cone) |
| Get the camera 3rd person collision against the TileFaces (ie only under approx 50 m) return a [0,1] value. | |
| float | getRayCollision (const CVector &start, const CVector &end) |
| Get the ray collision against the TileFaces (ie only under approx 50 m) return a [0,1] value. | |
Tile mgt. | |
| void | flushTiles (IDriver *drv, uint32 tileStart, uint32 nbTiles) |
| Force a range of tiles to be loaded in the driver... | |
| void | releaseTiles (uint32 tileStart, uint32 nbTiles) |
| Force a range of tiles to be unloaded. | |
| void | releaseAllTiles () |
| Delete All tiles. All zones must be deleted before (nlassert). | |
| NLMISC::CSmartPtr< ITexture > | getTileTexture (uint16 tileId, CTile::TBitmap bitmapType, CVector &uvScaleBias) |
| Return the texture for a tile Id. Useful for Tile edition. | |
| CTileElement * | getTileElement (const CPatchIdent &patchId, const CUV &uv) |
| Return the tile element for a patch at specific UV. Useful for getting surface data. Return NULL if not found. | |
Lighting. | |
| void | setupStaticLight (const CRGBA &diffuse, const CRGBA &ambiant, float multiply) |
| Setup the light color use for static illumination. | |
| const CRGBA * | getStaticLight () const |
| Get the light color by shading table. | |
| void | setPointLightDiffuseMaterial (CRGBA diffuse) |
| Setup the equivalent material diffuse component used for both Static and Dynamic PointLights. | |
| CRGBA | getPointLightDiffuseMaterial () const |
| void | enableAutomaticLighting (bool enable) |
| Enable automatic near lightmap computing. | |
| void | setupAutomaticLightDir (const CVector &lightDir) |
| For automatic near lightmap computing (if enabled): setup the lightdir. | |
| bool | getAutomaticLighting () const |
| return true if AutomaticLighting is enabled. | |
| const CVector & | getAutomaticLightDir () const |
| return the light direction setuped in enableAutomaticLighting(). | |
| void | removeAllPointLights () |
| This method remove all PointLights in all Zones, and hence reset TileLightInfluences. | |
| void | setPointLightFactor (const CScene &scene) |
| update the Light factor for all pointLights in All zones, according to scene LightGroups and AnimatedLights. | |
| void | initAnimatedLightIndex (const CScene &scene) |
HeightField DeltaZ. | |
| CVector | getHeightFieldDeltaZ (float x, float y) const |
| return the HeightField DeltaZ for the 2D position. (0,0,dZ) is returned. | |
| void | setHeightField (const CHeightMap &hf) |
| set the HeightField data. | |
Lightmap get interface. | |
| uint8 | getLumel (const CPatchIdent &patchId, const CUV &uv) const |
| Get the lumel under the position. return 255 if invalid patchId. | |
| void | appendTileLightInfluences (const CPatchIdent &patchId, const CUV &uv, std::vector< CPointLightInfluence > &pointLightList) const |
| Append lights under the position to pointLightList. Do nothing if invalid patchId. | |
Dynamic Lighting management | |
| void | computeDynamicLighting (const std::vector< CPointLight * > &pls) |
| Compute dynamic lightmaps. | |
| uint | getDynamicLightingMemoryLoad () const |
| For bench only. | |
| void | setDynamicLightingMaxAttEnd (float maxAttEnd) |
| Set PointLight Max Attenuation End landscape support. | |
| float | getDynamicLightingMaxAttEnd () const |
| see setDynamicLightingMaxAttEnd() | |
| void | setDLMGlobalVegetableColor (CRGBA gvc) |
| For Vegetable Dynamic ligthing only: this is an approximate color of all vegetables. | |
| CRGBA | getDLMGlobalVegetableColor () const |
| see setDLMGlobalVegetableColor() | |
Tile added/removed callback | |
| void | addTileCallback (ULandscapeTileCallback *cb) |
| void | removeTileCallback (ULandscapeTileCallback *cb) |
| bool | isTileCallback (ULandscapeTileCallback *cb) const |
| const std::vector < ULandscapeTileCallback * > & | getTileCallbacks () const |
Public Attributes | |
| CTileBank | TileBank |
| CTileFarBank | TileFarBank |
| class CLandscapeModel * | OwnerModel |
Private Types | |
| typedef NLMISC::CRefPtr< ITexture > | RPTexture |
| typedef std::map< std::string, RPTexture > | TTileTextureMap |
| typedef TTileTextureMap::iterator | ItTileTextureMap |
| typedef std::set< CPatchRdrPass > | TTileRdrPassSet |
| typedef TTileRdrPassSet::iterator | ItTileRdrPassSet |
| typedef NLMISC::CSmartPtr < CPatchRdrPass > | TSPRenderPass |
| typedef std::vector < TSPRenderPass >::iterator | ItSPRenderPassVector |
Private Member Functions | |
| CPatchRdrPass * | getFarRenderPass (CPatch *pPatch, uint farIndex, float &far1UScale, float &far1VScale, float &far1UBias, float &far1VBias, bool &bRot) |
| void | freeFarRenderPass (CPatch *pPatch, CPatchRdrPass *pass, uint farIndex) |
| CPatchRdrPass * | getTileRenderPass (uint16 tileId, bool additiveRdrPass) |
| void | getTileUvScaleBiasRot (uint16 tileId, CTile::TBitmap bitmapType, CVector &uvScaleBias, uint8 &rotAlpha) |
| void | resetRenderFarAndDeleteVBFV () |
| void | forceMergeAtTileLevel () |
| For changing TileMaxSubdivision. force tesselation to be under tile. | |
| void | updateGlobalsAndLockBuffers (const CVector &refineCenter) |
| void | updateTessBlocksFaceVector () |
| void | clearFarRenderPass (CPatchRdrPass *pass) |
| bool | eraseTileFarIfNotGood (uint tileNumber, uint sizeOrder0, uint sizeOrder1, uint sizeOrder2) |
| void | loadTile (uint16 tileId) |
| void | releaseTile (uint16 tileId) |
| ITexture * | findTileTexture (const std::string &textName, bool clamp) |
| CPatchRdrPass * | findTileRdrPass (const CPatchRdrPass &pass) |
| void | checkZoneBinds (CZone &curZone, EBadBind &bindError) |
Private Attributes | |
| std::vector < ULandscapeTileCallback * > | _TileCallbacks |
| TZoneMap | Zones |
| float | _TileDistNear |
| float | _Threshold |
| bool | _RefineMode |
| float | _FarTransition |
| uint | _TileMaxSubdivision |
| float | _VPThresholdChange |
| TTileTextureMap | TileTextureMap |
| TTileRdrPassSet | TileRdrPassSet |
| std::vector< CTileInfo * > | TileInfos |
| std::vector< TSPRenderPass > | _TextureNears |
| uint | _NFreeLightMaps |
| CMaterial | TileMaterial |
| CMaterial | FarMaterial |
| std::vector< TSPRenderPass > | _TextureFars |
| bool | _FarInitialized |
| CRGBA | _LightValue [256] |
| bool | _AutomaticLighting |
| CVector | _AutomaticLightDir |
| CHeightField | _HeightField |
Texture Profiling | |
| NLMISC::CSmartPtr < ITexture::CTextureCategory > | _TextureTileCategory |
| NLMISC::CSmartPtr < ITexture::CTextureCategory > | _TextureFarCategory |
| NLMISC::CSmartPtr < ITexture::CTextureCategory > | _TextureNearCategory |
Friends | |
| class | CTessFace |
| class | CPatch |
| class | CZone |
Allocators. | |
|
| |
| CBlockMemory< CTessFace > | TessFaceAllocator |
| CBlockMemory< CTessVertex > | TessVertexAllocator |
| CBlockMemory< CTessNearVertex > | TessNearVertexAllocator |
| CBlockMemory< CTessFarVertex > | TessFarVertexAllocator |
| CBlockMemory< CTileMaterial > | TileMaterialAllocator |
| CBlockMemory< CTileFace > | TileFaceAllocator |
| CLandscapeFaceVectorManager | _FaceVectorManager |
| CTessBlock | _TessBlockModificationRoot |
| CTessFace * | newTessFace () |
| CTessVertex * | newTessVertex () |
| CTessNearVertex * | newTessNearVertex () |
| CTessFarVertex * | newTessFarVertex () |
| CTileMaterial * | newTileMaterial () |
| CTileFace * | newTileFace () |
| void | deleteTessFace (CTessFace *f) |
| void | deleteTessVertex (CTessVertex *v) |
| void | deleteTessNearVertex (CTessNearVertex *v) |
| void | deleteTessFarVertex (CTessFarVertex *v) |
| void | deleteTileMaterial (CTileMaterial *tm) |
| void | deleteTileFace (CTileFace *tf) |
VertexBuffer mgt. | |
|
| |
| CRefPtr< IDriver > | _Driver |
| CLandscapeVBAllocator | _Far0VB |
| CLandscapeVBAllocator | _Far1VB |
| CLandscapeVBAllocator | _TileVB |
| uint | _LockCount |
| bool | _VertexShaderOk |
| bool | _RenderMustRefillVB |
| uint | getTileLightMap (CRGBA map[NL_TILE_LIGHTMAP_SIZE *NL_TILE_LIGHTMAP_SIZE], CPatchRdrPass *&lightmapRdrPass) |
| void | getTileLightMapUvInfo (uint tileLightMapId, CVector &uvScaleBias) |
| void | releaseTileLightMap (uint tileLightMapId) |
| void | refillTileLightMap (uint tileLightMapId, CRGBA map[NL_TILE_LIGHTMAP_SIZE *NL_TILE_LIGHTMAP_SIZE]) |
Visual Collision system. | |
|
| |
| CQuadGrid< CPatchIdentEx > | _PatchQuadGrid |
| The QuadGrid of patch. | |
| static const uint | _PatchQuadGridSize = 128 |
| static const float | _PatchQuadGridEltSize = 16 |
| void | addTrianglesInBBox (const CPatchIdentEx &paIdEx, const CAABBox &bbox, std::vector< CTrianglePatch > &triangles, uint8 tileTessLevel) const |
| This method search only on the given patch. | |
| void | addPatchBlocksInBBox (const CPatchIdentEx &paIdEx, const CAABBox &bbox, std::vector< CPatchBlockIdent > &paBlockIds) |
| private version of buildPatchBlocksInBBox, searching only for one patch. | |
|
| |
| bool | _NoiseEnabled |
| Noise Geometry. | |
| CTessFacePriorityList | _SplitPriorityList |
| Priority list. | |
| CTessFacePriorityList | _MergePriorityList |
| The priority list of faces which may need to merge. | |
| CVector | _OldRefineCenter |
| OldRefineCenter setuped in prec refine(). | |
| bool | _MustRefineAllAtNextRefine |
| CTessFacePListNode | _RootNewLeaves |
| newTessFace() append the face to _RootNewLeaves. | |
| CVegetableManager * | _VegetableManager |
| Micro-Vegetation. | |
| bool | _VegetableManagerEnabled |
| Tells if the Vegetable Managemnt is enabled. | |
| bool | _DriverOkForVegetable |
| Tells if the current driver support vegetable. | |
| CTessList < CLandscapeVegetableBlock > | _VegetableBlockList |
| List of VegetableBlock, to be tested for creation each frame. | |
| void | createVegetableBlendLayersModels (CScene *scene) |
| Micro-Vegetation. | |
| void | setVegetableTime (double time) |
| set the vegetable manager Time (in seconds) NB: MOT stuff (called by CLandscapeModel), don't use it. | |
| void | setVegetableUpdateLightingTime (double time) |
| set the vegetable manager System Time (in seconds) for update lighting NB: MOT stuff (called by CLandscapeModel), don't use it. | |
| void | enableVegetable (bool enable) |
| enable the vegetable management in landscape. | |
| bool | isVegetableActive () const |
| return if the vegetable management is actually activated: actually return _VerexShaderOk && _VegetableEnabled. | |
| void | loadVegetableTexture (const std::string &textureFileName) |
| load a texture for the vegetable, lookup in CPath | |
| void | setupVegetableLighting (const CRGBA &ambient, const CRGBA &diffuse, const CVector &directionalLight) |
| setup lighting ambient and diffuse for vegetable. | |
| void | setVegetableWind (const CVector &windDir, float windFreq, float windPower, float windBendMin) |
| set the vegetable Wind for animation. | |
| uint | getNumVegetableFaceRendered () const |
| return the number of faces displayed in Driver with the vegetable manager. | |
| void | setVegetableUpdateLightingFrequency (float freq) |
| set the frequency of Vegetable lighting update. | |
| void | setupColorsFromTileFlags (const NLMISC::CRGBA colors[4]) |
| Debug purpose only : setup the colors of the patch of all the currently loaded zones so that it shows which tiles have vegetable disabled, or are above, below water. | |
| void | setVegetableDensity (float density) |
| Set a density ratio [0, 1] to possibly reduce the amount of micro vegetable drawn. | |
| float | getVegetableDensity () const |
| Get the density ratio [0, 1] of micro vegetable drawn. | |
| const CTileVegetableDesc & | getTileVegetableDesc (uint16 tileId) |
| For a given tile Id, look into tileSet, and get the tile vegetable descriptor. | |
Precision ZBuffer mgt. | |
|
| |
| CVector | _PZBModelPosition |
| void | setPZBModelPosition (const CVector &pos) |
| Set the ModelPosition (for Precision ZBuffer purpose). | |
| const CVector & | getPZBModelPosition () const |
UpdateLighting management | |
|
| |
| double | _ULPrecTime |
| bool | _ULPrecTimeInit |
| double | _ULTime |
| float | _ULFrequency |
| Frequency of update. | |
| sint | _ULTotalFarPixels |
| Far UpdateLighting. | |
| float | _ULFarPixelsToUpdate |
| Current number of far pixels to update. If negative, I have some advance. | |
| CTextureFar * | _ULRootTextureFar |
| The current TextureFar rendered. | |
| sint | _ULTotalNearPixels |
| Near UpdateLighting. | |
| float | _ULNearPixelsToUpdate |
| Current number of near pixels to update. If negative, I have some advance. | |
| CPatch * | _ULRootNearPatch |
| The current patch rendered. | |
| uint | _ULNearCurrentTessBlockId |
| Current tessBlock id in the current patch processed. | |
| void | updateLighting (double time) |
| update the lighting of patch, within a certain amount of time. | |
| void | setUpdateLightingFrequency (float freq) |
| set the frequency of lighting update. | |
| void | updateLightingAll () |
| update the lighting of ALL patch (slow method). | |
| void | linkPatchToNearUL (CPatch *patch) |
| Used by Patch to link/unlink from _ULRootNearPatch. | |
| void | unlinkPatchFromNearUL (CPatch *patch) |
| void | updateLightingTextureFar (float ratio) |
| Update All Far texture, given a ratio along total lumels. | |
| void | updateLightingTextureNear (float ratio) |
| Update All Near texture, given a ratio along total lumels. | |
DynamicLighting management | |
|
| |
| NLMISC::CSmartPtr< ITexture > | _TextureDLM |
| The dynamic lightmap Texture. | |
| CPatchDLMContextList * | _PatchDLMContextList |
| List of DLM Context. | |
| float | _DLMMaxAttEnd |
| Max AttEnd. | |
| CRGBA | _DLMGlobalVegetableColor |
| an approximate value used to simulate diffuse material of vegetables | |
| CRGBA | _PointLightDiffuseMaterial |
| The diffuse material of landscape, used for StaticPointLights and DynamicPointLights. | |
| CTextureDLM * | getTextureDLM () const |
| for CPatch. | |
| CPatchDLMContextList * | getPatchDLMContextList () const |
| for CPatch. | |
Dynamic ShadowMap | |
|
| |
| CShadowPolyReceiver | _ShadowPolyReceiver |
| void | receiveShadowMap (IDriver *drv, CShadowMap *shadowMap, const CVector &casterPos, const CMaterial &shadowMat, const CVector &pzb) |
| void | appendToShadowPolyReceiver (CTessFace *face) |
| void | removeFromShadowPolyReceiver (CTessFace *face) |
Accessors. | |
|
| |
| CZone * | getZone (sint zoneId) |
| Get a zone pointer. | |
| const CZone * | getZone (sint zoneId) const |
| Get a zone pointer. | |
| void | getZoneList (std::vector< uint16 > &zoneIds) const |
| Return list of zone loaded. | |
| static void | buildZoneName (sint zoneId, std::string &zoneName) |
| From an Id, return the name of the zone, in the form "150_EM", without extension. | |
A landscape.
Use CZone to build zone, and use landscape to dynamically add/remove them, for render.
Limits:
If you use the tiles mapped on the patches, load the near bank file (.bank) and the far bank file (.farbank) by seralizing TileBank and TileFarBank with those files. Then call initTileBanks.
Definition at line 139 of file landscape.h.
typedef std::vector<TSPRenderPass>::iterator NL3D::CLandscape::ItSPRenderPassVector [private] |
Definition at line 801 of file landscape.h.
typedef TTileRdrPassSet::iterator NL3D::CLandscape::ItTileRdrPassSet [private] |
Definition at line 751 of file landscape.h.
typedef TTileTextureMap::iterator NL3D::CLandscape::ItTileTextureMap [private] |
Definition at line 748 of file landscape.h.
typedef NLMISC::CRefPtr<ITexture> NL3D::CLandscape::RPTexture [private] |
Definition at line 746 of file landscape.h.
typedef NLMISC::CSmartPtr<CPatchRdrPass> NL3D::CLandscape::TSPRenderPass [private] |
Definition at line 752 of file landscape.h.
typedef std::set<CPatchRdrPass> NL3D::CLandscape::TTileRdrPassSet [private] |
Definition at line 750 of file landscape.h.
typedef std::map<std::string, RPTexture> NL3D::CLandscape::TTileTextureMap [private] |
Definition at line 747 of file landscape.h.
| NL3D::CLandscape::CLandscape | ( | ) |
Constructor.
Definition at line 176 of file landscape.cpp.
References _AutomaticLightDir, _AutomaticLighting, _DLMGlobalVegetableColor, _DLMMaxAttEnd, _DriverOkForVegetable, _FarInitialized, _FarTransition, _LockCount, _MergePriorityList, _MustRefineAllAtNextRefine, _NFreeLightMaps, _NoiseEnabled, _OldRefineCenter, _PatchDLMContextList, _PointLightDiffuseMaterial, _PZBModelPosition, _RefineMode, _RenderMustRefillVB, _SplitPriorityList, _TextureDLM, _TextureFarCategory, _TextureNearCategory, _TextureTileCategory, _Threshold, _TileDistNear, _TileMaxSubdivision, _ULFarPixelsToUpdate, _ULFrequency, _ULNearCurrentTessBlockId, _ULNearPixelsToUpdate, _ULPrecTimeInit, _ULRootNearPatch, _ULRootTextureFar, _ULTotalFarPixels, _ULTotalNearPixels, _VegetableManager, _VegetableManagerEnabled, _VertexShaderOk, _VPThresholdChange, NL3D::CTessFacePriorityList::init(), NLMISC::CVector::K, NL3D::NbTilesMax, NL3D_LANDSCAPE_DLM_HEIGHT, NL3D_LANDSCAPE_DLM_WIDTH, NL3D_LANDSCAPE_VEGETABLE_MAX_AGP_VERTEX_LIGHTED, NL3D_LANDSCAPE_VEGETABLE_MAX_AGP_VERTEX_UNLIT, NL3D_REFINE_PLIST_DIST_MAX_MOD, NL3D_REFINE_PLIST_DIST_STEP, NL3D_REFINE_PLIST_NUM_ENTRIES, NL3D_REFINE_PLIST_SPLIT_NUMQUADRANT, NL_LANDSCAPE_INDEX_FORMAT, NLMISC::CVector::Null, OwnerModel, NL3D::CLandscapeGlobals::PassTriArray, NL3D::CIndexBuffer::RAMVolatile, NLMISC::CRGBA::set(), NL3D::CIndexBuffer::setFormat(), NL3D::CIndexBuffer::setNumIndexes(), NL3D::CIndexBuffer::setPreferredMemory(), setupStaticLight(), TileInfos, and NLMISC::CRGBA::White.
| NL3D::CLandscape::~CLandscape | ( | ) | [virtual] |
Destructor. clear().
Definition at line 278 of file landscape.cpp.
References _PatchDLMContextList, _TextureDLM, _VegetableManager, and clear().
| void NL3D::CLandscape::addPatchBlocksInBBox | ( | const CPatchIdentEx & | paIdEx, | |
| const CAABBox & | bbox, | |||
| std::vector< CPatchBlockIdent > & | paBlockIds | |||
| ) | [private] |
private version of buildPatchBlocksInBBox, searching only for one patch.
Definition at line 2481 of file landscape.cpp.
References NL3D::CPatch::addPatchBlocksInBBox(), NL3D::CLandscape::CPatchIdentEx::Patch, NL3D::CPatchIdent::PatchId, and NL3D::CPatchIdent::ZoneId.
Referenced by buildPatchBlocksInBBox().
| void NL3D::CLandscape::addTileCallback | ( | ULandscapeTileCallback * | cb | ) |
Definition at line 3920 of file landscape.cpp.
References _TileCallbacks, isTileCallback(), and nlassert.
Referenced by NL3D::CLandscapeUser::addTileCallback().
| void NL3D::CLandscape::addTrianglesInBBox | ( | const CPatchIdentEx & | paIdEx, | |
| const CAABBox & | bbox, | |||
| std::vector< CTrianglePatch > & | triangles, | |||
| uint8 | tileTessLevel | |||
| ) | const [private] |
This method search only on the given patch.
NB: this method use a convex hull subdivion to search in O(logn) what part of the patch to insert.
| bbox | the bbox to test against. | |
| triangles | array to be filled (no clear performed, elements added). | |
| tileTessLevel | 0,1 or 2 size of the triangles (2*2m, 1*1m or 0.5*0.5m). Level of subdivision of a tile. |
Definition at line 2448 of file landscape.cpp.
References NL3D::CPatch::addTrianglesInBBox(), NL3D::CLandscape::CPatchIdentEx::Patch, NL3D::CPatchIdent::PatchId, and NL3D::CPatchIdent::ZoneId.
Referenced by buildTrianglesInBBox().
Add a zone which should be builded (or loaded), but not compiled.
CLandscape compile it. The contents of newZone are copied into the landscape.
| newZone | the new zone. |
Definition at line 396 of file landscape.cpp.
References _PatchQuadGrid, NL3D::CZone::_PointLightArray, NL3D::CZone::applyHeightField(), NL3D::CZone::build(), NL3D::CPatch::buildBBox(), NL3D::CZone::compile(), NLMISC::CAABBoxExt::getAABBox(), NLMISC::CAABBox::getHalfSize(), NLMISC::CAABBox::getMax(), NLMISC::CAABBox::getMin(), NL3D::CZone::getNumPatchs(), NL3D::CTransform::getOwnerScene(), NL3D::CZone::getZoneBB(), NL3D::CZone::getZoneId(), NLMISC::CAABBox::include(), NL3D::CPointLightNamedArray::initAnimatedLightIndex(), NL3D::CQuadGrid< T >::insert(), nlassert, NLMISC::CVector::Null, OwnerModel, NL3D::CLandscape::CPatchIdentEx::Patch, NL3D::CPatchIdent::PatchId, NLMISC::CAABBox::setHalfSize(), NL3D::CPointLightNamedArray::setPointLightFactor(), unlockBuffers(), updateGlobalsAndLockBuffers(), updateTessBlocksFaceVector(), NL3D::CPatchIdent::ZoneId, and Zones.
Referenced by NL3D::CLandscapeUser::loadAllZonesAround(), and NL3D::CLandscapeUser::refreshZonesAround().
| void NL3D::CLandscape::appendTileLightInfluences | ( | const CPatchIdent & | patchId, | |
| const CUV & | uv, | |||
| std::vector< CPointLightInfluence > & | pointLightList | |||
| ) | const |
Append lights under the position to pointLightList. Do nothing if invalid patchId.
Definition at line 3460 of file landscape.cpp.
References NL3D::CPatch::appendTileLightInfluences(), nlassert, NL3D::CPatchIdent::PatchId, NL3D::CPatchIdent::ZoneId, and Zones.
| void NL3D::CLandscape::appendToShadowPolyReceiver | ( | CTessFace * | face | ) | [private] |
Definition at line 3831 of file landscape.cpp.
References _ShadowPolyReceiver, NL3D::CShadowPolyReceiver::addTriangle(), NL3D::CTessVertex::EndPos, NL3D::CTessFace::ShadowMapTriId, NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, NLMISC::CTriangle::V2, NL3D::CTessFace::VBase, NL3D::CTessFace::VLeft, and NL3D::CTessFace::VRight.
Referenced by NL3D::CPatch::appendFaceToTileRenderList().
| void NL3D::CLandscape::averageTesselationVertices | ( | ) |
This is especially for Pacs.
Each Vertex->EndPos which is not a corner of a patch is set to the mean of its 2 shared Patchs. NB: Works with special cases of rectangular patchs and binded patchs.
Definition at line 784 of file landscape.cpp.
References _TessBlockModificationRoot, NL3D::CLandscapeGlobals::CurrentDate, NL3D::CTessBlock::getNextToModify(), nlassert, NLMISC::CVector::Null, unlockBuffers(), updateGlobalsAndLockBuffers(), updateTessBlocksFaceVector(), and Zones.
| void NL3D::CLandscape::buildCollideFaces | ( | sint | zoneId, | |
| sint | patch, | |||
| std::vector< CTriangle > & | faces | |||
| ) |
Build the set of faces of landscape, from a certain patch.
Useful for collisions. Triangles are built first in S then T order. There is two triangles by tiles. So the number of triangles for a patch is 2*OrderS*OrderT.
Definition at line 2610 of file landscape.cpp.
References NL3D::CPatch::computeVertex(), NL3D::CPatch::getOrderS(), NL3D::CPatch::getOrderT(), nlassert, NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, NLMISC::CTriangle::V2, and Zones.
| void NL3D::CLandscape::buildCollideFaces | ( | const CAABBoxExt & | bbox, | |
| std::vector< CTriangle > & | faces, | |||
| bool | faceSplit | |||
| ) |
Build the set of faces of landscape, which are IN a bbox.
Useful for collisions. The faces are builded at Tile level (2m*2m).
| bbox | the bbox where faces are searched. | |
| faces | the result of the build. | |
| faceSplit | if true, Only faces which are IN or partialy IN the bbox are returned. Else the clipping is done on patch level. Worst, but faster. |
Definition at line 2534 of file landscape.cpp.
References NL3D::CPatch::computeVertex(), NLMISC::CAABBoxExt::getCenter(), NL3D::CPatch::getOrderS(), NL3D::CPatch::getOrderT(), NLMISC::CAABBoxExt::getRadius(), NLMISC::CAABBoxExt::intersect(), NLMISC::CTriangle::V0, NLMISC::CTriangle::V1, NLMISC::CTriangle::V2, and Zones.
| void NL3D::CLandscape::buildPatchBlocksInBBox | ( | const CAABBox & | bbox, | |
| std::vector< CPatchBlockIdent > & | paBlockIds | |||
| ) |
Same as buildTrianglesInBBox(), but fill blockId instead of raw triangles.
NB: this method use first a quadgrid to locate patchs of interest, then for each patch, it uses a convex hull subdivion to search in O(logn) what part of the patch to insert.
| bbox | the bbox to test against. NB: you should modify your bbox according to heighfield. | |
| paBlockIds | array to be filled (no clear performed, elements added). |
Definition at line 2494 of file landscape.cpp.
References _PatchQuadGrid, addPatchBlocksInBBox(), NL3D::CQuadGrid< T >::begin(), NL3D::CQuadGrid< T >::clearSelection(), NL3D::CQuadGrid< T >::end(), NLMISC::CAABBox::getMax(), NLMISC::CAABBox::getMin(), and NL3D::CQuadGrid< T >::select().
| void NL3D::CLandscape::buildTrianglesInBBox | ( | const CAABBox & | bbox, | |
| std::vector< CTrianglePatch > & | triangles, | |||
| uint8 | tileTessLevel | |||
| ) |
method relatively identical than buildCollideFaces(bbox.
...). Differences below: NB: this method use first a quadgrid to locate patchs of interest, then for each patch, it uses a convex hull subdivion to search in O(logn) what part of the patch to insert.
| bbox | the bbox to test against. NB: you should modify your bbox according to heighfield. | |
| triangles | array to be filled (array first cleared, then elements added). | |
| tileTessLevel | 0,1 or 2 size of the triangles (2*2m, 1*1m or 0.5*0.5m). Level of subdivision of a tile. |
Definition at line 2461 of file landscape.cpp.
References _PatchQuadGrid, addTrianglesInBBox(), NL3D::CQuadGrid< T >::begin(), NL3D::CQuadGrid< T >::clearSelection(), NL3D::CQuadGrid< T >::end(), NLMISC::CAABBox::getMax(), NLMISC::CAABBox::getMin(), and NL3D::CQuadGrid< T >::select().
| void NL3D::CLandscape::buildZoneName | ( | sint | zoneId, | |
| std::string & | zoneName | |||
| ) | [static] |
From an Id, return the name of the zone, in the form "150_EM", without extension.
Definition at line 524 of file landscape.cpp.
Referenced by NL3D::CLandscapeUser::getAllZoneLoaded().
Verify the binding of patchs of one zone. throw EBadBind if error. nop if zone not loaded.
Definition at line 2431 of file landscape.cpp.
References NL3D::EBadBind::BindErrors.
| void NL3D::CLandscape::checkBinds | ( | ) | throw (EBadBind) |
Verify the binding of patchs of all zones. throw EBadBind if error.
Definition at line 2415 of file landscape.cpp.
References NL3D::EBadBind::BindErrors, checkZoneBinds(), and Zones.
Referenced by NL3D::CLandscapeUser::loadAllZonesAround(), and NL3D::CLandscapeUser::refreshZonesAround().
Definition at line 2386 of file landscape.cpp.
References NL3D::CZone::CPatchConnect::BindEdges, NL3D::EBadBind::BindErrors, NL3D::CPatchInfo::CBindInfo::Edge, NL3D::CZone::getNumPatchs(), NL3D::CZone::getPatchConnect(), getZone(), NL3D::CZone::getZoneId(), NL3D::CPatchInfo::CBindInfo::Next, NL3D::CPatchInfo::CBindInfo::NPatchs, and NL3D::CPatchInfo::CBindInfo::ZoneId.
Referenced by checkBinds().
| void NL3D::CLandscape::clear | ( | ) |
Disconnect, and Delete all zones.
Definition at line 533 of file landscape.cpp.
References _Driver, _Far0VB, _Far1VB, _PatchQuadGrid, _TextureFars, _TileVB, NL3D::CLandscapeVBAllocator::clear(), NL3D::CQuadGrid< T >::clear(), clearFarRenderPass(), getZoneList(), nlverify, releaseAllTiles(), and removeZone().
Referenced by NL3D::CLandscapeUser::removeAllZones(), and ~CLandscape().
| void NL3D::CLandscape::clearFarRenderPass | ( | CPatchRdrPass * | pass | ) | [private] |
Definition at line 2330 of file landscape.cpp.
References _ULRootTextureFar, NL3D::CTextureFar::getNextUL(), NL3D::CPatchRdrPass::TextureDiffuse, and NL3D::CTextureFar::unlinkUL().
Referenced by clear().
Clip the landscape according to frustum.
Planes must be normalized.
Definition at line 595 of file landscape.cpp.
References _TessBlockModificationRoot, NL3D::CTessBlock::getNextToModify(), nlassert, unlockBuffers(), updateGlobalsAndLockBuffers(), updateTessBlocksFaceVector(), and Zones.
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| void NL3D::CLandscape::computeDynamicLighting | ( | const std::vector< CPointLight * > & | pls | ) |
Compute dynamic lightmaps.
| pls | list of pointLigths to influence landscape |
Definition at line 3676 of file landscape.cpp.
References _DLMMaxAttEnd, _PatchDLMContextList, _PatchQuadGrid, _PointLightDiffuseMaterial, NL3D::CPatchDLMPointLight::BBox, NL3D::CQuadGrid< T >::begin(), NL3D::CTessList< T >::begin(), NL3D::CPatch::beginDLMLighting(), NL3D::CPatchDLMPointLight::BSphere, NL3D::CQuadGrid< T >::clearSelection(), NL3D::CQuadGrid< T >::end(), NL3D::CPatch::endDLMLighting(), NLMISC::CAABBox::getMax(), NLMISC::CAABBox::getMin(), NL3D::CPatchDLMContext::getPatch(), NL3D::CZone::getPatchBSphere(), NL3D::CPatch::getPatchId(), NL3D::CPatch::getZone(), NL3D::CTessNodeList::Next, NLMISC::CVector::Null, NL3D::CQuadGrid< T >::select(), unlockBuffers(), and updateGlobalsAndLockBuffers().
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| void NL3D::CLandscape::createVegetableBlendLayersModels | ( | CScene * | scene | ) |
Micro-Vegetation.
init the vegetable layer models in the CScene (see CVegetableManager). NB: MOT stuff (called by CLandscapeModel), don't use it.
Definition at line 3379 of file landscape.cpp.
References _VegetableManager, and NL3D::CVegetableManager::createVegetableBlendLayersModels().
Referenced by NL3D::CLandscapeModel::initModel().
| void NL3D::CLandscape::deleteTessFace | ( | CTessFace * | f | ) | [private] |
Definition at line 3206 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::free(), TessFaceAllocator, and NL3D::CTessFacePListNode::unlinkInPList().
Referenced by NL3D::CTessFace::doMerge(), and NL3D::CPatch::release().
| void NL3D::CLandscape::deleteTessFarVertex | ( | CTessFarVertex * | v | ) | [private] |
Definition at line 3227 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::free(), and TessFarVertexAllocator.
Referenced by NL3D::CTessFace::doMerge().
| void NL3D::CLandscape::deleteTessNearVertex | ( | CTessNearVertex * | v | ) | [private] |
Definition at line 3221 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::free(), and TessNearVertexAllocator.
Referenced by NL3D::CTessFace::deleteTileUv().
| void NL3D::CLandscape::deleteTessVertex | ( | CTessVertex * | v | ) | [private] |
Definition at line 3215 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::free(), and TessVertexAllocator.
Referenced by NL3D::CTessFace::doMerge(), and NL3D::CTessFace::updateBindAndSplit().
| void NL3D::CLandscape::deleteTileFace | ( | CTileFace * | tf | ) | [private] |
Definition at line 3239 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::free(), and TileFaceAllocator.
Referenced by NL3D::CTessFace::deleteTileFaces().
| void NL3D::CLandscape::deleteTileMaterial | ( | CTileMaterial * | tm | ) | [private] |
Definition at line 3233 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::free(), and TileMaterialAllocator.
Referenced by NL3D::CTessFace::releaseTileMaterial().
| void NL3D::CLandscape::enableAutomaticLighting | ( | bool | enable | ) |
Enable automatic near lightmap computing.
use setupStaticLight(). Default is disabled. NB: calling this method won't flush all texture near already computed.
Definition at line 2838 of file landscape.cpp.
References _AutomaticLighting.
| void NL3D::CLandscape::enableVegetable | ( | bool | enable | ) |
enable the vegetable management in landscape.
Valid only if VertexShader is OK. if true, register TileBank vegetables Shape to manager.
Definition at line 3274 of file landscape.cpp.
References _VegetableManager, _VegetableManagerEnabled, NL3D::CPatch::deleteAllVegetableIgs(), NL3D::CTileBank::initTileVegetableDescs(), NL3D::CPatch::recreateAllVegetableIgs(), TileBank, and Zones.
Referenced by NL3D::CLandscapeUser::enableVegetable().
| bool NL3D::CLandscape::eraseTileFarIfNotGood | ( | uint | tileNumber, | |
| uint | sizeOrder0, | |||
| uint | sizeOrder1, | |||
| uint | sizeOrder2 | |||
| ) | [private] |
Definition at line 2706 of file landscape.cpp.
References NL3D::CTileFarBank::additive, NL3D::CTileFarBank::diffuse, NL3D::CTileFarBank::getTile(), NL3D::CTileFarBank::order0, NL3D::CTileFarBank::order1, NL3D::CTileFarBank::order2, and TileFarBank.
Referenced by initTileBanks().
This is especially for Pacs. exlude a patch to be refineAll()ed.
Definition at line 772 of file landscape.cpp.
References Zones.
Referenced by NL3D::CZoneLighter::buildZoneInformation(), NL3D::CZoneLighter::computeTileFlagsOnly(), NL3D::CZoneLighter::excludeAllPatchFromRefineAll(), and NL3D::CInstanceLighter::excludeAllPatchFromRefineAll().
| void NL3D::CLandscape::fillPatchQuadBlock | ( | CPatchQuadBlock & | quadBlock | ) | const |
Fill a CPatchQuadBlock, from its required PatchId.
nlassert(PatchId size is less than NL_PATCH_BLOCK_MAX_QUAD)
Definition at line 2513 of file landscape.cpp.
References NL3D::CPatch::fillPatchQuadBlock(), nlassert, NL3D::CPatchQuadBlock::PatchBlockId, NL3D::CPatchIdent::PatchId, NL3D::CPatchBlockIdent::PatchId, NL3D::CPatchIdent::ZoneId, and Zones.
| CPatchRdrPass * NL3D::CLandscape::findTileRdrPass | ( | const CPatchRdrPass & | pass | ) | [private] |
Definition at line 1771 of file landscape.cpp.
References _TextureTileCategory, NL3D::ITexture::Clamp, NL3D::ITexture::DXTC5, NL3D::ITexture::Repeat, NL3D::ITexture::setTextureCategory(), NL3D::ITexture::setUploadFormat(), NL3D::ITexture::setWrapS(), NL3D::ITexture::setWrapT(), and TileTextureMap.
Referenced by loadTile().
Force a range of tiles to be loaded in the driver...
Definition at line 2021 of file landscape.cpp.
References NL3D::CLandscape::CTileInfo::AdditiveRdrPass, NL3D::CLandscape::CTileInfo::DiffuseRdrPass, loadTile(), nlassert, NL3D::IDriver::setupTexture(), NL3D::CPatchRdrPass::TextureAlpha, NL3D::CPatchRdrPass::TextureDiffuse, and TileInfos.
Referenced by NL3D::CLandscapeUser::flushTiles().
| void NL3D::CLandscape::forceMergeAtTileLevel | ( | ) | [private] |
For changing TileMaxSubdivision. force tesselation to be under tile.
Definition at line 385 of file landscape.cpp.
References Zones.
Referenced by setTileMaxSubdivision().
| void NL3D::CLandscape::freeFarRenderPass | ( | CPatch * | pPatch, | |
| CPatchRdrPass * | pass, | |||
| uint | farIndex | |||
| ) | [private] |
Definition at line 2311 of file landscape.cpp.
References _ULTotalFarPixels, NL3D::CPatch::getOrderS(), NL3D::CPatch::getOrderT(), NL_NUM_PIXELS_ON_FAR_TILE_EDGE, nlassert, NL3D::CTextureFar::removePatch(), and NL3D::CPatchRdrPass::TextureDiffuse.
Referenced by NL3D::CPatch::computeNewFar(), and NL3D::CPatch::resetRenderFar().
| const CVector& NL3D::CLandscape::getAutomaticLightDir | ( | ) | const [inline] |
return the light direction setuped in enableAutomaticLighting().
Definition at line 418 of file landscape.h.
Referenced by NL3D::CPatch::computeTileLightmapPixelAutomatic().
| bool NL3D::CLandscape::getAutomaticLighting | ( | ) | const [inline] |
return true if AutomaticLighting is enabled.
Definition at line 416 of file landscape.h.
| float NL3D::CLandscape::getCameraCollision | ( | const CVector & | start, | |
| const CVector & | end, | |||
| float | radius, | |||
| bool | cone | |||
| ) |
Get the camera 3rd person collision against the TileFaces (ie only under approx 50 m) return a [0,1] value.
0 => collision at start. 1 => no collision.
| radius | is the radius of the 'cylinder' | |
| cone | if true, the object tested is a cone (radius goes to end) |
Definition at line 3900 of file landscape.cpp.
References _ShadowPolyReceiver, NL3D::CShadowPolyReceiver::CameraColCone, NL3D::CShadowPolyReceiver::CameraColCylinder, and NL3D::CShadowPolyReceiver::getCameraCollision().
| CRGBA NL3D::CLandscape::getDLMGlobalVegetableColor | ( | ) | const [inline] |
see setDLMGlobalVegetableColor()
Definition at line 618 of file landscape.h.
Referenced by NL3D::CLandscapeUser::getDLMGlobalVegetableColor().
| float NL3D::CLandscape::getDynamicLightingMaxAttEnd | ( | ) | const [inline] |
see setDynamicLightingMaxAttEnd()
Definition at line 609 of file landscape.h.
| uint NL3D::CLandscape::getDynamicLightingMemoryLoad | ( | ) | const |
For bench only.
return approximate ammount of memory taken by dynamic lightmap in RAM. This is sizeof(global Texture in RAM) + all patchDLMContext. NB: not so slow, but do not call in final release.
Definition at line 3770 of file landscape.cpp.
References _PatchDLMContextList, NL3D::CTessList< T >::begin(), NL3D::CPatchDLMContext::getMemorySize(), NL3D_LANDSCAPE_DLM_HEIGHT, and NL3D_LANDSCAPE_DLM_WIDTH.
| CPatchRdrPass * NL3D::CLandscape::getFarRenderPass | ( | CPatch * | pPatch, | |
| uint | farIndex, | |||
| float & | far1UScale, | |||
| float & | far1VScale, | |||
| float & | far1UBias, | |||
| float & | far1VBias, | |||
| bool & | bRot | |||
| ) | [private] |
Definition at line 2228 of file landscape.cpp.
References NL3D::CTextureFar::_Bank, _TextureFarCategory, _TextureFars, _ULRootTextureFar, _ULTotalFarPixels, NL3D::CTextureFar::allocatePatch(), NL3D::CPatch::getOrderS(), NL3D::CPatch::getOrderT(), NL3D::CTextureFar::linkBeforeUL(), NL_NUM_PIXELS_ON_FAR_TILE_EDGE, nlassert, NL3D::ITexture::setTextureCategory(), NL3D::CPatchRdrPass::TextureDiffuse, TileFarBank, and NL3D::CTextureFar::tryAllocatePatch().
Referenced by NL3D::CPatch::computeNewFar().
return the HeightField DeltaZ for the 2D position. (0,0,dZ) is returned.
Definition at line 2852 of file landscape.cpp.
References _HeightField, NL3D::CLandscape::CBezierPatchZ::eval(), NL3D::CLandscape::CHeightField::Height, NLMISC::CVector::Null, NL3D::CLandscape::CHeightField::OOSizeX, NL3D::CLandscape::CHeightField::OOSizeY, NL3D::CLandscape::CHeightField::OriginX, NL3D::CLandscape::CHeightField::OriginY, NL3D::CLandscape::CHeightField::Width, NLMISC::CVector::x, NLMISC::CVector::y, NLMISC::CVector::z, and NL3D::CLandscape::CHeightField::ZPatchs.
Referenced by NL3D::CZone::applyHeightField(), and NL3D::CLandscapeUser::getHeightFieldDeltaZ().
| uint8 NL3D::CLandscape::getLumel | ( | const CPatchIdent & | patchId, | |
| const CUV & | uv | |||
| ) | const |
Get the lumel under the position. return 255 if invalid patchId.
Definition at line 3441 of file landscape.cpp.
References NL3D::CPatch::getLumel(), nlassert, NL3D::CPatchIdent::PatchId, NL3D::CPatchIdent::ZoneId, and Zones.
| bool NL3D::CLandscape::getNoiseMode | ( | ) | const |
Definition at line 3260 of file landscape.cpp.
References _NoiseEnabled.
| uint NL3D::CLandscape::getNumVegetableFaceRendered | ( | ) | const |
return the number of faces displayed in Driver with the vegetable manager.
Out CPrimitiveProfile::NTriangles displayed by vegetable part is returned.
Definition at line 3365 of file landscape.cpp.
References _VegetableManager, and NL3D::CVegetableManager::getNumVegetableFaceRendered().
| const CVector& NL3D::CLandscape::getOldRefineCenter | ( | ) | const [inline] |
Definition at line 258 of file landscape.h.
Referenced by NL3D::CLandscapeModel::getReceiverBBox().
| CPatchDLMContextList* NL3D::CLandscape::getPatchDLMContextList | ( | ) | const [inline, private] |
for CPatch.
Definition at line 1004 of file landscape.h.
| CRGBA NL3D::CLandscape::getPointLightDiffuseMaterial | ( | ) | const [inline] |
Definition at line 397 of file landscape.h.
Referenced by NL3D::CLandscapeUser::getPointLightDiffuseMaterial().
| const CVector& NL3D::CLandscape::getPZBModelPosition | ( | ) | const [inline] |
Definition at line 560 of file landscape.h.
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), and NL3D::CLandscapeModel::receiveShadowMap().
Get the ray collision against the TileFaces (ie only under approx 50 m) return a [0,1] value.
0 => collision at start. 1 => no collision.
Definition at line 3907 of file landscape.cpp.
References _ShadowPolyReceiver, NL3D::CShadowPolyReceiver::CameraColSimpleRay, and NL3D::CShadowPolyReceiver::getCameraCollision().
Referenced by NL3D::CLandscapeUser::getRayCollision().
| bool NL3D::CLandscape::getRefineMode | ( | ) | const [inline] |
Definition at line 202 of file landscape.h.
| CShadowPolyReceiver& NL3D::CLandscape::getShadowPolyReceiver | ( | ) | [inline] |
Definition at line 645 of file landscape.h.
| const CRGBA* NL3D::CLandscape::getStaticLight | ( | ) | const [inline] |
Get the light color by shading table.
Definition at line 383 of file landscape.h.
Referenced by NL3D::CPatch::computeTileLightmapEdgePrecomputed(), NL3D::CPatch::computeTileLightmapPixelAutomatic(), NL3D::CPatch::computeTileLightmapPixelPrecomputed(), NL3D::CPatch::computeTileLightmapPrecomputed(), and NL3D::CTextureFar::rebuildPatch().
| CVector NL3D::CLandscape::getTesselatedPos | ( | const CPatchIdent & | patchId, | |
| const CUV & | uv | |||
| ) | const |
From the current tesselation of a patch of landscape, and a UV in this patch, return tesselated position.
NB: return Null if patch not found.
Definition at line 2650 of file landscape.cpp.
References _OldRefineCenter, _Threshold, _TileDistNear, _VertexShaderOk, NL3D::CPatch::getTesselatedPos(), nlassert, NLMISC::CVector::Null, NL3D::CLandscapeGlobals::OORefineThreshold, NL3D::CLandscapeGlobals::OOTileDistDeltaSqr, NL3D::CPatchIdent::PatchId, NL3D::CLandscapeGlobals::RefineCenter, NL3D::CLandscapeGlobals::RefineThreshold, NLMISC::sqr(), NL3D::CLandscapeGlobals::TileDistFar, NL3D::CLandscapeGlobals::TileDistFarSqr, NL3D::CLandscapeGlobals::TileDistNear, NL3D::CLandscapeGlobals::TileDistNearSqr, NL3D::CLandscapeGlobals::VertexProgramEnabled, NL3D::CPatchIdent::ZoneId, and Zones.
| void NL3D::CLandscape::getTessellationLeaves | ( | std::vector< const CTessFace * > & | leaves | ) | const |
From the current tesselation of landscape, build the list of leaves faces.
Warning: ptrs are only valid between 2 tesselation (2 calls of Scene::render() or 2 calls of refine*() etc...)
Definition at line 3053 of file landscape.cpp.
References NL3D::CPatch::appendTessellationLeaves(), and Zones.
Referenced by NL3D::CZoneLighter::addTriangles(), NL3D::CInstanceLighter::addTriangles(), NL3D::CZoneLighter::buildZoneInformation(), and NL3D::CZoneLighter::computeTileFlagsOnly().
| CTextureDLM* NL3D::CLandscape::getTextureDLM | ( | ) | const [inline, private] |
for CPatch.
Definition at line 1000 of file landscape.h.
| float NL3D::CLandscape::getThreshold | ( | ) | const [inline] |
Get threshold.
Definition at line 200 of file landscape.h.
Referenced by NL3D::CLandscapeUser::getThreshold().
| const std::vector<ULandscapeTileCallback *>& NL3D::CLandscape::getTileCallbacks | ( | ) | const [inline] |
Definition at line 634 of file landscape.h.
Referenced by NL3D::CPatch::appendTileMaterialToRenderList(), and NL3D::CPatch::removeTileMaterialFromRenderList().
| CTileElement * NL3D::CLandscape::getTileElement | ( | const CPatchIdent & | patchId, | |
| const CUV & | uv | |||
| ) |
Return the tile element for a patch at specific UV. Useful for getting surface data. Return NULL if not found.
Definition at line 2002 of file landscape.cpp.
References NL3D::CPatch::getTileElement(), nlassert, NL3D::CPatchIdent::PatchId, NL3D::CPatchIdent::ZoneId, and Zones.
| uint NL3D::CLandscape::getTileLightMap | ( | CRGBA | map[NL_TILE_LIGHTMAP_SIZE *NL_TILE_LIGHTMAP_SIZE], | |
| CPatchRdrPass *& | lightmapRdrPass | |||
| ) | [private] |
Definition at line 2097 of file landscape.cpp.
References _NFreeLightMaps, _TextureNearCategory, _TextureNears, _ULTotalNearPixels, NL3D::CTextureNear::getNbAvailableTiles(), NL3D::CTextureNear::getTileAndFillRect(), NL3D::NbTileLightMapByTexture, nlassert, NL3D::ITexture::setTextureCategory(), NL3D::CPatchRdrPass::TextureDiffuse, and NL3D::TextureNearSize.
Referenced by NL3D::CPatch::getTileLightMap().
| void NL3D::CLandscape::getTileLightMapUvInfo | ( | uint | tileLightMapId, | |
| CVector & | uvScaleBias | |||
| ) | [private] |
Definition at line 2156 of file landscape.cpp.
References NL3D::NbTileLightMapByLine, NL3D::NbTileLightMapByTexture, NL_TILE_LIGHTMAP_SIZE, NL3D::TextureNearSize, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.
Referenced by NL3D::CPatch::getTileLightMapUvInfo().
| uint NL3D::CLandscape::getTileMaxSubdivision | ( | ) |
Get Maximum Tile subdivision.
Definition at line 367 of file landscape.cpp.
References _TileMaxSubdivision.
Referenced by NL3D::CLandscapeUser::getTileMaxSubdivision().
| float NL3D::CLandscape::getTileNear | ( | ) | const [inline] |
Get tile near distance.
Definition at line 196 of file landscape.h.
Referenced by NL3D::CLandscapeModel::getReceiverBBox(), and NL3D::CLandscapeUser::getTileNear().
| CPatchRdrPass * NL3D::CLandscape::getTileRenderPass | ( | uint16 | tileId, | |
| bool | additiveRdrPass | |||
| ) | [private] |
Definition at line 1927 of file landscape.cpp.
References NL3D::CLandscape::CTileInfo::AdditiveRdrPass, NL3D::CLandscape::CTileInfo::DiffuseRdrPass, loadTile(), nlassert, and TileInfos.
Referenced by NL3D::CPatch::getTileRenderPass(), and getTileTexture().
| NLMISC::CSmartPtr< ITexture > NL3D::CLandscape::getTileTexture | ( | uint16 | tileId, | |
| CTile::TBitmap | bitmapType, | |||
| CVector & | uvScaleBias | |||
| ) |
Return the texture for a tile Id. Useful for Tile edition.
Definition at line 1981 of file landscape.cpp.
References NL3D::CTile::additive, NL3D::CTile::diffuse, getTileRenderPass(), getTileUvScaleBiasRot(), NL3D::CPatchRdrPass::TextureAlpha, and NL3D::CPatchRdrPass::TextureDiffuse.
| void NL3D::CLandscape::getTileUvScaleBiasRot | ( | uint16 | tileId, | |
| CTile::TBitmap | bitmapType, | |||
| CVector & | uvScaleBias, | |||
| uint8 & | rotAlpha | |||
| ) | [private] |
Definition at line 1957 of file landscape.cpp.
References NL3D::CTile::additive, NL3D::CLandscape::CTileInfo::AdditiveUvScaleBias, NL3D::CTile::alpha, NL3D::CLandscape::CTileInfo::AlphaUvScaleBias, NL3D::CTile::diffuse, NL3D::CLandscape::CTileInfo::DiffuseUvScaleBias, nlassert, NL3D::CLandscape::CTileInfo::RotAlpha, and TileInfos.
Referenced by getTileTexture(), and NL3D::CPatch::getTileUvInfo().
| const CTileVegetableDesc & NL3D::CLandscape::getTileVegetableDesc | ( | uint16 | tileId | ) | [private] |
For a given tile Id, look into tileSet, and get the tile vegetable descriptor.
| tileId | the tile [0..65535] to get the list of vegetable to create. |
Definition at line 3372 of file landscape.cpp.
References NL3D::CTileBank::getTileVegetableDesc(), and TileBank.
Referenced by NL3D::CPatch::generateTileVegetable().
| float NL3D::CLandscape::getVegetableDensity | ( | ) | const |
Get the density ratio [0, 1] of micro vegetable drawn.
Default to 1
Definition at line 3428 of file landscape.cpp.
References _VegetableManager, and NL3D::CVegetableManager::getGlobalDensity().
Referenced by NL3D::CLandscapeUser::getVegetableDensity().
Get a zone pointer.
| zoneId | the zone of the update. |
Definition at line 2372 of file landscape.cpp.
References Zones.
Get a zone pointer.
| zoneId | the zone of the update. |
Definition at line 2360 of file landscape.cpp.
References Zones.
Referenced by NL3D::CZoneLighter::buildZoneInformation(), checkZoneBinds(), NL3D::CZoneLighter::computeTileFlagsOnly(), NL3D::CZoneLighter::excludeAllPatchFromRefineAll(), NL3D::CInstanceLighter::excludeAllPatchFromRefineAll(), NL3D::CLandscapeUser::getZone(), NL3D::CZoneLighter::light(), and NL3D::CZoneLighter::processZonePointLightRT().
| void NL3D::CLandscape::getZoneList | ( | std::vector< uint16 > & | zoneIds | ) | const |
Return list of zone loaded.
Definition at line 513 of file landscape.cpp.
References Zones.
Referenced by clear(), and NL3D::CLandscapeUser::getAllZoneLoaded().
| void NL3D::CLandscape::init | ( | ) |
init the landscape VBuffers, texture cache etc...
Definition at line 295 of file landscape.cpp.
References _PatchQuadGrid, _PatchQuadGridEltSize, _PatchQuadGridSize, NL3D::CMaterial::Add, NL3D::CQuadGrid< T >::create(), NL3D::CMaterial::Diffuse, FarMaterial, NL3D::CMaterial::initUnlit(), NL3D::CMaterial::invsrcalpha, NL3D::CMaterial::Previous, NL3D::CMaterial::Replace, NL3D::CMaterial::setDstBlend(), NL3D::CMaterial::setSrcBlend(), NL3D::CMaterial::SrcAlpha, NL3D::CMaterial::srcalpha, NL3D::CMaterial::SrcColor, NL3D::CMaterial::texEnvArg0Alpha(), NL3D::CMaterial::texEnvArg0RGB(), NL3D::CMaterial::texEnvArg1RGB(), NL3D::CMaterial::texEnvOpAlpha(), NL3D::CMaterial::texEnvOpRGB(), NL3D::CMaterial::Texture, and TileMaterial.
Referenced by NL3D::CLandscapeModel::CLandscapeModel().
| void NL3D::CLandscape::initAnimatedLightIndex | ( | const CScene & | scene | ) |
Definition at line 3806 of file landscape.cpp.
References Zones.
Referenced by NL3D::CScene::createInstance().
| bool NL3D::CLandscape::initTileBanks | ( | ) |
Build tileBank.
Call this after loading the near and far tile banks.
Definition at line 2746 of file landscape.cpp.
References _FarInitialized, _VegetableManager, NL3D::CTileSet::count, eraseTileFarIfNotGood(), NL3D::CTileFarBank::getNumTile(), NL3D::CTileSet::getNumTile128(), NL3D::CTileSet::getNumTile256(), NL3D::CTileSetTransition::getTile(), NL3D::CTileSet::getTile128(), NL3D::CTileSet::getTile256(), NL3D::CTileBank::getTileCount(), NL3D::CTileBank::getTileSet(), NL3D::CTileBank::getTileSetCount(), NL3D::CTileSet::getTransition(), NL3D::CTileBank::initTileVegetableDescs(), NL_TILE_FAR_SIZE_ORDER0, NL_TILE_FAR_SIZE_ORDER1, NL_TILE_FAR_SIZE_ORDER2, TileBank, and TileFarBank.
Referenced by NL3D::CLandscapeUser::flushTiles().
| void NL3D::CLandscape::invalidateAllTiles | ( | ) |
Definition at line 3880 of file landscape.cpp.
References NLMISC::CVector::Null, unlockBuffers(), updateGlobalsAndLockBuffers(), updateTessBlocksFaceVector(), and Zones.
Referenced by NL3D::CLandscapeUser::invalidateAllTiles().
| bool NL3D::CLandscape::isLocked | ( | ) | const [inline] |
Definition at line 642 of file landscape.h.
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| bool NL3D::CLandscape::isTileCallback | ( | ULandscapeTileCallback * | cb | ) | const |
Definition at line 3914 of file landscape.cpp.
References _TileCallbacks.
Referenced by addTileCallback(), and NL3D::CLandscapeUser::isTileCallback().
| bool NL3D::CLandscape::isVegetableActive | ( | ) | const |
return if the vegetable management is actually activated: actually return _VerexShaderOk && _VegetableEnabled.
Definition at line 3322 of file landscape.cpp.
References _DriverOkForVegetable, and _VegetableManagerEnabled.
Referenced by NL3D::CPatch::recreateAllVegetableIgs(), and render().
| void NL3D::CLandscape::linkPatchToNearUL | ( | CPatch * | patch | ) | [private] |
Used by Patch to link/unlink from _ULRootNearPatch.
Definition at line 3581 of file landscape.cpp.
References _ULRootNearPatch, and NL3D::CPatch::linkBeforeNearUL().
Referenced by NL3D::CPatch::addRefTessBlocks().
| void NL3D::CLandscape::loadTile | ( | uint16 | tileId | ) | [private] |
Definition at line 1803 of file landscape.cpp.
References NL3D::CTile::additive, NL3D::CLandscape::CTileInfo::AdditiveRdrPass, NL3D::CLandscape::CTileInfo::AdditiveUvScaleBias, NL3D::CTile::alpha, NL3D::CLandscape::CTileInfo::AlphaUvScaleBias, NL3D::CTile::diffuse, NL3D::CLandscape::CTileInfo::DiffuseRdrPass, NL3D::CLandscape::CTileInfo::DiffuseUvScaleBias, findTileRdrPass(), findTileTexture(), NL3D::CTileBank::getAbsPath(), NL3D::CTile::getRelativeFileName(), NL3D::CTile::getRotAlpha(), NL3D::CTileBank::getTile(), NL3D::CTileBank::getTileCount(), nlassert, nldebug, NL3D::CPatchRdrPass::RefCount, NL3D::CLandscape::CTileInfo::RotAlpha, NL3D::CPatchRdrPass::TextureAlpha, NL3D::CPatchRdrPass::TextureDiffuse, TileBank, TileInfos, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.
Referenced by flushTiles(), and getTileRenderPass().
| void NL3D::CLandscape::loadVegetableTexture | ( | const std::string & | textureFileName | ) |
load a texture for the vegetable, lookup in CPath
Definition at line 3328 of file landscape.cpp.
References _VegetableManager, and NL3D::CVegetableManager::loadTexture().
Referenced by NL3D::CLandscapeUser::loadVegetableTexture().
| void NL3D::CLandscape::lockBuffers | ( | ) |
Definition at line 863 of file landscape.cpp.
References _Driver, _DriverOkForVegetable, _Far0VB, _Far1VB, _LockCount, _TileVB, _VegetableManager, _VertexShaderOk, NL3D::CLandscapeGlobals::CurrentFar0VBInfo, NL3D::CLandscapeGlobals::CurrentFar1VBInfo, NL3D::CLandscapeGlobals::CurrentTileVBInfo, NL3D::CLandscapeVBAllocator::lockBuffer(), NL3D::CVegetableManager::lockBuffers(), NL3D::CVegetableManager::updateDriver(), NL3D::CLandscapeVBAllocator::updateDriver(), and NL3D::CLandscapeGlobals::VertexProgramEnabled.
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), render(), and updateGlobalsAndLockBuffers().
| CTessFace * NL3D::CLandscape::newTessFace | ( | ) | [private] |
Definition at line 3164 of file landscape.cpp.
References _RootNewLeaves, NLMISC::CBlockMemory< T, __ctor_dtor__ >::allocate(), NL3D::CTessFacePListNode::linkInPList(), and TessFaceAllocator.
Referenced by NL3D::CPatch::makeRoots(), NL3D::CTessFace::split(), and NL3D::CTessFace::splitRectangular().
| CTessFarVertex * NL3D::CLandscape::newTessFarVertex | ( | ) | [private] |
Definition at line 3188 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::allocate(), and TessFarVertexAllocator.
Referenced by NL3D::CTessFace::split(), and NL3D::CTessFace::splitRectangular().
| CTessNearVertex * NL3D::CLandscape::newTessNearVertex | ( | ) | [private] |
Definition at line 3182 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::allocate(), and TessNearVertexAllocator.
Referenced by NL3D::CTessFace::allocTileUv().
| CTessVertex * NL3D::CLandscape::newTessVertex | ( | ) | [private] |
Definition at line 3176 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::allocate(), and TessVertexAllocator.
Referenced by NL3D::CTessFace::split(), NL3D::CTessFace::splitRectangular(), and NL3D::CTessFace::unbind().
| CTileFace * NL3D::CLandscape::newTileFace | ( | ) | [private] |
Definition at line 3200 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::allocate(), and TileFaceAllocator.
Referenced by NL3D::CTessFace::buildTileFaces().
| CTileMaterial * NL3D::CLandscape::newTileMaterial | ( | ) | [private] |
Definition at line 3194 of file landscape.cpp.
References NLMISC::CBlockMemory< T, __ctor_dtor__ >::allocate(), and TileMaterialAllocator.
Referenced by NL3D::CTessFace::computeTileMaterial().
| void NL3D::CLandscape::profileRender | ( | ) |
Definition at line 3093 of file landscape.cpp.
Referenced by NL3D::CLandscapeModel::profileRender().
| void NL3D::CLandscape::receiveShadowMap | ( | IDriver * | drv, | |
| CShadowMap * | shadowMap, | |||
| const CVector & | casterPos, | |||
| const CMaterial & | shadowMat, | |||
| const CVector & | pzb | |||
| ) |
Definition at line 3854 of file landscape.cpp.
References _ShadowPolyReceiver, NL3D::CMaterial::getZBias(), NL3D::CShadowPolyReceiver::render(), and NL3D::CMaterial::setZBias().
Referenced by NL3D::CLandscapeModel::receiveShadowMap().
| void NL3D::CLandscape::refillTileLightMap | ( | uint | tileLightMapId, | |
| CRGBA | map[NL_TILE_LIGHTMAP_SIZE *NL_TILE_LIGHTMAP_SIZE] | |||
| ) | [private] |
Definition at line 2201 of file landscape.cpp.
References _TextureNears, NL3D::NbTileLightMapByTexture, nlassert, and NL3D::CTextureNear::refillRect().
Referenced by NL3D::CPatch::updateTessBlockLighting().
| void NL3D::CLandscape::refine | ( | const CVector & | refineCenter | ) |
Refine/Geomorph the tesselation of the landscape.
Definition at line 617 of file landscape.cpp.
References _MergePriorityList, _MustRefineAllAtNextRefine, _OldRefineCenter, _RefineMode, _RootNewLeaves, _SplitPriorityList, _VegetableBlockList, _VegetableManager, NL3D::CTessFacePListNode::appendPList(), NL3D::CTessList< T >::begin(), NL3D::CLandscapeGlobals::CurrentDate, H_AUTO, NL3D::CTessNodeList::Next, NL3D::CTessFacePListNode::nextInPList(), NL3D_PROFILE_LAND_ADD, NL3D_PROFILE_LAND_SET, NLMISC::OptFastFloorBegin(), NLMISC::OptFastFloorEnd(), NL3D::ProfNMerges, NL3D::ProfNRefineComputeFaces, NL3D::ProfNRefineFaces, NL3D::ProfNRefineInTileTransition, NL3D::ProfNRefineLeaves, NL3D::ProfNRefineWithLowDistance, NL3D::ProfNSplits, NL3D::ProfNSplitsPass, NL3D::CTessFacePriorityList::shift(), NL3D::CTessFacePriorityList::shiftAll(), unlockBuffers(), NL3D::CLandscapeVegetableBlock::update(), updateGlobalsAndLockBuffers(), NL3D::CVegetableManager::updateLighting(), NL3D::CTessFace::updateRefineMerge(), NL3D::CTessFace::updateRefineSplit(), and updateTessBlocksFaceVector().
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| void NL3D::CLandscape::refineAll | ( | const CVector & | refineCenter | ) |
Refine/Geomorph ALL the tesselation of the landscape, from the view point refineCenter. Even if !RefineMode.
Definition at line 749 of file landscape.cpp.
References NL3D::CLandscapeGlobals::CurrentDate, unlockBuffers(), updateGlobalsAndLockBuffers(), updateTessBlocksFaceVector(), and Zones.
Referenced by NL3D::CZoneLighter::addTriangles(), NL3D::CInstanceLighter::addTriangles(), NL3D::CZoneLighter::buildZoneInformation(), and NL3D::CZoneLighter::computeTileFlagsOnly().
| void NL3D::CLandscape::releaseAllTiles | ( | ) |
Delete All tiles. All zones must be deleted before (nlassert).
Definition at line 3816 of file landscape.cpp.
References nlassert, releaseTiles(), TileInfos, and Zones.
Referenced by clear(), and NL3D::CLandscapeUser::loadBankFiles().
| void NL3D::CLandscape::releaseTile | ( | uint16 | tileId | ) | [private] |
Definition at line 1909 of file landscape.cpp.
References NL3D::CLandscape::CTileInfo::AdditiveRdrPass, NL3D::CLandscape::CTileInfo::DiffuseRdrPass, nlassert, NL3D::CPatchRdrPass::RefCount, and TileInfos.
Referenced by releaseTiles().
| void NL3D::CLandscape::releaseTileLightMap | ( | uint | tileLightMapId | ) | [private] |
Definition at line 2179 of file landscape.cpp.
References _NFreeLightMaps, _TextureNears, _ULTotalNearPixels, NL3D::NbTileLightMapByTexture, NL_TILE_LIGHTMAP_SIZE, nlassert, and NL3D::CTextureNear::releaseTile().
Referenced by NL3D::CPatch::releaseTileLightMap().
Force a range of tiles to be unloaded.
You should call changePatchTextureAndColor() on all patch or ensure that all zones are deleted.
Definition at line 2061 of file landscape.cpp.
References nlassert, releaseTile(), TileInfos, and TileRdrPassSet.
Referenced by releaseAllTiles().
| void NL3D::CLandscape::removeAllPointLights | ( | ) |
This method remove all PointLights in all Zones, and hence reset TileLightInfluences.
Definition at line 3485 of file landscape.cpp.
References NL3D::CPatch::resetTileLightInfluences(), and Zones.
| void NL3D::CLandscape::removeFromShadowPolyReceiver | ( | CTessFace * | face | ) | [private] |
Definition at line 3842 of file landscape.cpp.
References _ShadowPolyReceiver, NL3D::CShadowPolyReceiver::removeTriangle(), and NL3D::CTessFace::ShadowMapTriId.
Referenced by NL3D::CPatch::removeFaceFromTileRenderList().
| void NL3D::CLandscape::removeTileCallback | ( | ULandscapeTileCallback * | cb | ) |
Definition at line 3928 of file landscape.cpp.
References _TileCallbacks, and nlassert.
Referenced by NL3D::CLandscapeUser::removeTileCallback().
remove a zone by its unique Id.
The zone is release()-ed (disconnected), then deleted.
| zoneId | the zone to be removed. |
Definition at line 458 of file landscape.cpp.
References _PatchQuadGrid, NL3D::CQuadGrid< T >::begin(), NL3D::CQuadGrid< T >::clearSelection(), NL3D::CQuadGrid< T >::end(), NL3D::CQuadGrid< T >::erase(), NLMISC::CAABBoxExt::getAABBox(), NLMISC::CAABBox::getHalfSize(), NLMISC::CAABBox::getMax(), NLMISC::CAABBox::getMin(), NL3D::CZone::getNumPatchs(), NL3D::CZone::getZoneBB(), NL3D::CZone::getZoneId(), nlassert, NLMISC::CVector::Null, NL3D::CZone::release(), NL3D::CQuadGrid< T >::select(), NLMISC::CAABBox::setHalfSize(), unlockBuffers(), updateGlobalsAndLockBuffers(), updateTessBlocksFaceVector(), and Zones.
Referenced by clear(), NL3D::CLandscapeUser::refreshZonesAround(), and NL3D::CLandscapeUser::removeAllZones().
| void NL3D::CLandscape::render | ( | const CVector & | refineCenter, | |
| const CVector & | frontVector, | |||
| const CPlane | pyramid[NL3D_TESSBLOCK_NUM_CLIP_PLANE], | |||
| bool | doTileAddPass = false | |||
| ) |
Render the landscape.
A more precise clip is made on TessBlocks. pyramid should be the same as one passed to clip(). For optimisation, this pyramid should contains only the Left/Right and Top/Bottom clip planes, in this order.
| refineCenter | should be the position of the camera | |
| frontVector | should be the J vector of the camera |
Definition at line 1017 of file landscape.cpp.
References _DLMGlobalVegetableColor, _Driver, _Far0VB, _Far1VB, _PatchDLMContextList, _PointLightDiffuseMaterial, _PZBModelPosition, _RenderMustRefillVB, _TextureDLM, _TextureFars, _TextureNears, _TileVB, _VegetableManager, _VertexShaderOk, _VPThresholdChange, NL3D::CLandscapeVBAllocator::activate(), NL3D::IDriver::activeVertexProgram(), NL3D::CMaterial::Add, NLMISC::CRGBA::B, NL3D::CTessList< T >::begin(), NL3D::ILandscapePolyDrawingCallback::beginPolyDrawing(), NLMISC::CRGBA::Black, NL3D::CLandscapeVBAllocator::checkVertexBuffersResident(), NL3D::CPatchRdrPass::clearAllRenderList(), NL3D::CZone::ClipOut, NL3D::CPatchDLMContext::compileLighting(), NL3D::CPatch::computeSoftwareGeomorphAndAlpha(), NL3D::CMaterial::Constant, NL3D::countNumWantedIndex(), NL3D::countNumWantedIndexFar0(), NL3D::countNumWantedIndexFar1(), NL3D::CTessBlock::CurrentPyramid, NL3D::CLandscapeGlobals::CurrentRenderDate, NL3D::drawPassTriArray(), NL3D::ILandscapePolyDrawingCallback::endPolyDrawing(), FarMaterial, NL3D::CPatch::fillVBIfVisible(), NLMISC::CRGBA::G, NL3D::CPatch::getFar0(), NL3D::CPatch::getFar1(), NL3D::IDriver::getFogColor(), NL3D::IDriver::getFogEnd(), NL3D::IDriver::getFogStart(), NL3D::CScene::getLandscapePolyDrawingCallback(), NL3D::CRdrTileId::getNext(), NL3D::CPatch::getNextFar0ToRdr(), NL3D::CPatch::getNextFar1ToRdr(), NL3D::CTransform::getOwnerScene(), NL3D::CPatchDLMContext::getPatch(), NL3D::CPatchRdrPass::getRdrPatchFar0(), NL3D::CPatchRdrPass::getRdrPatchFar1(), NL3D::CPatchRdrPass::getRdrTileRoot(), NL3D::CMaterial::getTexEnvMode(), NL3D::CPatch::getTileMaterialRefCount(), H_AFTER, H_BEFORE, NL3D::IDriver::Identity, NL3D::initPassTriArray(), NL3D::CMaterial::invsrcalpha, NL3D::CPatch::isRenderClipped(), isVegetableActive(), lockBuffers(), NL3D::IDriver::mapTextureStageToUV(), min, NL3D::IDriver::ModelViewProjection, NL3D::CMaterial::Modulate, NL3D::CPatchDLMContext::ModulateConstant, NL3D::CPatchDLMContext::ModulateTextureFar, NL3D::CPatchDLMContext::ModulateTileColor, NL3D::CTessNodeList::Next, NL3D::NL3D_LandscapeGlobals_PassNTri, NL3D_MAX_TILE_PASS, NL3D_PROFILE_LAND_SET, NL3D_TILE_PASS_ADD, NL3D_TILE_PASS_LIGHTMAP, NL3D_TILE_PASS_RGB0, NL3D_TILE_PASS_RGB1, NL3D_TILE_PASS_RGB2, nlassert, nlstop, NL3D::CMaterial::one, NL3D::CLandscapeGlobals::OOTileDistDeltaSqr, OwnerModel, NL3D::CLandscapeGlobals::PatchCurrentDriver, NL3D::CMaterial::Previous, NL3D::IDriver::profileSetupedMaterials(), NL3D::ProfNFar0SetupMaterial, NL3D::ProfNFar1SetupMaterial, NL3D::ProfNPatchRdrFar0, NL3D::ProfNPatchRdrFar1, NL3D::ProfNRdrFar0, NL3D::ProfNRdrFar1, NL3D::ProfNRdrTile, NL3D::ProfNTileSetupMaterial, NLMISC::CRGBA::R, NL3D::CLandscapeVBAllocator::reallocationOccurs(), NL3D::CVegetableManager::render(), NL3D::CPatch::renderFar0(), NL3D::CPatch::renderFar1(), NL3D::CTileMaterial::renderTile(), NL3D::CTileMaterial::renderTilePassLightmap(), NL3D::CTileMaterial::renderTilePassRGB0(), NL3D::CMaterial::Replace, NL3D::CVegetableManager::resetNumVegetableFaceRendered(), NL3D::CLandscapeVBAllocator::resetReallocation(), NL3D::CMaterial::setBlend(), NL3D::CMaterial::setBlendFunc(), NL3D::IDriver::setConstant(), NL3D::IDriver::setConstantFog(), NL3D::IDriver::setConstantMatrix(), NL3D::CMaterial::setTexEnvMode(), NL3D::CMaterial::setTexture(), NL3D::IDriver::setupFog(), NL3D::IDriver::setupTexture(), NL3D::CMaterial::srcalpha, NL3D::CMaterial::SrcAlpha, NL3D::CMaterial::srccolor, NL3D::CMaterial::SrcColor, NL3D::CMaterial::texConstantColor(), NL3D::CMaterial::texEnvArg0Alpha(), NL3D::CMaterial::texEnvArg0RGB(), NL3D::CMaterial::texEnvArg1Alpha(), NL3D::CMaterial::texEnvArg1RGB(), NL3D::CMaterial::texEnvOpAlpha(), NL3D::CMaterial::texEnvOpRGB(), NL3D::CMaterial::Texture, NL3D::CPatchRdrPass::TextureAlpha, NL3D::CPatchRdrPass::TextureDiffuse, NL3D::CLandscapeGlobals::TileDistFarSqr, NL3D::CRdrTileId::TileMaterial, TileMaterial, TileRdrPassSet, unlockBuffers(), updateGlobalsAndLockBuffers(), NLMISC::CRGBA::White, NL3D::CMaterial::zero, and Zones.
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| void NL3D::CLandscape::resetRenderFarAndDeleteVBFV | ( | ) | [private] |
| void NL3D::CLandscape::setDLMGlobalVegetableColor | ( | CRGBA | gvc | ) |
For Vegetable Dynamic ligthing only: this is an approximate color of all vegetables.
Default is (180, 180, 180).
Definition at line 3792 of file landscape.cpp.
References _DLMGlobalVegetableColor.
Referenced by NL3D::CLandscapeUser::setDLMGlobalVegetableColor().
| void NL3D::CLandscape::setDriver | ( | IDriver * | drv | ) |
A driver is needed for VB allocation.
The VB will be allocated only the first time the landscape is clipped. Because no VB are created for invisible patchs. call setDriver() before any clip().
Definition at line 575 of file landscape.cpp.
References _Driver, _DriverOkForVegetable, _VertexShaderOk, NL3D_LANDSCAPE_VEGETABLE_MAX_AGP_VERTEX_MAX, and nlassert.
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| void NL3D::CLandscape::setDynamicLightingMaxAttEnd | ( | float | maxAttEnd | ) |
Set PointLight Max Attenuation End landscape support.
Every pointLight AttEnd is clamped to this value. Default is 30.f.
Definition at line 3762 of file landscape.cpp.
References _DLMMaxAttEnd.
| void NL3D::CLandscape::setHeightField | ( | const CHeightMap & | hf | ) |
set the HeightField data.
NB: take lot of place in memory. only one is possible. You should setup this heightfield around the zones which will be loaded. It is applied only when a zone is loaded, so you should setup it 2km around the user, each time you move too far from a previous place (eg 160m from last setup).
Definition at line 2938 of file landscape.cpp.
References _HeightField, NL3D::CHeightMap::getHeight(), NL3D::CHeightMap::getWidth(), NL3D::CHeightMap::getZ(), NL3D::CLandscape::CHeightField::Height, NL3D::CLandscape::CBezierPatchZ::makeInteriors(), NL3D::CLandscape::CHeightField::OOSizeX, NL3D::CLandscape::CHeightField::OOSizeY, NL3D::CHeightMap::OriginX, NL3D::CLandscape::CHeightField::OriginX, NL3D::CHeightMap::OriginY, NL3D::CLandscape::CHeightField::OriginY, NL3D::CHeightMap::SizeX, NL3D::CLandscape::CHeightField::SizeX, NL3D::CHeightMap::SizeY, NL3D::CLandscape::CHeightField::SizeY, NL3D::CLandscape::CBezierPatchZ::Tangents, NL3D::CLandscape::CBezierPatchZ::Vertices, NL3D::CLandscape::CHeightField::Width, and NL3D::CLandscape::CHeightField::ZPatchs.
Referenced by NL3D::CLandscapeUser::setHeightField().
| void NL3D::CLandscape::setNoiseMode | ( | bool | enabled | ) |
Enable the noise or not. NB: only new tesselation computed is modified, so you should call it only at init time.
Definition at line 3254 of file landscape.cpp.
References _NoiseEnabled.
| void NL3D::CLandscape::setPointLightDiffuseMaterial | ( | CRGBA | diffuse | ) |
Setup the equivalent material diffuse component used for both Static and Dynamic PointLights.
Default is White.
Definition at line 3799 of file landscape.cpp.
References _PointLightDiffuseMaterial.
Referenced by NL3D::CLandscapeUser::setPointLightDiffuseMaterial().
| void NL3D::CLandscape::setPointLightFactor | ( | const CScene & | scene | ) |
update the Light factor for all pointLights in All zones, according to scene LightGroups and AnimatedLights.
Definition at line 3506 of file landscape.cpp.
References Zones.
Referenced by NL3D::CLandscapeModel::traverseHrc().
| void NL3D::CLandscape::setPZBModelPosition | ( | const CVector & | pos | ) |
Set the ModelPosition (for Precision ZBuffer purpose).
NB: the model Pos may be floor-ed (for greater float precision). Should be setup to the camera position each frame.
NB: if vertexProgram is used, it is as faster as before (because of geomorph done each frame, and because of VP MAD instruction). NB: if vertexProgram is not used, it is a little slower, because of the substraction.
Definition at line 3074 of file landscape.cpp.
References _PZBModelPosition.
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| void NL3D::CLandscape::setRefineMode | ( | bool | enabled | ) | [inline] |
Definition at line 201 of file landscape.h.
| void NL3D::CLandscape::setThreshold | ( | float | thre | ) |
Set threshold for subdivsion quality. The lower is threshold, the more the landscape is subdivided. Default: 0.001.
Definition at line 325 of file landscape.cpp.
References _MustRefineAllAtNextRefine, _Threshold, and _VPThresholdChange.
Referenced by NL3D::CZoneLighter::addTriangles(), NL3D::CInstanceLighter::addTriangles(), NL3D::CZoneLighter::buildZoneInformation(), NL3D::CZoneLighter::computeTileFlagsOnly(), and NL3D::CLandscapeUser::setThreshold().
| void NL3D::CLandscape::setTileMaxSubdivision | ( | uint | tileDiv | ) |
Set Maximum Tile subdivision. Valid values must be in [0..4] (assert). Default is 0 (for now :) ).
Definition at line 355 of file landscape.cpp.
References _TileMaxSubdivision, forceMergeAtTileLevel(), and nlassert.
Referenced by NL3D::CZoneLighter::addTriangles(), NL3D::CInstanceLighter::addTriangles(), NL3D::CZoneLighter::buildZoneInformation(), NL3D::CZoneLighter::computeTileFlagsOnly(), and NL3D::CLandscapeUser::setTileMaxSubdivision().
| void NL3D::CLandscape::setTileNear | ( | float | tileNear | ) |
Set tile near distance. Default 50.f. maximized to length of Far alpha transition).
Definition at line 339 of file landscape.cpp.
References _FarTransition, _MustRefineAllAtNextRefine, _TileDistNear, and resetRenderFarAndDeleteVBFV().
Referenced by NL3D::CLandscapeUser::setTileNear().
| void NL3D::CLandscape::setupAutomaticLightDir | ( | const CVector & | lightDir | ) |
For automatic near lightmap computing (if enabled): setup the lightdir.
| lightDir | is the direction of the light vector used for the lighting. NB: the vector is normalized. |
Definition at line 2844 of file landscape.cpp.
References _AutomaticLightDir, and NLMISC::CVector::normalize().
| void NL3D::CLandscape::setupColorsFromTileFlags | ( | const NLMISC::CRGBA | colors[4] | ) |
Debug purpose only : setup the colors of the patch of all the currently loaded zones so that it shows which tiles have vegetable disabled, or are above, below water.
User provides a table with 4 colors for each state : color 0 = above water color 1 = underwater color 2 = intersect water color 3 = vegetable disabled
Definition at line 3392 of file landscape.cpp.
References Zones.
| void NL3D::CLandscape::setUpdateLightingFrequency | ( | float | freq | ) |
set the frequency of lighting update.
If freq==1, ALL patchs are updated each second. e.g: if 1/20, then every 20 seconds, all patchs are updated. If you set 0, no update will be done at all (this is the default setup!!).
Definition at line 3573 of file landscape.cpp.
References _ULFrequency.
Referenced by NL3D::CLandscapeUser::setUpdateLightingFrequency().
| void NL3D::CLandscape::setupStaticLight | ( | const CRGBA & | diffuse, | |
| const CRGBA & | ambiant, | |||
| float | multiply | |||
| ) |
Setup the light color use for static illumination.
| diffuse | is the color of the diffuse componante of the lighting. | |
| ambiant | is the color of the ambiante componante of the lighting. | |
| multiply | is the multiply factor. Final color is (diffuse*multiply*shading+ambiant*(1.0-shading)) |
Definition at line 2804 of file landscape.cpp.
References _LightValue, NLMISC::CRGBA::A, NLMISC::CRGBA::B, NLMISC::clamp(), NLMISC::CRGBA::G, and NLMISC::CRGBA::R.
Referenced by CLandscape(), and NL3D::CLandscapeUser::setupStaticLight().
| void NL3D::CLandscape::setupVegetableLighting | ( | const CRGBA & | ambient, | |
| const CRGBA & | diffuse, | |||
| const CVector & | directionalLight | |||
| ) |
setup lighting ambient and diffuse for vegetable.
Definition at line 3335 of file landscape.cpp.
References _VegetableManager, and NL3D::CVegetableManager::setDirectionalLight().
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape(), and NL3D::CLandscapeUser::setupVegetableLighting().
| void NL3D::CLandscape::setVegetableDensity | ( | float | density | ) |
Set a density ratio [0, 1] to possibly reduce the amount of micro vegetable drawn.
Default to 1
Definition at line 3401 of file landscape.cpp.
References _VegetableManager, NL3D::CPatch::deleteAllVegetableIgs(), NL3D::CVegetableManager::getGlobalDensity(), NL3D::CPatch::recreateAllVegetableIgs(), NL3D::CVegetableManager::setGlobalDensity(), and Zones.
Referenced by NL3D::CLandscapeUser::setVegetableDensity().
| void NL3D::CLandscape::setVegetableTime | ( | double | time | ) |
set the vegetable manager Time (in seconds) NB: MOT stuff (called by CLandscapeModel), don't use it.
Definition at line 3350 of file landscape.cpp.
References _VegetableManager, and NL3D::CVegetableManager::setTime().
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| void NL3D::CLandscape::setVegetableUpdateLightingFrequency | ( | float | freq | ) |
set the frequency of Vegetable lighting update.
If freq==1, ALL lighted igs are updated each second. e.g: if 1/20, then every 20 seconds, all Igs are updated. If you set 0, no update will be done at all (this is the default setup!!).
Definition at line 3386 of file landscape.cpp.
References _VegetableManager, and NL3D::CVegetableManager::setUpdateLightingFrequency().
Referenced by NL3D::CLandscapeUser::setVegetableUpdateLightingFrequency().
| void NL3D::CLandscape::setVegetableUpdateLightingTime | ( | double | time | ) |
set the vegetable manager System Time (in seconds) for update lighting NB: MOT stuff (called by CLandscapeModel), don't use it.
Definition at line 3357 of file landscape.cpp.
References _VegetableManager, and NL3D::CVegetableManager::setUpdateLightingTime().
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| void NL3D::CLandscape::setVegetableWind | ( | const CVector & | windDir, | |
| float | windFreq, | |||
| float | windPower, | |||
| float | windBendMin | |||
| ) |
set the vegetable Wind for animation.
All thoses variables may be modified each frame without penalty.
| windDir | is the direction of the wind. NB: only XY direction is kept. | |
| windFreq | is the frequency for the animation (speed) | |
| windPower | is the power of the wind, and is a factor (0..1) of Bend | |
| windBendMin | is a value in (0..1) which indicate how much the vegetables are bended at minimum (for very powerfull wind) |
Definition at line 3342 of file landscape.cpp.
References _VegetableManager, and NL3D::CVegetableManager::setWind().
Referenced by NL3D::CLandscapeUser::setVegetableWind().
| void NL3D::CLandscape::setZFunc | ( | CMaterial::ZFunc | val | ) | [virtual] |
Definition at line 3873 of file landscape.cpp.
References FarMaterial, NL3D::CMaterial::setZFunc(), and TileMaterial.
Referenced by NL3D::CLandscapeUser::setZFunc().
| void NL3D::CLandscape::unlinkPatchFromNearUL | ( | CPatch * | patch | ) | [private] |
Definition at line 3591 of file landscape.cpp.
References _ULNearCurrentTessBlockId, _ULRootNearPatch, NL3D::CPatch::getNextNearUL(), and NL3D::CPatch::unlinkNearUL().
Referenced by NL3D::CPatch::clearTessBlocks().
| void NL3D::CLandscape::unlockBuffers | ( | bool | force = false |
) |
Definition at line 894 of file landscape.cpp.
References _Far0VB, _Far1VB, _LockCount, _TileVB, _VegetableManager, NL3D::CLandscapeVBAllocator::unlockBuffer(), and NL3D::CVegetableManager::unlockBuffers().
Referenced by addZone(), averageTesselationVertices(), NL3D::CZone::changePatchTextureAndColor(), clip(), computeDynamicLighting(), invalidateAllTiles(), refine(), refineAll(), removeZone(), render(), and updateLightingAll().
| void NL3D::CLandscape::updateGlobalsAndLockBuffers | ( | const CVector & | refineCenter | ) | [private] |
Definition at line 811 of file landscape.cpp.
References _Driver, _Far0VB, _Far1VB, _FarTransition, _PZBModelPosition, _Threshold, _TileDistNear, _TileMaxSubdivision, _TileVB, NLMISC::CBSphere::Center, NL3D::CLandscapeGlobals::CurrentFar0VBAllocator, NL3D::CLandscapeGlobals::CurrentFar1VBAllocator, NL3D::CLandscapeGlobals::CurrentTileVBAllocator, NL3D::CLandscapeGlobals::FarTransition, lockBuffers(), NL3D::CLandscapeGlobals::OORefineThreshold, NL3D::CLandscapeGlobals::OOTileDistDeltaSqr, NL3D::CLandscapeGlobals::PZBModelPosition, NLMISC::CBSphere::Radius, NL3D::CLandscapeGlobals::RefineCenter, NL3D::CLandscapeGlobals::RefineThreshold, NLMISC::sqr(), NL3D::CLandscapeGlobals::TileDistFar, NL3D::CLandscapeGlobals::TileDistFarSqr, NL3D::CLandscapeGlobals::TileDistNear, NL3D::CLandscapeGlobals::TileDistNearSqr, NL3D::CLandscapeGlobals::TileFarSphere, NL3D::CLandscapeGlobals::TileMaxSubdivision, NL3D::CLandscapeGlobals::TileNearSphere, NL3D::CLandscapeGlobals::TilePixelBias128, NL3D::CLandscapeGlobals::TilePixelBias256, NL3D::CLandscapeGlobals::TilePixelScale128, NL3D::CLandscapeGlobals::TilePixelScale256, and NL3D::CLandscapeGlobals::TilePixelSize.
Referenced by addZone(), averageTesselationVertices(), NL3D::CZone::changePatchTextureAndColor(), clip(), computeDynamicLighting(), invalidateAllTiles(), refine(), refineAll(), removeZone(), render(), and updateLightingAll().
| void NL3D::CLandscape::updateLighting | ( | double | time | ) |
update the lighting of patch, within a certain amount of time.
called by CLandscapeModel
Definition at line 3517 of file landscape.cpp.
References _ULFrequency, _ULPrecTime, _ULPrecTimeInit, _ULTime, updateLightingTextureFar(), and updateLightingTextureNear().
Referenced by NL3D::CLandscapeModel::clipAndRenderLandscape().
| void NL3D::CLandscape::updateLightingAll | ( | ) |
update the lighting of ALL patch (slow method).
NB: work even if UpdateLightingFrequency==0 Additionaly, vegetables are also ALL updated.
Definition at line 3544 of file landscape.cpp.
References _VegetableManager, NLMISC::CVector::Null, NLMISC::OptFastFloorBegin(), NLMISC::OptFastFloorEnd(), unlockBuffers(), updateGlobalsAndLockBuffers(), NL3D::CVegetableManager::updateLightingAll(), updateLightingTextureFar(), and updateLightingTextureNear().
Referenced by NL3D::CLandscapeUser::updateLightingAll().
| void NL3D::CLandscape::updateLightingTextureFar | ( | float | ratio | ) | [private] |
Update All Far texture, given a ratio along total lumels.
Definition at line 3611 of file landscape.cpp.
References _ULFarPixelsToUpdate, _ULRootTextureFar, _ULTotalFarPixels, NL3D::CTextureFar::endPatchULTouch(), NL3D::CTextureFar::getNextUL(), min, NL3D::CTextureFar::startPatchULTouch(), and NL3D::CTextureFar::touchPatchULAndNext().
Referenced by updateLighting(), and updateLightingAll().
| void NL3D::CLandscape::updateLightingTextureNear | ( | float | ratio | ) | [private] |
Update All Near texture, given a ratio along total lumels.
Definition at line 3646 of file landscape.cpp.
References _ULNearCurrentTessBlockId, _ULNearPixelsToUpdate, _ULRootNearPatch, _ULTotalNearPixels, NL3D::CPatch::getNextNearUL(), NL3D::CPatch::getNumNearTessBlocks(), min, and NL3D::CPatch::updateTessBlockLighting().
Referenced by updateLighting(), and updateLightingAll().
| void NL3D::CLandscape::updateTessBlocksFaceVector | ( | ) | [private] |
Definition at line 913 of file landscape.cpp.
References _TessBlockModificationRoot, NL3D::CTessBlock::getNextToModify(), NL3D::CTessBlock::getPatch(), NL3D::CPatch::recreateTessBlockFaceVector(), and NL3D::CTessBlock::removeFromModifyList().
Referenced by addZone(), averageTesselationVertices(), NL3D::CZone::changePatchTextureAndColor(), clip(), invalidateAllTiles(), refine(), refineAll(), and removeZone().
friend class CPatch [friend] |
Definition at line 655 of file landscape.h.
friend class CTessFace [friend] |
Definition at line 654 of file landscape.h.
friend class CZone [friend] |
Definition at line 656 of file landscape.h.
CVector NL3D::CLandscape::_AutomaticLightDir [private] |
Definition at line 812 of file landscape.h.
Referenced by CLandscape(), and setupAutomaticLightDir().
bool NL3D::CLandscape::_AutomaticLighting [private] |
Definition at line 811 of file landscape.h.
Referenced by CLandscape(), and enableAutomaticLighting().
an approximate value used to simulate diffuse material of vegetables
Definition at line 1009 of file landscape.h.
Referenced by CLandscape(), render(), and setDLMGlobalVegetableColor().
float NL3D::CLandscape::_DLMMaxAttEnd [private] |
Max AttEnd.
Definition at line 1006 of file landscape.h.
Referenced by CLandscape(), computeDynamicLighting(), and setDynamicLightingMaxAttEnd().
CRefPtr<IDriver> NL3D::CLandscape::_Driver [private] |
Definition at line 731 of file landscape.h.
Referenced by clear(), lockBuffers(), render(), setDriver(), and updateGlobalsAndLockBuffers().
bool NL3D::CLandscape::_DriverOkForVegetable [private] |
Tells if the current driver support vegetable.
Definition at line 933 of file landscape.h.
Referenced by CLandscape(), isVegetableActive(), lockBuffers(), and setDriver().
Definition at line 685 of file landscape.h.
Referenced by NL3D::CPatch::createFaceVectorFar0OrTile(), NL3D::CPatch::createFaceVectorFar1(), NL3D::CPatch::deleteFaceVectorFar0OrTile(), and NL3D::CPatch::deleteFaceVectorFar1().
Definition at line 732 of file landscape.h.
Referenced by clear(), lockBuffers(), render(), unlockBuffers(), and updateGlobalsAndLockBuffers().
Definition at line 733 of file landscape.h.
Referenced by clear(), lockBuffers(), render(), unlockBuffers(), and updateGlobalsAndLockBuffers().
bool NL3D::CLandscape::_FarInitialized [private] |
Definition at line 803 of file landscape.h.
Referenced by CLandscape(), and initTileBanks().
float NL3D::CLandscape::_FarTransition [private] |
Definition at line 724 of file landscape.h.
Referenced by CLandscape(), setTileNear(), and updateGlobalsAndLockBuffers().
CHeightField NL3D::CLandscape::_HeightField [private] |
Definition at line 873 of file landscape.h.
Referenced by getHeightFieldDeltaZ(), and setHeightField().
CRGBA NL3D::CLandscape::_LightValue[256] [private] |
Definition at line 809 of file landscape.h.
Referenced by setupStaticLight().
uint NL3D::CLandscape::_LockCount [private] |
Definition at line 735 of file landscape.h.
Referenced by CLandscape(), lockBuffers(), and unlockBuffers().
The priority list of faces which may need to merge.
Definition at line 916 of file landscape.h.
Referenced by CLandscape(), NL3D::CTessFace::doMerge(), refine(), NL3D::CTessFace::split(), NL3D::CTessFace::splitRectangular(), and NL3D::CTessFace::updateRefineMerge().
Definition at line 919 of file landscape.h.
Referenced by CLandscape(), refine(), setThreshold(), and setTileNear().
uint NL3D::CLandscape::_NFreeLightMaps [private] |
Definition at line 785 of file landscape.h.
Referenced by CLandscape(), getTileLightMap(), and releaseTileLightMap().
bool NL3D::CLandscape::_NoiseEnabled [private] |
Noise Geometry.
Definition at line 907 of file landscape.h.
Referenced by CLandscape(), getNoiseMode(), and setNoiseMode().
CVector NL3D::CLandscape::_OldRefineCenter [private] |
OldRefineCenter setuped in prec refine().
Definition at line 918 of file landscape.h.
Referenced by CLandscape(), getTesselatedPos(), and refine().
List of DLM Context.
Definition at line 1002 of file landscape.h.
Referenced by CLandscape(), computeDynamicLighting(), getDynamicLightingMemoryLoad(), render(), and ~CLandscape().
The QuadGrid of patch.
Definition at line 886 of file landscape.h.
Referenced by addZone(), buildPatchBlocksInBBox(), buildTrianglesInBBox(), clear(), computeDynamicLighting(), init(), and removeZone().
const float NL3D::CLandscape::_PatchQuadGridEltSize = 16 [static, private] |
Definition at line 888 of file landscape.h.
Referenced by init().
const uint NL3D::CLandscape::_PatchQuadGridSize = 128 [static, private] |
Definition at line 887 of file landscape.h.
Referenced by init().
The diffuse material of landscape, used for StaticPointLights and DynamicPointLights.
Definition at line 1012 of file landscape.h.
Referenced by CLandscape(), computeDynamicLighting(), render(), and setPointLightDiffuseMaterial().
CVector NL3D::CLandscape::_PZBModelPosition [private] |
Definition at line 950 of file landscape.h.
Referenced by CLandscape(), render(), setPZBModelPosition(), and updateGlobalsAndLockBuffers().
bool NL3D::CLandscape::_RefineMode [private] |
Definition at line 723 of file landscape.h.
Referenced by CLandscape(), and refine().
bool NL3D::CLandscape::_RenderMustRefillVB [private] |
Definition at line 739 of file landscape.h.
Referenced by CLandscape(), NL3D::CZone::refreshTesselationGeometry(), and render().
newTessFace() append the face to _RootNewLeaves.
Definition at line 921 of file landscape.h.
Referenced by newTessFace(), and refine().
Definition at line 1019 of file landscape.h.
Referenced by appendToShadowPolyReceiver(), getCameraCollision(), getRayCollision(), receiveShadowMap(), and removeFromShadowPolyReceiver().
Priority list.
The priority list of faces which may need to split
Definition at line 914 of file landscape.h.
Referenced by CLandscape(), NL3D::CTessFace::doMerge(), refine(), and NL3D::CTessFace::updateRefineSplit().
Definition at line 688 of file landscape.h.
Referenced by averageTesselationVertices(), clip(), and updateTessBlocksFaceVector().
The dynamic lightmap Texture.
Definition at line 998 of file landscape.h.
Referenced by CLandscape(), render(), and ~CLandscape().
Definition at line 1027 of file landscape.h.
Referenced by CLandscape(), and getFarRenderPass().
std::vector<TSPRenderPass> NL3D::CLandscape::_TextureFars [private] |
Definition at line 802 of file landscape.h.
Referenced by clear(), getFarRenderPass(), and render().
Definition at line 1028 of file landscape.h.
Referenced by CLandscape(), and getTileLightMap().
std::vector<TSPRenderPass> NL3D::CLandscape::_TextureNears [private] |
Definition at line 784 of file landscape.h.
Referenced by getTileLightMap(), refillTileLightMap(), releaseTileLightMap(), and render().
Definition at line 1026 of file landscape.h.
Referenced by CLandscape(), and findTileTexture().
float NL3D::CLandscape::_Threshold [private] |
Definition at line 722 of file landscape.h.
Referenced by CLandscape(), getTesselatedPos(), setThreshold(), and updateGlobalsAndLockBuffers().
std::vector<ULandscapeTileCallback *> NL3D::CLandscape::_TileCallbacks [private] |
Definition at line 658 of file landscape.h.
Referenced by addTileCallback(), isTileCallback(), and removeTileCallback().
float NL3D::CLandscape::_TileDistNear [private] |
Definition at line 721 of file landscape.h.
Referenced by CLandscape(), getTesselatedPos(), setTileNear(), and updateGlobalsAndLockBuffers().
uint NL3D::CLandscape::_TileMaxSubdivision [private] |
Definition at line 725 of file landscape.h.
Referenced by CLandscape(), getTileMaxSubdivision(), setTileMaxSubdivision(), and updateGlobalsAndLockBuffers().
Definition at line 734 of file landscape.h.
Referenced by clear(), lockBuffers(), render(), unlockBuffers(), and updateGlobalsAndLockBuffers().
float NL3D::CLandscape::_ULFarPixelsToUpdate [private] |
Current number of far pixels to update. If negative, I have some advance.
Definition at line 967 of file landscape.h.
Referenced by CLandscape(), and updateLightingTextureFar().
float NL3D::CLandscape::_ULFrequency [private] |
Frequency of update.
Definition at line 961 of file landscape.h.
Referenced by CLandscape(), setUpdateLightingFrequency(), and updateLighting().
Current tessBlock id in the current patch processed.
Definition at line 979 of file landscape.h.
Referenced by CLandscape(), unlinkPatchFromNearUL(), and updateLightingTextureNear().
float NL3D::CLandscape::_ULNearPixelsToUpdate [private] |
Current number of near pixels to update. If negative, I have some advance.
Definition at line 975 of file landscape.h.
Referenced by CLandscape(), and updateLightingTextureNear().
double NL3D::CLandscape::_ULPrecTime [private] |
Definition at line 957 of file landscape.h.
Referenced by updateLighting().
bool NL3D::CLandscape::_ULPrecTimeInit [private] |
Definition at line 958 of file landscape.h.
Referenced by CLandscape(), and updateLighting().
CPatch* NL3D::CLandscape::_ULRootNearPatch [private] |
The current patch rendered.
Definition at line 977 of file landscape.h.
Referenced by CLandscape(), linkPatchToNearUL(), unlinkPatchFromNearUL(), and updateLightingTextureNear().
CTextureFar* NL3D::CLandscape::_ULRootTextureFar [private] |
The current TextureFar rendered.
Definition at line 969 of file landscape.h.
Referenced by CLandscape(), clearFarRenderPass(), getFarRenderPass(), and updateLightingTextureFar().
double NL3D::CLandscape::_ULTime [private] |
Definition at line 959 of file landscape.h.
Referenced by updateLighting().
sint NL3D::CLandscape::_ULTotalFarPixels [private] |
Far UpdateLighting.
Definition at line 965 of file landscape.h.
Referenced by CLandscape(), freeFarRenderPass(), getFarRenderPass(), and updateLightingTextureFar().
sint NL3D::CLandscape::_ULTotalNearPixels [private] |
Near UpdateLighting.
Definition at line 973 of file landscape.h.
Referenced by CLandscape(), getTileLightMap(), releaseTileLightMap(), and updateLightingTextureNear().
List of VegetableBlock, to be tested for creation each frame.
Definition at line 936 of file landscape.h.
Referenced by refine().
Micro-Vegetation.
The VegetableManager. (ptr only for include speed).
Definition at line 928 of file landscape.h.
Referenced by NL3D::CPatch::addRefTessBlocks(), CLandscape(), NL3D::CPatch::clearTessBlocks(), createVegetableBlendLayersModels(), enableVegetable(), NL3D::CPatch::generateTileVegetable(), getNumVegetableFaceRendered(), getVegetableDensity(), initTileBanks(), loadVegetableTexture(), lockBuffers(), refine(), render(), setupVegetableLighting(), setVegetableDensity(), setVegetableTime(), setVegetableUpdateLightingFrequency(), setVegetableUpdateLightingTime(), setVegetableWind(), unlockBuffers(), updateLightingAll(), and ~CLandscape().
Tells if the Vegetable Managemnt is enabled.
Definition at line 931 of file landscape.h.
Referenced by CLandscape(), enableVegetable(), and isVegetableActive().
bool NL3D::CLandscape::_VertexShaderOk [private] |
Definition at line 737 of file landscape.h.
Referenced by CLandscape(), getTesselatedPos(), lockBuffers(), render(), and setDriver().
float NL3D::CLandscape::_VPThresholdChange [private] |
Definition at line 727 of file landscape.h.
Referenced by CLandscape(), render(), and setThreshold().
CMaterial NL3D::CLandscape::FarMaterial [private] |
Definition at line 792 of file landscape.h.
Referenced by init(), render(), and setZFunc().
Definition at line 145 of file landscape.h.
Referenced by addZone(), CLandscape(), NL3D::CLandscapeModel::CLandscapeModel(), and render().
Definition at line 663 of file landscape.h.
Referenced by deleteTessFace(), and newTessFace().
Definition at line 666 of file landscape.h.
Referenced by deleteTessFarVertex(), and newTessFarVertex().
Definition at line 665 of file landscape.h.
Referenced by deleteTessNearVertex(), and newTessNearVertex().
Definition at line 664 of file landscape.h.
Referenced by deleteTessVertex(), and newTessVertex().
Definition at line 143 of file landscape.h.
Referenced by NL3D::CPatch::computeDisplaceRawInteger(), enableVegetable(), NL3D::CLandscapeUser::flushTiles(), getTileVegetableDesc(), initTileBanks(), NL3D::CLandscapeUser::loadBankFiles(), loadTile(), NL3D::CLandscapeUser::postfixTileFilename(), and NL3D::CLandscapeUser::postfixTileVegetableDesc().
Definition at line 668 of file landscape.h.
Referenced by deleteTileFace(), and newTileFace().
Definition at line 144 of file landscape.h.
Referenced by NL3D::CPatchDLMContext::computeTextureFar(), eraseTileFarIfNotGood(), getFarRenderPass(), initTileBanks(), and NL3D::CLandscapeUser::loadBankFiles().
std::vector<CTileInfo*> NL3D::CLandscape::TileInfos [private] |
Definition at line 781 of file landscape.h.
Referenced by CLandscape(), flushTiles(), getTileRenderPass(), getTileUvScaleBiasRot(), loadTile(), releaseAllTiles(), releaseTile(), and releaseTiles().
CMaterial NL3D::CLandscape::TileMaterial [private] |
Definition at line 789 of file landscape.h.
Referenced by init(), render(), and setZFunc().
Definition at line 667 of file landscape.h.
Referenced by deleteTileMaterial(), and newTileMaterial().
Definition at line 779 of file landscape.h.
Referenced by findTileRdrPass(), releaseTiles(), and render().
Definition at line 777 of file landscape.h.
Referenced by findTileTexture().
TZoneMap NL3D::CLandscape::Zones [private] |
Definition at line 718 of file landscape.h.
Referenced by addZone(), appendTileLightInfluences(), averageTesselationVertices(), buildCollideFaces(), checkBinds(), clip(), enableVegetable(), excludePatchFromRefineAll(), fillPatchQuadBlock(), forceMergeAtTileLevel(), getLumel(), getTesselatedPos(), getTessellationLeaves(), getTileElement(), getZone(), getZoneList(), initAnimatedLightIndex(), invalidateAllTiles(), refineAll(), releaseAllTiles(), removeAllPointLights(), removeZone(), render(), resetRenderFarAndDeleteVBFV(), setPointLightFactor(), setupColorsFromTileFlags(), and setVegetableDensity().
1.6.1