From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/classNL3D_1_1ULandscape.html | 1536 +++++++++++++++++++++++++ 1 file changed, 1536 insertions(+) create mode 100644 docs/doxygen/nel/classNL3D_1_1ULandscape.html (limited to 'docs/doxygen/nel/classNL3D_1_1ULandscape.html') diff --git a/docs/doxygen/nel/classNL3D_1_1ULandscape.html b/docs/doxygen/nel/classNL3D_1_1ULandscape.html new file mode 100644 index 00000000..5573dd0e --- /dev/null +++ b/docs/doxygen/nel/classNL3D_1_1ULandscape.html @@ -0,0 +1,1536 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NL3D::ULandscape Class Reference

Game Interface for manipulate Landscape. +More... +

+#include <u_landscape.h> +

+

Inheritance diagram for NL3D::ULandscape: +

+ +NL3D::CLandscapeUser + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Methods

Load
virtual void setZonePath (const std::string &zonePath)=0
 Set the zonePath from where zones are loaded. More...

virtual void loadBankFiles (const std::string &tileBankFile, const std::string &farBankFile)=0
 Load the tile banks: the ".bank" and the ".farbank". More...

virtual void loadAllZonesAround (const CVector &pos, float radius)=0
 Load all Zones around a position. This is a blocking call. More...

virtual void loadAllZonesAround (const CVector &pos, float radius, std::vector< std::string > &zonesAdded)=0
 Load all Zones around a position. More...

virtual void refreshZonesAround (const CVector &pos, float radius)=0
 Delete old zones, or load new zones, around a position. new Zones are loaded async. More...

virtual void refreshZonesAround (const CVector &pos, float radius, std::string &zoneAdded, std::string &zoneRemoved)=0
 Delete old zones, or load new zones, around a position. More...

virtual void refreshAllZonesAround (const CVector &pos, float radius, std::vector< std::string > &zonesAdded, std::vector< std::string > &zonesRemoved)=0
 Delete old zones, or load new zones, around a position, until it is finished. This is a blocking call. More...

virtual void getAllZoneLoaded (std::vector< std::string > &zoneLoaded) const=0
 Get list of zones currently loaded in landscape. More...

Lighting
virtual void setupStaticLight (const CRGBA &diffuse, const CRGBA &ambiant, float multiply)=0
 Setup the light color use for static illumination. More...

virtual void setPointLightDiffuseMaterial (CRGBA diffuse)=0
 Setup the equivalent material diffuse component used for both Static and Dynamic PointLights. More...

virtual CRGBA getPointLightDiffuseMaterial () const=0
virtual void setPointLightFactor (const std::string &lightGroupName, NLMISC::CRGBA nFactor)=0
 set the Light factor for all pointLights in All zones with LightGroupName= "lightGroupName". More...

virtual void setUpdateLightingFrequency (float freq)=0
 Set the frequency of lighting update. More...

virtual void updateLightingAll ()=0
 update the lighting of ALL patch (slow method). More...

virtual void enableAdditive (bool enable)=0
 Set additive Lighting. More...

virtual bool isAdditiveEnabled () const=0
 Get additive Lighting. More...

Parameters
virtual void setThreshold (float thre)=0
 Set threshold for subdivsion quality. The lower is threshold, the more the landscape is subdivided. Default: 0.001. More...

virtual float getThreshold () const=0
 Get threshold. More...

virtual void setTileNear (float tileNear)=0
 Set tile near distance. Default 50.f. maximized to length of Far alpha transition). More...

virtual float getTileNear () const=0
 Get tile near distance. More...

virtual void setTileMaxSubdivision (uint tileDiv)=0
 Set Maximum Tile subdivision. Valid values must be in [0..4] (assert). Default is 0 (for now :) ). More...

virtual uint getTileMaxSubdivision ()=0
 Get Maximum Tile subdivision. More...

Misc
virtual std::string getZoneName (const CVector &pos)=0
 Return the name of the zone around a particular position (in NL3D basis!). More...

virtual void show ()=0
 show the landscape. visible by default. More...

virtual void hide ()=0
 hide the landscape. It is nor refined, nor rendered (=> take 0 CPU time). More...

HeightField DeltaZ.
virtual CVector getHeightFieldDeltaZ (float x, float y) const=0
 return the HeightField DeltaZ for the 2D position. (0,0,dZ) is returned. More...

virtual void setHeightField (const CHeightMap &hf)=0
 set the HeightField data. More...

virtual void enableVegetable (bool enable)=0
 enable the vegetable management in landscape. More...

virtual void loadVegetableTexture (const std::string &textureFileName)=0
 load a texture for the vegetable, lookup in CPath. More...

virtual void setupVegetableLighting (const CRGBA &ambient, const CRGBA &diffuse, const CVector &directionalLight)=0
 setup lighting ambient and diffuse for vegetable. More...

virtual void setVegetableWind (const CVector &windDir, float windFreq, float windPower, float windBendMin)=0
 set the vegetable Wind for animation. More...

virtual void setVegetableUpdateLightingFrequency (float freq)=0
 set the frequency of Vegetable lighting update. More...

Dynamic Lighting management
virtual void setDLMGlobalVegetableColor (CRGBA gvc)=0
 For Vegetable Dynamic ligthing only: this is an approximate color of all vegetables. More...

virtual CRGBA getDLMGlobalVegetableColor () const=0
 see setDLMGlobalVegetableColor(). More...


Protected Methods

Object
 ULandscape ()
virtual ~ULandscape ()
+

Detailed Description

+Game Interface for manipulate Landscape. +

+

+Author:
+Lionel Berenguier , Nevrax France
+Date:
+2001
+

+ +

+Definition at line 51 of file u_landscape.h.


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::ULandscape::ULandscape   [inline, protected]
+
+ + + + + +
+   + + +

+ +

+Definition at line 58 of file u_landscape.h.

+

+ + + + +
+ + + + + + + + + +
virtual NL3D::ULandscape::~ULandscape   [inline, protected, virtual]
+
+ + + + + +
+   + + +

+ +

+Definition at line 59 of file u_landscape.h.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::enableAdditive bool   enable [pure virtual]
+
+ + + + + +
+   + + +

+Set additive Lighting. +

+Disabled by default.

+Parameters:
+ + +
enable  +is true to activbe additive, false to disactive it.
+
+

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::enableVegetable bool   enable [pure virtual]
+
+ + + + + +
+   + + +

+enable the vegetable management in landscape. +

+Valid only if Hardware support VertexShader. +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::getAllZoneLoaded std::vector< std::string > &   zoneLoaded const [pure virtual]
+
+ + + + + +
+   + + +

+Get list of zones currently loaded in landscape. +

+\zonesLoaded array of name of the zones added, without extension (eg: "150_EM"). +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + +
virtual CRGBA NL3D::ULandscape::getDLMGlobalVegetableColor   const [pure virtual]
+
+ + + + + +
+   + + +

+see setDLMGlobalVegetableColor(). +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual CVector NL3D::ULandscape::getHeightFieldDeltaZ float   x,
float   y
const [pure virtual]
+
+ + + + + +
+   + + +

+return the HeightField DeltaZ for the 2D position. (0,0,dZ) is returned. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + +
virtual CRGBA NL3D::ULandscape::getPointLightDiffuseMaterial   const [pure virtual]
+
+ + + + + +
+   + + +

+

+See also:
+setPointLightDiffuseMaterial
+

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + +
virtual float NL3D::ULandscape::getThreshold   const [pure virtual]
+
+ + + + + +
+   + + +

+Get threshold. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + +
virtual uint NL3D::ULandscape::getTileMaxSubdivision   [pure virtual]
+
+ + + + + +
+   + + +

+Get Maximum Tile subdivision. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + +
virtual float NL3D::ULandscape::getTileNear   const [pure virtual]
+
+ + + + + +
+   + + +

+Get tile near distance. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual std::string NL3D::ULandscape::getZoneName const CVector &   pos [pure virtual]
+
+ + + + + +
+   + + +

+Return the name of the zone around a particular position (in NL3D basis!). +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::ULandscape::hide   [pure virtual]
+
+ + + + + +
+   + + +

+hide the landscape. It is nor refined, nor rendered (=> take 0 CPU time). +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + +
virtual bool NL3D::ULandscape::isAdditiveEnabled   const [pure virtual]
+
+ + + + + +
+   + + +

+Get additive Lighting. +

+

+Returns:
+true to if additive is actived, else false.
+

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::loadAllZonesAround const CVector &   pos,
float   radius,
std::vector< std::string > &   zonesAdded
[pure virtual]
+
+ + + + + +
+   + + +

+Load all Zones around a position. +

+This is a blocking call. \zonesAdded array of name of the zones added, without extension (eg: "150_EM"). +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::loadAllZonesAround const CVector &   pos,
float   radius
[pure virtual]
+
+ + + + + +
+   + + +

+Load all Zones around a position. This is a blocking call. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::loadBankFiles const std::string &   tileBankFile,
const std::string &   farBankFile
[pure virtual]
+
+ + + + + +
+   + + +

+Load the tile banks: the ".bank" and the ".farbank". +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::loadVegetableTexture const std::string &   textureFileName [pure virtual]
+
+ + + + + +
+   + + +

+load a texture for the vegetable, lookup in CPath. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::refreshAllZonesAround const CVector &   pos,
float   radius,
std::vector< std::string > &   zonesAdded,
std::vector< std::string > &   zonesRemoved
[pure virtual]
+
+ + + + + +
+   + + +

+Delete old zones, or load new zones, around a position, until it is finished. This is a blocking call. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::refreshZonesAround const CVector &   pos,
float   radius,
std::string &   zoneAdded,
std::string &   zoneRemoved
[pure virtual]
+
+ + + + + +
+   + + +

+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. \zoneRemoved name of the zone removed, without extension (eg: "150_EM"). "" if none. \zoneAdded name of the zone added, without extension (eg: "150_EM"). "" if none. +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::refreshZonesAround const CVector &   pos,
float   radius
[pure virtual]
+
+ + + + + +
+   + + +

+Delete old zones, or load new zones, around a position. new Zones are loaded async. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::setDLMGlobalVegetableColor CRGBA   gvc [pure virtual]
+
+ + + + + +
+   + + +

+For Vegetable Dynamic ligthing only: this is an approximate color of all vegetables. +

+Default is (180, 180, 180). +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::setHeightField const CHeightMap  hf [pure virtual]
+
+ + + + + +
+   + + +

+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.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::setPointLightDiffuseMaterial CRGBA   diffuse [pure virtual]
+
+ + + + + +
+   + + +

+Setup the equivalent material diffuse component used for both Static and Dynamic PointLights. +

+Default is White. +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::setPointLightFactor const std::string &   lightGroupName,
NLMISC::CRGBA   nFactor
[pure virtual]
+
+ + + + + +
+   + + +

+set the Light factor for all pointLights in All zones with LightGroupName= "lightGroupName". +

+Additionaly, it stores a map<lightGroupName, NLMISC::CRGBA nFactor>, so each added zone will be correclty assigned. +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::setThreshold float   thre [pure virtual]
+
+ + + + + +
+   + + +

+Set threshold for subdivsion quality. The lower is threshold, the more the landscape is subdivided. Default: 0.001. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::setTileMaxSubdivision uint   tileDiv [pure virtual]
+
+ + + + + +
+   + + +

+Set Maximum Tile subdivision. Valid values must be in [0..4] (assert). Default is 0 (for now :) ). +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::setTileNear float   tileNear [pure virtual]
+
+ + + + + +
+   + + +

+Set tile near distance. Default 50.f. maximized to length of Far alpha transition). +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::setUpdateLightingFrequency float   freq [pure virtual]
+
+ + + + + +
+   + + +

+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.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::setupStaticLight const CRGBA &   diffuse,
const CRGBA &   ambiant,
float   multiply
[pure virtual]
+
+ + + + + +
+   + + +

+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).

+Parameters:
+ + + + +
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))
+
+

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::setupVegetableLighting const CRGBA &   ambient,
const CRGBA &   diffuse,
const CVector &   directionalLight
[pure virtual]
+
+ + + + + +
+   + + +

+setup lighting ambient and diffuse for vegetable. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::setVegetableUpdateLightingFrequency float   freq [pure virtual]
+
+ + + + + +
+   + + +

+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.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::ULandscape::setVegetableWind const CVector &   windDir,
float   windFreq,
float   windPower,
float   windBendMin
[pure virtual]
+
+ + + + + +
+   + + +

+set the vegetable Wind for animation. +

+All thoses variables may be modified each frame without penalty.

+Parameters:
+ + + + + +
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)
+
+

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::ULandscape::setZonePath const std::string &   zonePath [pure virtual]
+
+ + + + + +
+   + + +

+Set the zonePath from where zones are loaded. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::ULandscape::show   [pure virtual]
+
+ + + + + +
+   + + +

+show the landscape. visible by default. +

+ +

+Implemented in NL3D::CLandscapeUser.

+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::ULandscape::updateLightingAll   [pure virtual]
+
+ + + + + +
+   + + +

+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.

+


The documentation for this class was generated from the following file: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1