|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CLandscapeUser Class ReferenceULandscape Implementation.
More...
#include <landscape_user.h>
Inheritance diagram for NL3D::CLandscapeUser:
List of all members.
Public Methods |
|
| CLandscapeUser (CScene *scene) |
virtual | ~CLandscapeUser () |
|
virtual void | setZonePath (const std::string &zonePath) |
| Set the zonePath from where zones are loaded. More...
|
virtual void | loadBankFiles (const std::string &tileBankFile, const std::string &farBankFile) |
| Load the tile banks: the ".bank" and the ".farbank". More...
|
virtual void | loadAllZonesAround (const CVector &pos, float radius) |
| Load all Zones around a position. Call at init only!! (no zone must exist before). This is a blocking call. More...
|
virtual void | loadAllZonesAround (const CVector &pos, float radius, std::vector< std::string > &zonesAdded) |
| Load all Zones around a position. More...
|
virtual void | refreshZonesAround (const CVector &pos, float radius) |
| 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) |
| 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) |
| 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 |
| Get list of zones currently loaded in landscape. More...
|
|
virtual void | setupStaticLight (const CRGBA &diffuse, const CRGBA &ambiant, float multiply) |
| Setup the light color use for static illumination. More...
|
virtual void | setPointLightDiffuseMaterial (CRGBA diffuse) |
| Setup the equivalent material diffuse component used for both Static and Dynamic PointLights. More...
|
virtual CRGBA | getPointLightDiffuseMaterial () const |
virtual void | setPointLightFactor (const std::string &lightGroupName, NLMISC::CRGBA nFactor) |
| set the Light factor for all pointLights in All zones with LightGroupName= "lightGroupName". More...
|
virtual void | setUpdateLightingFrequency (float freq) |
| Set the frequency of lighting update. More...
|
virtual void | updateLightingAll () |
| update the lighting of ALL patch (slow method). More...
|
|
virtual void | setThreshold (float thre) |
| Set threshold for subdivsion quality. The lower is threshold, the more the landscape is subdivided. Default: 0.001. More...
|
virtual float | getThreshold () const |
| Get threshold. More...
|
virtual void | setTileNear (float tileNear) |
| Set tile near distance. Default 50.f. maximized to length of Far alpha transition). More...
|
virtual float | getTileNear () const |
| Get tile near distance. More...
|
virtual void | setTileMaxSubdivision (uint tileDiv) |
| Set Maximum Tile subdivision. Valid values must be in [0..4] (assert). Default is 0 (for now :) ). More...
|
virtual uint | getTileMaxSubdivision () |
| Get Maximum Tile subdivision. More...
|
|
virtual std::string | getZoneName (const CVector &pos) |
| Return the name of the zone around a particular position (in NL3D basis!). More...
|
virtual void | show () |
| show the landscape. visible by default. More...
|
virtual void | hide () |
| hide the landscape. It is nor refined, nor rendered (=> take 0 CPU time). More...
|
virtual void | enableAdditive (bool enable) |
| Set additive Lighting. More...
|
virtual bool | isAdditiveEnabled () const |
| Get additive Lighting. More...
|
|
virtual CVector | getHeightFieldDeltaZ (float x, float y) const |
| return the HeightField DeltaZ for the 2D position. (0,0,dZ) is returned. More...
|
virtual void | setHeightField (const CHeightMap &hf) |
| set the HeightField data. More...
|
|
virtual void | enableVegetable (bool enable) |
| enable the vegetable management in landscape. More...
|
virtual void | loadVegetableTexture (const std::string &textureFileName) |
| load a texture for the vegetable, lookup in CPath. More...
|
virtual void | setupVegetableLighting (const CRGBA &ambient, const CRGBA &diffuse, const CVector &directionalLight) |
| setup lighting ambient and diffuse for vegetable. More...
|
virtual void | setVegetableWind (const CVector &windDir, float windFreq, float windPower, float windBendMin) |
| set the vegetable Wind for animation. More...
|
virtual void | setVegetableUpdateLightingFrequency (float freq) |
| set the frequency of Vegetable lighting update. More...
|
|
virtual void | setDLMGlobalVegetableColor (CRGBA gvc) |
| For Vegetable Dynamic ligthing only: this is an approximate color of all vegetables. More...
|
virtual CRGBA | getDLMGlobalVegetableColor () const |
| see setDLMGlobalVegetableColor(). More...
|
|
CLandscapeModel * | getLandscape () |
Private Attributes |
CScene * | _Scene |
CLandscapeModel * | _Landscape |
CZoneManager | _ZoneManager |
Detailed Description
ULandscape Implementation.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 48 of file landscape_user.h.
Constructor & Destructor Documentation
NL3D::CLandscapeUser::CLandscapeUser |
( |
CScene * |
scene |
) |
[inline] |
|
virtual NL3D::CLandscapeUser::~CLandscapeUser |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
void NL3D::CLandscapeUser::enableAdditive |
( |
bool |
enable |
) |
[virtual] |
|
void NL3D::CLandscapeUser::enableVegetable |
( |
bool |
enable |
) |
[virtual] |
|
void NL3D::CLandscapeUser::getAllZoneLoaded |
( |
std::vector< std::string > & |
zoneLoaded |
) |
const [virtual] |
|
CRGBA NL3D::CLandscapeUser::getDLMGlobalVegetableColor |
( |
|
) |
const [virtual] |
|
CVector NL3D::CLandscapeUser::getHeightFieldDeltaZ |
( |
float |
x, |
|
|
float |
y |
|
) |
const [virtual] |
|
CRGBA NL3D::CLandscapeUser::getPointLightDiffuseMaterial |
( |
|
) |
const [virtual] |
|
float NL3D::CLandscapeUser::getThreshold |
( |
|
) |
const [virtual] |
|
uint NL3D::CLandscapeUser::getTileMaxSubdivision |
( |
|
) |
[virtual] |
|
float NL3D::CLandscapeUser::getTileNear |
( |
|
) |
const [virtual] |
|
std::string NL3D::CLandscapeUser::getZoneName |
( |
const CVector & |
pos |
) |
[virtual] |
|
virtual void NL3D::CLandscapeUser::hide |
( |
|
) |
[inline, virtual] |
|
bool NL3D::CLandscapeUser::isAdditiveEnabled |
( |
|
) |
const [virtual] |
|
void NL3D::CLandscapeUser::loadAllZonesAround |
( |
const CVector & |
pos, |
|
|
float |
radius, |
|
|
std::vector< std::string > & |
zonesAdded |
|
) |
[virtual] |
|
void NL3D::CLandscapeUser::loadAllZonesAround |
( |
const CVector & |
pos, |
|
|
float |
radius |
|
) |
[virtual] |
|
|
Load all Zones around a position. Call at init only!! (no zone must exist before). This is a blocking call.
Implements NL3D::ULandscape.
Definition at line 187 of file landscape_user.cpp. |
void NL3D::CLandscapeUser::loadBankFiles |
( |
const std::string & |
tileBankFile, |
|
|
const std::string & |
farBankFile |
|
) |
[virtual] |
|
void NL3D::CLandscapeUser::loadVegetableTexture |
( |
const std::string & |
textureFileName |
) |
[virtual] |
|
void NL3D::CLandscapeUser::refreshAllZonesAround |
( |
const CVector & |
pos, |
|
|
float |
radius, |
|
|
std::vector< std::string > & |
zonesAdded, |
|
|
std::vector< std::string > & |
zonesRemoved |
|
) |
[virtual] |
|
void NL3D::CLandscapeUser::refreshZonesAround |
( |
const CVector & |
pos, |
|
|
float |
radius, |
|
|
std::string & |
zoneAdded, |
|
|
std::string & |
zoneRemoved |
|
) |
[virtual] |
|
void NL3D::CLandscapeUser::refreshZonesAround |
( |
const CVector & |
pos, |
|
|
float |
radius |
|
) |
[virtual] |
|
void NL3D::CLandscapeUser::setDLMGlobalVegetableColor |
( |
CRGBA |
gvc |
) |
[virtual] |
|
void NL3D::CLandscapeUser::setHeightField |
( |
const CHeightMap & |
hf |
) |
[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).
Implements NL3D::ULandscape.
Definition at line 327 of file landscape_user.cpp.
References _Landscape, and NL3D_HAUTO_UI_LANDSCAPE. |
void NL3D::CLandscapeUser::setPointLightDiffuseMaterial |
( |
CRGBA |
diffuse |
) |
[virtual] |
|
void NL3D::CLandscapeUser::setPointLightFactor |
( |
const std::string & |
lightGroupName, |
|
|
NLMISC::CRGBA |
nFactor |
|
) |
[virtual] |
|
void NL3D::CLandscapeUser::setThreshold |
( |
float |
thre |
) |
[virtual] |
|
void NL3D::CLandscapeUser::setTileMaxSubdivision |
( |
uint |
tileDiv |
) |
[virtual] |
|
void NL3D::CLandscapeUser::setTileNear |
( |
float |
tileNear |
) |
[virtual] |
|
void NL3D::CLandscapeUser::setUpdateLightingFrequency |
( |
float |
freq |
) |
[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!!).
Implements NL3D::ULandscape.
Definition at line 385 of file landscape_user.cpp.
References _Landscape, and NL3D_HAUTO_UI_LANDSCAPE. |
void NL3D::CLandscapeUser::setupStaticLight |
( |
const CRGBA & |
diffuse, |
|
|
const CRGBA & |
ambiant, |
|
|
float |
multiply |
|
) |
[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)) |
Implements NL3D::ULandscape.
Definition at line 256 of file landscape_user.cpp.
References _Landscape, and NL3D_HAUTO_UI_LANDSCAPE. |
void NL3D::CLandscapeUser::setupVegetableLighting |
( |
const CRGBA & |
ambient, |
|
|
const CRGBA & |
diffuse, |
|
|
const CVector & |
directionalLight |
|
) |
[virtual] |
|
void NL3D::CLandscapeUser::setVegetableUpdateLightingFrequency |
( |
float |
freq |
) |
[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!!).
Implements NL3D::ULandscape.
Definition at line 368 of file landscape_user.cpp.
References _Landscape, and NL3D_HAUTO_UI_LANDSCAPE. |
void NL3D::CLandscapeUser::setVegetableWind |
( |
const CVector & |
windDir, |
|
|
float |
windFreq, |
|
|
float |
windPower, |
|
|
float |
windBendMin |
|
) |
[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) |
Implements NL3D::ULandscape.
Definition at line 360 of file landscape_user.cpp.
References _Landscape, and NL3D_HAUTO_UI_LANDSCAPE. |
void NL3D::CLandscapeUser::setZonePath |
( |
const std::string & |
zonePath |
) |
[virtual] |
|
virtual void NL3D::CLandscapeUser::show |
( |
|
) |
[inline, virtual] |
|
void NL3D::CLandscapeUser::updateLightingAll |
( |
|
) |
[virtual] |
|
Member Data Documentation
|
Definition at line 54 of file landscape_user.h.
Referenced by CLandscapeUser, enableAdditive, enableVegetable, getAllZoneLoaded, getDLMGlobalVegetableColor, getHeightFieldDeltaZ, getLandscape, getPointLightDiffuseMaterial, getThreshold, getTileMaxSubdivision, getTileNear, hide, isAdditiveEnabled, loadAllZonesAround, loadBankFiles, loadVegetableTexture, refreshZonesAround, setDLMGlobalVegetableColor, setHeightField, setPointLightDiffuseMaterial, setPointLightFactor, setThreshold, setTileMaxSubdivision, setTileNear, setUpdateLightingFrequency, setupStaticLight, setupVegetableLighting, setVegetableUpdateLightingFrequency, setVegetableWind, show, updateLightingAll, and ~CLandscapeUser. |
CScene* NL3D::CLandscapeUser::_Scene [private]
|
|
The documentation for this class was generated from the following files:
|
|