#include <u_landscape.h>
Inheritance diagram for NL3D::ULandscape:
Nevrax France
Definition at line 70 of file u_landscape.h.
Public Member Functions | |
ShadowMapping | |
virtual bool | canReceiveShadowMap () const=0 |
true if the instance receive shadow. By default false | |
virtual void | enableReceiveShadowMap (bool state)=0 |
Lighting | |
virtual void | enableAdditive (bool enable)=0 |
virtual CRGBA | getPointLightDiffuseMaterial () const=0 |
virtual bool | isAdditiveEnabled () const=0 |
virtual void | setPointLightDiffuseMaterial (CRGBA diffuse)=0 |
virtual void | setUpdateLightingFrequency (float freq)=0 |
virtual void | setupStaticLight (const CRGBA &diffuse, const CRGBA &ambiant, float multiply)=0 |
virtual void | updateLightingAll ()=0 |
virtual void | enableVegetable (bool enable)=0 |
virtual void | loadVegetableTexture (const std::string &textureFileName)=0 |
virtual void | setupVegetableLighting (const CRGBA &ambient, const CRGBA &diffuse, const CVector &directionalLight)=0 |
virtual void | setVegetableUpdateLightingFrequency (float freq)=0 |
virtual void | setVegetableWind (const CVector &windDir, float windFreq, float windPower, float windBendMin)=0 |
Load | |
All those load methods use CPath to search files. | |
virtual void | flushTiles (NLMISC::IProgressCallback &progress)=0 |
Flush the tiles. | |
virtual void | getAllZoneLoaded (std::vector< std::string > &zoneLoaded) const=0 |
virtual void | invalidateAllTiles ()=0 |
Flush the tiles. | |
virtual void | loadAllZonesAround (const CVector &pos, float radius, std::vector< std::string > &zonesAdded)=0 |
virtual void | loadAllZonesAround (const CVector &pos, float radius)=0 |
Load all Zones around a position. This is a blocking call. | |
virtual void | loadBankFiles (const std::string &tileBankFile, const std::string &farBankFile)=0 |
Load the tile banks: the ".bank" and the ".farbank". | |
virtual void | postfixTileFilename (const char *postfix)=0 |
Postfix tile filename. | |
virtual void | postfixTileVegetableDesc (const char *postfix)=0 |
Postfix vegetable filename. | |
virtual void | refreshAllZonesAround (const CVector &pos, float radius, std::vector< std::string > &zonesAdded, std::vector< std::string > &zonesRemoved, NLMISC::IProgressCallback &progress)=0 |
Delete old zones, or load new zones, around a position, until it is finished. This is a blocking call. | |
virtual void | refreshZonesAround (const CVector &pos, float radius, std::string &zoneAdded, std::string &zoneRemoved)=0 |
virtual void | refreshZonesAround (const CVector &pos, float radius)=0 |
Delete old zones, or load new zones, around a position. new Zones are loaded async. | |
virtual void | removeAllZones ()=0 |
Flush the tiles. | |
virtual void | setZonePath (const std::string &zonePath)=0 |
Set the zonePath from where zones are loaded. | |
Dynamic Lighting management | |
virtual CRGBA | getDLMGlobalVegetableColor () const=0 |
virtual void | setDLMGlobalVegetableColor (CRGBA gvc)=0 |
HeightField DeltaZ. | |
virtual CVector | getHeightFieldDeltaZ (float x, float y) const=0 |
return the HeightField DeltaZ for the 2D position. (0,0,dZ) is returned. | |
virtual void | setHeightField (const CHeightMap &hf)=0 |
Misc | |
virtual bool | getRefineCenterAuto () const=0 |
virtual const CVector & | getRefineCenterUser () const=0 |
virtual std::string | getZoneName (const CVector &pos)=0 |
Return the name of the zone around a particular position (in NL3D basis!). | |
virtual void | hide ()=0 |
hide the landscape. It is nor refined, nor rendered (=> take 0 CPU time). | |
virtual void | setRefineCenterAuto (bool mode)=0 |
virtual void | setRefineCenterUser (const CVector &refineCenter)=0 |
setRefineCenterAuto | |
virtual void | show ()=0 |
show the landscape. visible by default. | |
Parameters | |
virtual float | getThreshold () const=0 |
Get threshold. | |
virtual uint | getTileMaxSubdivision ()=0 |
Get Maximum Tile subdivision. | |
virtual float | getTileNear () const=0 |
Get tile near distance. | |
virtual void | setThreshold (float thre)=0 |
Set threshold for subdivsion quality. The lower is threshold, the more the landscape is subdivided. Default: 0.001. | |
virtual void | setTileColor (bool mono, float factor)=0 |
Set all zones monochromatic or colored. | |
virtual void | setTileMaxSubdivision (uint tileDiv)=0 |
Set Maximum Tile subdivision. Valid values must be in [0..4] (assert). Default is 0 (for now :) ). | |
virtual void | setTileNear (float tileNear)=0 |
Set tile near distance. Default 50.f. maximized to length of Far alpha transition). | |
Tile added/removed callback | |
virtual ULandscapeTileCallback * | getTileCallback () const=0 |
virtual void | setTileCallback (ULandscapeTileCallback *cb)=0 |
Protected Member Functions | |
Object | |
protected because created/deleted by UScene. | |
ULandscape () | |
virtual | ~ULandscape () |
|
Definition at line 77 of file u_landscape.h.
00077 {} |
|
Definition at line 78 of file u_landscape.h.
00078 {} |
|
true if the instance receive shadow. By default false
Implemented in NL3D::CLandscapeUser. |
|
Set additive Lighting. Disabled by default.
Implemented in NL3D::CLandscapeUser. |
|
By default, map shadow receiving is disabled. This enabled shadow for this model. Fails if the model don't support dynamic Map Shadow Receiving (eg Particle system) Implemented in NL3D::CLandscapeUser. |
|
enable the vegetable management in landscape. Valid only if Hardware support VertexShader. Implemented in NL3D::CLandscapeUser. |
|
Flush the tiles.
Implemented in NL3D::CLandscapeUser. |
|
Get list of zones currently loaded in landscape. array of name of the zones added, without extension (eg: "150_EM"). Implemented in NL3D::CLandscapeUser. |
|
see setDLMGlobalVegetableColor() Implemented in NL3D::CLandscapeUser. |
|
return the HeightField DeltaZ for the 2D position. (0,0,dZ) is returned.
Implemented in NL3D::CLandscapeUser. |
|
Implemented in NL3D::CLandscapeUser. |
|
Implemented in NL3D::CLandscapeUser. |
|
Implemented in NL3D::CLandscapeUser. |
|
Get threshold.
Implemented in NL3D::CLandscapeUser. |
|
Implemented in NL3D::CLandscapeUser. |
|
Get Maximum Tile subdivision.
Implemented in NL3D::CLandscapeUser. |
|
Get tile near distance.
Implemented in NL3D::CLandscapeUser. |
|
Return the name of the zone around a particular position (in NL3D basis!).
Implemented in NL3D::CLandscapeUser. |
|
hide the landscape. It is nor refined, nor rendered (=> take 0 CPU time).
Implemented in NL3D::CLandscapeUser. |
|
Flush the tiles.
Implemented in NL3D::CLandscapeUser. |
|
Get additive Lighting
Implemented in NL3D::CLandscapeUser. |
|
Load all Zones around a position. This is a blocking call. array of name of the zones added, without extension (eg: "150_EM"). Implemented in NL3D::CLandscapeUser. |
|
Load all Zones around a position. This is a blocking call.
Implemented in NL3D::CLandscapeUser. |
|
Load the tile banks: the ".bank" and the ".farbank".
Implemented in NL3D::CLandscapeUser. |
|
load a texture for the vegetable, lookup in CPath Implemented in NL3D::CLandscapeUser. |
|
Postfix tile filename.
Implemented in NL3D::CLandscapeUser. |
|
Postfix vegetable filename.
Implemented in NL3D::CLandscapeUser. |
|
Delete old zones, or load new zones, around a position, until it is finished. This is a blocking call.
Implemented in NL3D::CLandscapeUser. |
|
Delete old zones, or load new zones, around a position. new Zones are loaded async. This method add or remove only one zone at a time. name of the zone removed, without extension (eg: "150_EM"). "" if none. name of the zone added, without extension (eg: "150_EM"). "" if none. Implemented in NL3D::CLandscapeUser. |
|
Delete old zones, or load new zones, around a position. new Zones are loaded async.
Implemented in NL3D::CLandscapeUser. |
|
Flush the tiles.
Implemented in NL3D::CLandscapeUser. |
|
For Vegetable Dynamic ligthing only: this is an approximate color of all vegetables. Default is (180, 180, 180). Implemented in NL3D::CLandscapeUser. |
|
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). Implemented in NL3D::CLandscapeUser. |
|
Setup the equivalent material diffuse component used for both Static and Dynamic PointLights. Default is White. Implemented in NL3D::CLandscapeUser. |
|
if true, the refine Center is auto computed each frame from Camera Position. Else must be given by setRefineCenterUser() Default to true. Implemented in NL3D::CLandscapeUser. |
|
setRefineCenterAuto
Implemented in NL3D::CLandscapeUser. |
|
Set threshold for subdivsion quality. The lower is threshold, the more the landscape is subdivided. Default: 0.001.
Implemented in NL3D::CLandscapeUser. |
|
Implemented in NL3D::CLandscapeUser. |
|
Set all zones monochromatic or colored.
Implemented in NL3D::CLandscapeUser. |
|
Set Maximum Tile subdivision. Valid values must be in [0..4] (assert). Default is 0 (for now :) ).
Implemented in NL3D::CLandscapeUser. |
|
Set tile near distance. Default 50.f. maximized to length of Far alpha transition).
Implemented in NL3D::CLandscapeUser. |
|
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!!). Implemented in NL3D::CLandscapeUser. |
|
Setup the light color use for static illumination. NB: This setup will be visible only for new texture far/near computed (when player move or see dynamic lighting).
Implemented in NL3D::CLandscapeUser. |
|
setup lighting ambient and diffuse for vegetable. Implemented in NL3D::CLandscapeUser. |
|
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!!). Implemented in NL3D::CLandscapeUser. |
|
set the vegetable Wind for animation. All thoses variables may be modified each frame without penalty.
Implemented in NL3D::CLandscapeUser. |
|
Set the zonePath from where zones are loaded.
Implemented in NL3D::CLandscapeUser. |
|
show the landscape. visible by default.
Implemented in NL3D::CLandscapeUser. |
|
update the lighting of ALL patch (slow method). NB: work even if UpdateLightingFrequency==0 Additionaly, vegetables are also ALL updated. WARNING!! If Scene Lighting is enabled (usual case), vegetable lighting setup take last Sun setup at UScene::render(). Hence, you should force the new lighting setup with ULandscape::setupVegetableLighting(), before calling updateLightingAll(). Implemented in NL3D::CLandscapeUser. |