|
|
|
|
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 ReferenceGame Interface for manipulate Landscape.
More...
#include <u_landscape.h>
Inheritance diagram for NL3D::ULandscape:
List of all members.
Public Methods |
|
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...
|
|
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...
|
|
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...
|
|
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...
|
|
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...
|
|
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 |
|
| 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] |
|
virtual NL3D::ULandscape::~ULandscape |
( |
|
) |
[inline, protected, virtual] |
|
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] |
|
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] |
|
virtual float NL3D::ULandscape::getThreshold |
( |
|
) |
const [pure virtual] |
|
virtual uint NL3D::ULandscape::getTileMaxSubdivision |
( |
|
) |
[pure virtual] |
|
virtual float NL3D::ULandscape::getTileNear |
( |
|
) |
const [pure virtual] |
|
virtual std::string NL3D::ULandscape::getZoneName |
( |
const CVector & |
pos |
) |
[pure virtual] |
|
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] |
|
virtual void NL3D::ULandscape::loadBankFiles |
( |
const std::string & |
tileBankFile, |
|
|
const std::string & |
farBankFile |
|
) |
[pure virtual] |
|
virtual void NL3D::ULandscape::loadVegetableTexture |
( |
const std::string & |
textureFileName |
) |
[pure virtual] |
|
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] |
|
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] |
|
virtual void NL3D::ULandscape::show |
( |
|
) |
[pure virtual] |
|
virtual void NL3D::ULandscape::updateLightingAll |
( |
|
) |
[pure virtual] |
|
The documentation for this class was generated from the following file:
|
|