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/a03724.html | 3949 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3949 insertions(+) create mode 100644 docs/doxygen/nel/a03724.html (limited to 'docs/doxygen/nel/a03724.html') diff --git a/docs/doxygen/nel/a03724.html b/docs/doxygen/nel/a03724.html new file mode 100644 index 00000000..dc500468 --- /dev/null +++ b/docs/doxygen/nel/a03724.html @@ -0,0 +1,3949 @@ + + +NeL: NL3D::CWaterShape class Reference + + + +
+

NL3D::CWaterShape Class Reference

#include <water_shape.h> +

+

Inheritance diagram for NL3D::CWaterShape: +

+ +NL3D::IShape +NLMISC::CRefCount +NLMISC::IStreamable +NLMISC::IClassable + +

Detailed Description

+A water shape. On recent gfx boards with 4 texture stages, it uses the following : -A environment map computed from the hemisphere that is above the water. -A bump map used to perturbate the envmap (bump map 1). -A bump map used to perturbate the bump map 1 (bump map 0). This simulate local water motion -A color map whose both alpha and rgb are modulated with the envmap to get transparency and color of the water. These maps can be scaled, but not rotated. The bump maps can scroll at regular speed over time The envmap, when set to a CTextureBlend, will automatically blend for all shape when CWaterPoolManager::setBlend is called. This may be used to simulate a night / day transition. The color / alpha map may have arbritrary orientation over the surface
Author:
Nicolas Vizerie

+Nevrax France

+
Date:
2001
+ +

+ +

+Definition at line 79 of file water_shape.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Lighmap

void enableLightMapping (bool enable=true)
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

bool isLightMappingEnabled () const
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

void computeBBox ()
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

void envMapUpdate ()
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

void updateHeightMapNormalizationFactors ()
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CAABBox _BBox
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CSmartPtr< ITexture_BumpMap [2]
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CSmartPtr< ITexture_ColorMap
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CVector2f _ColorMapMatColumn0
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CVector2f _ColorMapMatColumn1
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CVector2f _ColorMapMatPos
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

bool _ComputeLightmap
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

CTrackDefaultVector _DefaultPos
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

CTrackDefaultQuat _DefaultRotQuat
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

CTrackDefaultVector _DefaultScale
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CSmartPtr< ITexture_EnvMap [2]
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

float _HeightMapNormalizationFactor [2]
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CVector2f _HeightMapScale [2]
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CVector2f _HeightMapSpeed [2]
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

bool _HeightMapTouch [2]
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

NLMISC::CPolygon2D _Poly
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

float _TransitionRatio
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

uint32 _WaterPoolID
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

float _WaveHeightFactor
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

void initVertexProgram ()
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

void setupVertexBuffer ()
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

bool _GridSizeTouched = true
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

std::vector< uint32_IBDownUp
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

std::vector< uint32_IBUpDown
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

uint32 _MaxGridSize
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

CVertexBuffer _VB
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

std::auto_ptr< CVertexProgram_VertexProgramBump1
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

std::auto_ptr< CVertexProgram_VertexProgramBump1Diffuse
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

std::auto_ptr< CVertexProgram_VertexProgramBump2
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

std::auto_ptr< CVertexProgram_VertexProgramBump2Diffuse
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

std::auto_ptr< CVertexProgram_VertexProgramNoBump
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

std::auto_ptr< CVertexProgram_VertexProgramNoBumpDiffuse
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

uint32 _XGridBorder = 4
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

uint32 _XScreenGridSize = 40
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

uint32 _YGridBorder = 4
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

uint32 _YScreenGridSize = 40
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.

class CWaterModel
 Tells this shape that it can replace its colormap by a lightmap during the zone lighting.


Geometry setup

const NLMISC::CPolygon2DgetShape () const
 get the polygon used by this shape, in the object space

void getShapeInWorldSpace (NLMISC::CPolygon &poly) const
 get the polygon this shape, in world space

uint32 getWaterPoolID () const
 get the polygon used by this shape, in the object space

float getWaveHeightFactor () const
 Get the factor that is applied to waves height when they are displayed. default is 1.

void setShape (const NLMISC::CPolygon2D &poly)
 get the polygon used by this shape, in the object space

void setWaterPoolID (uint32 id)
 all water shape that have the same weter id will share the same height map for wave propagations

void setWaveHeightFactor (float f)
 Set a factor that is applied to waves height when they are displayed. default is 1.

uint32 getScreenXGridSize ()
 get the polygon used by this shape, in the object space

uint32 getScreenYGridSize ()
 get the polygon used by this shape, in the object space

uint32 getXGridBorder ()
 get the polygon used by this shape, in the object space

uint32 getYGridBorder ()
 get the polygon used by this shape, in the object space

void setGridBorderSize (uint32 x, uint32 y)
 set the size of borders. This is needed when water move is high, to avoid hole on the border of the screen

void setScreenGridSize (uint32 x, uint32 y)
 set the resolution for the grid that is used for tesselation


Public Member Functions

virtual bool clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix)
 inherited from IShape

virtual CTransformShapecreateInstance (CScene &scene)
 inherited from IShape

virtual void flushTextures (IDriver &driver, uint selectedTexture)
 inherited from ishape

virtual void getAABBox (NLMISC::CAABBox &bbox) const
 inherited from IShape

virtual std::string getClassName ()=0
float getDistMax () const
virtual float getNumTriangles (float distance)
 inherited from ishape

const sintgetRefCount () const
 NLMISC_DECLARE_CLASS (CWaterShape)
virtual void profileSceneRender (CRenderTrav *rdrTrav, CTransformShape *trans, bool opaquePass)
virtual void render (IDriver *drv, CTransformShape *trans, bool opaquePass)
 inherited from IShape. Does nothing. A new traverseRender() was set for that

void setDistMax (float distMax)
Object
 CWaterShape ()
 ctor

void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 serial this shape

 ~CWaterShape ()
 dtor

Texture setup
const ITexturegetColorMap () const
ITexturegetColorMap ()
void getColorMapMat (NLMISC::CVector2f &column0, NLMISC::CVector2f &column1, NLMISC::CVector2f &pos)
const ITexturegetEnvMap (uint index) const
ITexturegetEnvMap (uint index)
const ITexturegetHeightMap (uint k) const
ITexturegetHeightMap (uint k)
NLMISC::CVector2f getHeightMapScale (uint k) const
NLMISC::CVector2f getHeightMapSpeed (uint k) const
void setColorMap (ITexture *map)
void setColorMapMat (const NLMISC::CVector2f &column0, const NLMISC::CVector2f &column1, const NLMISC::CVector2f &pos)
void setEnvMap (uint index, ITexture *envMap)
void setHeightMap (uint k, ITexture *hm)
void setHeightMapScale (uint k, const NLMISC::CVector2f &scale)
void setHeightMapSpeed (uint k, const NLMISC::CVector2f &speed)
access default tracks.
CTrackDefaultVectorgetDefaultPos ()
CTrackDefaultQuatgetDefaultRotQuat ()
CTrackDefaultVectorgetDefaultScale ()
LOD
float getTransitionRatio () const
void setTransitionRatio (float percent)

Data Fields

sint crefs
CPtrInfo * pinfo

Static Public Attributes

CPtrInfo NullPtrInfo

Protected Attributes

float _DistMax
 Default to -1.


Friends

struct CPtrInfo
+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CWaterShape::CWaterShape  ) 
+
+ + + + + +
+   + + +

+ctor +

+ +

+Definition at line 221 of file water_shape.cpp. +

+References _HeightMapScale, _HeightMapSpeed, _HeightMapTouch, NLMISC::CVector2f::set(), NL3D::CTrackDefaultBlendable< CQuat >::setValue(), NL3D::CTrackDefaultBlendable< CVector >::setValue(), and sint. +

+

00221                          :  _WaterPoolID(0), _TransitionRatio(0.6f), _WaveHeightFactor(3), _ComputeLightmap(false)
+00222 {
+00223         _DefaultPos.setValue(NLMISC::CVector::Null);
+00224         _DefaultScale.setValue(NLMISC::CVector(1, 1, 1));
+00225         _DefaultRotQuat.setValue(CQuat::Identity);
+00226 
+00227         for (sint k = 0; k < 2; ++k)
+00228         {
+00229                 _HeightMapScale[k].set(1, 1);
+00230                 _HeightMapSpeed[k].set(0, 0);
+00231                 _HeightMapTouch[k] = true;
+00232         }
+00233         _ColorMapMatColumn0.set(1, 0);
+00234         _ColorMapMatColumn1.set(0, 1);
+00235         _ColorMapMatPos.set(0, 0);
+00236 }
+
+

+ + + + +
+ + + + + + + + + +
NL3D::CWaterShape::~CWaterShape  ) 
+
+ + + + + +
+   + + +

+dtor +

+ +

+Definition at line 240 of file water_shape.cpp. +

+References _EnvMap, NL3D::GetWaterPoolManager(), and NL3D::CWaterPoolManager::unRegisterWaterShape(). +

+

00241 {
+00242         if (
+00243                 (_EnvMap[0] && dynamic_cast<CTextureBlend *>((ITexture *) _EnvMap[0]))
+00244                 || (_EnvMap[1] && dynamic_cast<CTextureBlend *>((ITexture *) _EnvMap[1]))
+00245                 )
+00246         {
+00247                 GetWaterPoolManager().unRegisterWaterShape(this);               
+00248         }
+00249 }
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::CWaterShape::clip const std::vector< CPlane > &  pyramid,
const CMatrix worldMatrix
[virtual]
+
+ + + + + +
+   + + +

+inherited from IShape +

+ +

+Reimplemented from NL3D::IShape. +

+Definition at line 507 of file water_shape.cpp. +

+References NLMISC::CAABBox::clipBack(), and uint. +

+

00508 {       
+00509         for (uint k = 0; k < pyramid.size(); ++k)
+00510         {
+00511                 if (! _BBox.clipBack(pyramid[k] * worldMatrix)) return false;
+00512         }
+00513         return true;
+00514 }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CWaterShape::computeBBox  )  [private]
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 410 of file water_shape.cpp. +

+References min, nlassert, NLMISC::CAABBox::setMinMax(), uint, and NLMISC::CPolygon2D::Vertices. +

+Referenced by setShape(). +

+

00411 {
+00412         nlassert(_Poly.Vertices.size() != 0);
+00413         NLMISC::CVector2f min, max;
+00414         min = max = _Poly.Vertices[0];
+00415         for (uint k = 1; k < _Poly.Vertices.size(); ++k)
+00416         {
+00417                 min.minof(min, _Poly.Vertices[k]);
+00418                 max.maxof(max, _Poly.Vertices[k]);
+00419         }
+00420         _BBox.setMinMax(CVector(min.x, min.y, 0), CVector(max.x, max.y, 0));
+00421         /* nlinfo("center x = %f, y = %f, z = %f", _BBox.getCenter().x, _BBox.getCenter().y, _BBox.getCenter().z);
+00422         nlinfo("halsize x = %f, y = %f, z = %f", _BBox.getHalfSize().x, _BBox.getHalfSize().y, _BBox.getHalfSize().z); */
+00423 }
+
+

+ + + + +
+ + + + + + + + + + +
CTransformShape * NL3D::CWaterShape::createInstance CScene scene  )  [virtual]
+
+ + + + + +
+   + + +

+inherited from IShape +

+ +

+Reimplemented from NL3D::IShape. +

+Definition at line 327 of file water_shape.cpp. +

+References NL3D::CAnimatedValueQuat, NL3D::CAnimatedValueVector, NL3D::CScene::createModel(), NL3D::ITransformable::getMatrix(), getShape(), NL3D::CTrackDefaultBlendable< CQuat >::getValue(), NL3D::CTrackDefaultBlendable< CVector >::getValue(), NL3D::CScene::getWaterCallback(), NL3D::CWaterModel::init(), NL3D::CTransformShape::Shape, NL3D::WaterModelClassId, and NL3D::IWaterSurfaceAddedCallback::waterSurfaceAdded(). +

+

00328 {
+00329         CWaterModel *wm = NLMISC::safe_cast<CWaterModel *>(scene.createModel(WaterModelClassId) );
+00330         wm->Shape = this;
+00331         // set default pos & scale
+00332         wm->ITransformable::setPos( ((CAnimatedValueVector&)_DefaultPos.getValue()).Value  );
+00333         wm->ITransformable::setScale( ((CAnimatedValueVector&)_DefaultScale.getValue()).Value  );
+00334         wm->ITransformable::setRotQuat( ((CAnimatedValueQuat&)_DefaultRotQuat.getValue()).Value  );
+00335         //
+00336         wm->init();             
+00337         if (scene.getWaterCallback())
+00338         {                       
+00339                 scene.getWaterCallback()->waterSurfaceAdded(getShape(), wm->getMatrix());
+00340         }
+00341         return wm;
+00342 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CWaterShape::enableLightMapping bool  enable = true  )  [inline]
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 196 of file water_shape.h. +

+References _ComputeLightmap. +

+

00196 { _ComputeLightmap = enable; }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CWaterShape::envMapUpdate  )  [private]
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 568 of file water_shape.cpp. +

+References _EnvMap, NL3D::GetWaterPoolManager(), NL3D::CWaterPoolManager::isWaterShapeObserver(), NL3D::CWaterPoolManager::registerWaterShape(), and NL3D::CWaterPoolManager::unRegisterWaterShape(). +

+Referenced by NL3D::CWaterModel::setupMaterialNVertexShader(). +

+

00569 {
+00570         // if the color map is a blend texture, we MUST be registered to the water pool manager, so that, the
+00571         // setBlend message will be routed to this texture.
+00572         if (
+00573                 (_EnvMap[0] && dynamic_cast<CTextureBlend *>((ITexture *) _EnvMap[0]))
+00574                 || (_EnvMap[1] && dynamic_cast<CTextureBlend *>((ITexture *) _EnvMap[1]))
+00575                 )
+00576         {
+00577                 if (!GetWaterPoolManager().isWaterShapeObserver(this))
+00578                 {
+00579                         GetWaterPoolManager().registerWaterShape(this);
+00580                 }
+00581         }
+00582         else
+00583         {
+00584                 if (GetWaterPoolManager().isWaterShapeObserver(this))
+00585                 {
+00586                         GetWaterPoolManager().unRegisterWaterShape(this);
+00587                 }
+00588         }
+00589 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CWaterShape::flushTextures IDriver driver,
uint  selectedTexture
[virtual]
+
+ + + + + +
+   + + +

+inherited from ishape +

+ +

+Implements NL3D::IShape. +

+Definition at line 354 of file water_shape.cpp. +

+References uint. +

+

00355 {
+00356         // Test if bump maps are supported by driver before to flush them.      
+00357         // TEMP : can't flush texture for water, because the upload format depends on the shader
+00358         // Only the driver can determine it.
+00359         // BumpMaps may be uploaded with unsigned or signed format
+00360 
+00361         /*
+00362         if (
+00363                 (driver.supportTextureShaders() && driver.isTextureAddrModeSupported(CMaterial::OffsetTexture))
+00364                 || driver.supportEMBM()
+00365            )
+00366         {
+00367                 for (uint k = 0; k < 2; ++k)
+00368                 {
+00369                         if (_BumpMap[k] != NULL)
+00370                                 driver.setupTexture(*_BumpMap[k]);
+00371                         if (_EnvMap[k] != NULL)
+00372                                 driver.setupTexture(*_EnvMap[k]);               
+00373                 }
+00374         }
+00375         if (_ColorMap != NULL)
+00376                 driver.setupTexture(*_ColorMap);
+00377         */
+00378 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CWaterShape::getAABBox NLMISC::CAABBox bbox  )  const [inline, virtual]
+
+ + + + + +
+   + + +

+inherited from IShape +

+ +

+Reimplemented from NL3D::IShape. +

+Definition at line 108 of file water_shape.h. +

+

00108 { bbox = _BBox; }
+
+

+ + + + +
+ + + + + + + + + +
virtual std::string NLMISC::IClassable::getClassName  )  [pure virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Implemented in NLAIAGENT::CNumericIndex, NLAIC::IPointerGestion, NLAIC::CIdentType, and CAutomataDesc. +

+Referenced by NLMISC::CClassRegistry::checkObject(), and NL3D::GetTextureSize().

+

+ + + + +
+ + + + + + + + + +
const ITexture* NL3D::CWaterShape::getColorMap  )  const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 173 of file water_shape.h. +

+References _ColorMap. +

+

00173 { return _ColorMap; }
+
+

+ + + + +
+ + + + + + + + + +
ITexture* NL3D::CWaterShape::getColorMap  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 172 of file water_shape.h. +

+References _ColorMap. +

+Referenced by NL3D::CZoneLighter::isLightableShape(), NL3D::CZoneLighter::lightWater(), and NL3D::CWaterModel::setupMaterialNVertexShader(). +

+

00172 { return _ColorMap; }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CWaterShape::getColorMapMat NLMISC::CVector2f column0,
NLMISC::CVector2f column1,
NLMISC::CVector2f pos
+
+ + + + + +
+   + + +

+ +

+Definition at line 559 of file water_shape.cpp. +

+Referenced by NL3D::CZoneLighter::lightWater(). +

+

00560 {
+00561         column0 = _ColorMapMatColumn0;
+00562         column1 = _ColorMapMatColumn1;
+00563         pos  = _ColorMapMatPos;
+00564 }
+
+

+ + + + +
+ + + + + + + + + +
CTrackDefaultVector* NL3D::CWaterShape::getDefaultPos  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 187 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::getDefaultTrack(). +

+

00187 {return &_DefaultPos;}
+
+

+ + + + +
+ + + + + + + + + +
CTrackDefaultQuat* NL3D::CWaterShape::getDefaultRotQuat  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 189 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::getDefaultTrack(). +

+

00189 {return &_DefaultRotQuat;}
+
+

+ + + + +
+ + + + + + + + + +
CTrackDefaultVector* NL3D::CWaterShape::getDefaultScale  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 188 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::getDefaultTrack(). +

+

00188 {return &_DefaultScale;}
+
+

+ + + + +
+ + + + + + + + + +
float NL3D::IShape::getDistMax  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+return the DistMax where the shape is no more displayed. Default is to return -1, meaning DistMax = infinite. +

+Definition at line 112 of file shape.h. +

+

00112 {return _DistMax;}
+
+

+ + + + +
+ + + + + + + + + + +
const ITexture* NL3D::CWaterShape::getEnvMap uint  index  )  const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 155 of file water_shape.h. +

+References _EnvMap, index, nlassert, and uint. +

+

00155 { nlassert(index < 2); return (const ITexture *) _EnvMap[index];}
+
+

+ + + + +
+ + + + + + + + + + +
ITexture* NL3D::CWaterShape::getEnvMap uint  index  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 154 of file water_shape.h. +

+References _EnvMap, index, nlassert, and uint. +

+

00154 { nlassert(index < 2); return (ITexture *) _EnvMap[index];}
+
+

+ + + + +
+ + + + + + + + + + +
const ITexture * NL3D::CWaterShape::getHeightMap uint  k  )  const
+
+ + + + + +
+   + + +

+ +

+Definition at line 449 of file water_shape.cpp. +

+References _BumpMap, nlassert, and uint. +

+

00450 {
+00451         nlassert(k < 2);
+00452         return ((CTextureBump *) (ITexture *) _BumpMap[k] )->getHeightMap();
+00453 }
+
+

+ + + + +
+ + + + + + + + + + +
ITexture * NL3D::CWaterShape::getHeightMap uint  k  ) 
+
+ + + + + +
+   + + +

+ +

+Definition at line 441 of file water_shape.cpp. +

+References _BumpMap, nlassert, and uint. +

+

00442 {
+00443         nlassert(k < 2);
+00444         return ((CTextureBump *) (ITexture *) _BumpMap[k] )->getHeightMap();
+00445 }
+
+

+ + + + +
+ + + + + + + + + + +
NLMISC::CVector2f NL3D::CWaterShape::getHeightMapScale uint  k  )  const
+
+ + + + + +
+   + + +

+ +

+Definition at line 526 of file water_shape.cpp. +

+References _HeightMapScale, nlassert, and uint. +

+

00527 {
+00528         nlassert(k < 2);
+00529         return _HeightMapScale[k];
+00530 }
+
+

+ + + + +
+ + + + + + + + + + +
NLMISC::CVector2f NL3D::CWaterShape::getHeightMapSpeed uint  k  )  const
+
+ + + + + +
+   + + +

+ +

+Definition at line 542 of file water_shape.cpp. +

+References _HeightMapSpeed, nlassert, and uint. +

+

00543 {
+00544         nlassert(k < 2);
+00545         return _HeightMapSpeed[k];
+00546 }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CWaterShape::getNumTriangles float  distance  )  [virtual]
+
+ + + + + +
+   + + +

+inherited from ishape +

+ +

+Implements NL3D::IShape. +

+Definition at line 346 of file water_shape.cpp. +

+

00347 {
+00348         // TODO
+00349         return 0;
+00350 }
+
+

+ + + + +
+ + + + + + + + + +
const sint& NLMISC::CRefCount::getRefCount  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 70 of file smart_ptr.h. +

+References NLMISC::CRefCount::crefs, and sint. +

+

00071         {
+00072                 return  crefs;
+00073         }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CWaterShape::getScreenXGridSize  )  [inline, static]
+
+ + + + + +
+   + + +

+get the polygon used by this shape, in the object space +

+ +

+Definition at line 126 of file water_shape.h. +

+References _XScreenGridSize, and uint32. +

+

00126 { return _XScreenGridSize; }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CWaterShape::getScreenYGridSize  )  [inline, static]
+
+ + + + + +
+   + + +

+get the polygon used by this shape, in the object space +

+ +

+Definition at line 127 of file water_shape.h. +

+References _YScreenGridSize, and uint32. +

+

00127 { return _YScreenGridSize; }
+
+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CPolygon2D& NL3D::CWaterShape::getShape void   )  const [inline]
+
+ + + + + +
+   + + +

+get the polygon used by this shape, in the object space +

+ +

+Definition at line 136 of file water_shape.h. +

+Referenced by createInstance(). +

+

00136 { return _Poly; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CWaterShape::getShapeInWorldSpace NLMISC::CPolygon poly  )  const
+
+ + + + + +
+   + + +

+get the polygon this shape, in world space +

+ +

+Definition at line 609 of file water_shape.cpp. +

+References NL3D::CAnimatedValueQuat, NL3D::CAnimatedValueVector, NL3D::CTrackDefaultBlendable< CQuat >::getValue(), NL3D::CTrackDefaultBlendable< CVector >::getValue(), NLMISC::CMatrix::identity(), NLMISC::CMatrix::rotate(), NLMISC::CMatrix::scale(), NLMISC::CMatrix::translate(), uint, NLMISC::CPolygon2D::Vertices, and NLMISC::CPolygon::Vertices. +

+Referenced by NL3D::CZoneLighter::lightWater(). +

+

00610 {
+00611         poly.Vertices.resize(_Poly.Vertices.size());
+00612         // compute the matrix of the object in world space, by using the default tracks
+00613         NLMISC::CMatrix objMat;
+00614         objMat.identity();              
+00615         objMat.translate(((CAnimatedValueVector *) &_DefaultPos.getValue())->Value);
+00616         objMat.rotate(((CAnimatedValueQuat *) &_DefaultRotQuat.getValue())->Value);
+00617         objMat.scale(((CAnimatedValueVector *) &_DefaultScale.getValue())->Value);
+00618         
+00619         for (uint k = 0; k < _Poly.Vertices.size(); ++k)
+00620         {
+00621                 poly.Vertices[k] = objMat * NLMISC::CVector(_Poly.Vertices[k].x, _Poly.Vertices[k].y, 0);
+00622         }
+00623 }
+
+

+ + + + +
+ + + + + + + + + +
float NL3D::CWaterShape::getTransitionRatio  )  const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 182 of file water_shape.h. +

+References _TransitionRatio. +

+

00182 {  return _TransitionRatio; }           
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CWaterShape::getWaterPoolID  )  const [inline]
+
+ + + + + +
+   + + +

+get the polygon used by this shape, in the object space +

+ +

+Definition at line 121 of file water_shape.h. +

+References _WaterPoolID, and uint32. +

+

00121 { return _WaterPoolID; }
+
+

+ + + + +
+ + + + + + + + + +
float NL3D::CWaterShape::getWaveHeightFactor  )  const [inline]
+
+ + + + + +
+   + + +

+Get the factor that is applied to waves height when they are displayed. default is 1. +

+ +

+Definition at line 145 of file water_shape.h. +

+References _WaveHeightFactor. +

+

00145 { return _WaveHeightFactor; }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CWaterShape::getXGridBorder  )  [inline, static]
+
+ + + + + +
+   + + +

+get the polygon used by this shape, in the object space +

+ +

+Definition at line 128 of file water_shape.h. +

+References _XGridBorder, and uint32. +

+

00128 { return _XGridBorder; }
+
+

+ + + + +
+ + + + + + + + + +
uint32 NL3D::CWaterShape::getYGridBorder  )  [inline, static]
+
+ + + + + +
+   + + +

+get the polygon used by this shape, in the object space +

+ +

+Definition at line 129 of file water_shape.h. +

+References _YGridBorder, and uint32. +

+

00129 { return _YGridBorder; }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CWaterShape::initVertexProgram  )  [static, private]
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 253 of file water_shape.cpp. +

+References _VertexProgramBump1, _VertexProgramBump1Diffuse, _VertexProgramBump2, _VertexProgramBump2Diffuse, _VertexProgramNoBump, _VertexProgramNoBumpDiffuse, and NL3D::BuildWaterVP(). +

+Referenced by NL3D::CWaterModel::setupMaterialNVertexShader(). +

+

00254 {       
+00255         static bool created = false;
+00256         if (!created)
+00257         {
+00258 
+00259                 _VertexProgramBump1 = std::auto_ptr<CVertexProgram>(BuildWaterVP(false, true, false));
+00260                 _VertexProgramBump2 = std::auto_ptr<CVertexProgram>(BuildWaterVP(false, true, true));
+00261 
+00262                 _VertexProgramBump1Diffuse = std::auto_ptr<CVertexProgram>(BuildWaterVP(true, true, false));
+00263                 _VertexProgramBump2Diffuse = std::auto_ptr<CVertexProgram>(BuildWaterVP(true, true, true));
+00264 
+00265                 _VertexProgramNoBump = std::auto_ptr<CVertexProgram>(BuildWaterVP(false, false, false));
+00266                 _VertexProgramNoBumpDiffuse = std::auto_ptr<CVertexProgram>(BuildWaterVP(true, false, false));
+00267                 created = true;
+00268         }
+00269 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CWaterShape::isLightMappingEnabled  )  const [inline]
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 197 of file water_shape.h. +

+References _ComputeLightmap. +

+Referenced by NL3D::CZoneLighter::isLightableShape(). +

+

00197 { return _ComputeLightmap; }    
+
+

+ + + + +
+ + + + + + + + + + +
NL3D::CWaterShape::NLMISC_DECLARE_CLASS CWaterShape   ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::IShape::profileSceneRender CRenderTrav rdrTrav,
CTransformShape trans,
bool  opaquePass
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Profiling. Called in RenderPass if Current Frame profiled. No-Op by default Informations must be added in rdrTrav->Scene +

+Reimplemented in NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, and NL3D::CMeshMultiLod. +

+Definition at line 123 of file shape.h. +

+

00123 {}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
virtual void NL3D::CWaterShape::render IDriver drv,
CTransformShape trans,
bool  opaquePass
[inline, virtual]
+
+ + + + + +
+   + + +

+inherited from IShape. Does nothing. A new traverseRender() was set for that +

+ +

+Implements NL3D::IShape. +

+Definition at line 105 of file water_shape.h. +

+

00105 {}
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CWaterShape::serial NLMISC::IStream f  )  throw (NLMISC::EStream) [virtual]
+
+ + + + + +
+   + + +

+serial this shape +

+ +

+Implements NLMISC::IStreamable. +

+Definition at line 457 of file water_shape.cpp. +

+References sint. +

+

00458 {
+00459         sint ver = f.serialVersion(2);
+00460         // serial 'shape' 
+00461         f.serial(_Poly);
+00462         // serial heightMap identifier
+00463         f.serial(_WaterPoolID);
+00464         //serial maps
+00465         ITexture *map = NULL;   
+00466         if (f.isReading())
+00467         {
+00468                 f.serialPolyPtr(map); _EnvMap[0] = map;
+00469                 f.serialPolyPtr(map); _EnvMap[1] = map;
+00470                 f.serialPolyPtr(map); _BumpMap[0] = map;
+00471                 f.serialPolyPtr(map); _BumpMap[1] = map;
+00472                 f.serialPolyPtr(map); _ColorMap = map;
+00473                 computeBBox();
+00474         }
+00475         else
+00476         {
+00477                 map = _EnvMap[0]; f.serialPolyPtr(map);
+00478                 map = _EnvMap[1]; f.serialPolyPtr(map);
+00479                 map = _BumpMap[0]; f.serialPolyPtr(map);
+00480                 map = _BumpMap[1]; f.serialPolyPtr(map);
+00481                 map = _ColorMap; f.serialPolyPtr(map);  
+00482         }
+00483 
+00484         f.serial(_HeightMapScale[0], _HeightMapScale[1],
+00485                          _HeightMapSpeed[0], _HeightMapSpeed[1]);
+00486 
+00487         f.serial(_ColorMapMatColumn0, _ColorMapMatColumn1, _ColorMapMatPos);    
+00488 
+00489         // serial default tracks
+00490         f.serial(_DefaultPos);
+00491         f.serial(_DefaultScale);
+00492         f.serial(_DefaultRotQuat);
+00493 
+00494         f.serial(_TransitionRatio);     
+00495 
+00496         f.serial(_WaveHeightFactor);
+00497 
+00498         if (ver >= 1)
+00499                 f.serial (_ComputeLightmap);
+00500 
+00501         if (ver >= 2)
+00502                 f.serial (_DistMax);
+00503 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CWaterShape::setColorMap ITexture map  ) 
+
+ + + + + +
+   + + +

+ +

+Definition at line 593 of file water_shape.cpp. +

+References _ColorMap. +

+

00594 { 
+00595         _ColorMap = map; 
+00596         //colorMapUpdate();
+00597 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CWaterShape::setColorMapMat const NLMISC::CVector2f column0,
const NLMISC::CVector2f column1,
const NLMISC::CVector2f pos
+
+ + + + + +
+   + + +

+ +

+Definition at line 550 of file water_shape.cpp. +

+

00551 {
+00552         _ColorMapMatColumn0 = column0;
+00553         _ColorMapMatColumn1 = column1;
+00554         _ColorMapMatPos  = pos;
+00555 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::IShape::setDistMax float  distMax  )  [inherited]
+
+ + + + + +
+   + + +

+setup the DistMax where the shape is no more displayed. Take effect only for the next created instances. setting <0 means -1 and so means DistMax = infinite. +

+Definition at line 66 of file shape.cpp. +

+Referenced by NL3D::CFlareShape::CFlareShape(). +

+

00067 {
+00068         _DistMax= distMax;
+00069         // normalize infinite setup.
+00070         if(distMax<0)
+00071                 _DistMax= -1;
+00072 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CWaterShape::setEnvMap uint  index,
ITexture envMap
+
+ + + + + +
+   + + +

+ +

+Definition at line 601 of file water_shape.cpp. +

+References _EnvMap, index, nlassert, and uint. +

+

00602 {
+00603         nlassert(index < 2);
+00604         _EnvMap[index] = envMap;        
+00605 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CWaterShape::setGridBorderSize uint32  x,
uint32  y
[static]
+
+ + + + + +
+   + + +

+set the size of borders. This is needed when water move is high, to avoid hole on the border of the screen +

+ +

+Definition at line 392 of file water_shape.cpp. +

+References _GridSizeTouched, _XGridBorder, _YGridBorder, uint32, x, and y. +

+

00393 {
+00394         _XGridBorder = x;
+00395         _YGridBorder = y;
+00396         _GridSizeTouched = true;
+00397 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CWaterShape::setHeightMap uint  k,
ITexture hm
+
+ + + + + +
+   + + +

+Set a height map, used to generate a bumpmap (useful if supported by hardware...) NB : not to be confused with the height map used to modify the geometry, it only modify texture +

+Definition at line 427 of file water_shape.cpp. +

+References _BumpMap, _HeightMapTouch, nlassert, and uint. +

+

00428 {
+00429         nlassert(k < 2);        
+00430         if (!_BumpMap[k])
+00431         {
+00432                 _BumpMap[k] = new CTextureBump;
+00433         }
+00434         static_cast<CTextureBump *>( (ITexture *) _BumpMap[k])->forceNormalize(true);
+00435         static_cast<CTextureBump *>( (ITexture *) _BumpMap[k])->setHeightMap(hm);
+00436         _HeightMapTouch[k] = true; // must recompute normalization factor
+00437 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CWaterShape::setHeightMapScale uint  k,
const NLMISC::CVector2f scale
+
+ + + + + +
+   + + +

+ +

+Definition at line 518 of file water_shape.cpp. +

+References _HeightMapScale, nlassert, and uint. +

+

00519 {
+00520         nlassert(k < 2);
+00521         _HeightMapScale[k] = scale;
+00522 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CWaterShape::setHeightMapSpeed uint  k,
const NLMISC::CVector2f speed
+
+ + + + + +
+   + + +

+ +

+Definition at line 534 of file water_shape.cpp. +

+References _HeightMapSpeed, nlassert, and uint. +

+

00535 {
+00536         nlassert(k < 2);
+00537         _HeightMapSpeed[k] = speed;
+00538 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CWaterShape::setScreenGridSize uint32  x,
uint32  y
[static]
+
+ + + + + +
+   + + +

+set the resolution for the grid that is used for tesselation +

+ +

+Definition at line 382 of file water_shape.cpp. +

+References _GridSizeTouched, _XScreenGridSize, _YScreenGridSize, nlassert, uint32, x, and y. +

+

00383 {
+00384         nlassert(x > 0 && y > 0);
+00385         _XScreenGridSize = x;   
+00386         _YScreenGridSize = y;
+00387         _GridSizeTouched = true;
+00388 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CWaterShape::setShape const NLMISC::CPolygon2D poly  ) 
+
+ + + + + +
+   + + +

+get the polygon used by this shape, in the object space +

+ +

+Definition at line 401 of file water_shape.cpp. +

+References computeBBox(), nlassert, and NLMISC::CPolygon2D::Vertices. +

+

00402 {
+00403         nlassert(poly.Vertices.size() != 0); // empty poly not allowed
+00404         _Poly = poly;
+00405         computeBBox();
+00406 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CWaterShape::setTransitionRatio float  percent  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 181 of file water_shape.h. +

+References _TransitionRatio. +

+

00181 { _TransitionRatio = percent; }         
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CWaterShape::setupVertexBuffer  )  [static, private]
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 274 of file water_shape.cpp. +

+References _GridSizeTouched, _IBDownUp, _IBUpDown, _MaxGridSize, _XGridBorder, _XScreenGridSize, _YScreenGridSize, NL3D::CVertexBuffer::addValueEx(), NL3D::CVertexBuffer::clearValueEx(), NL3D::CVertexBuffer::initEx(), NL3D::CVertexBuffer::setNumVertices(), uint, w, NL3D::WATER_VB_DX, NL3D::WATER_VB_POS, and x. +

+Referenced by NL3D::CWaterModel::traverseRender(). +

+

00275 {
+00276         const uint rotLength = (uint) ::ceilf(::sqrtf((float) ((_XScreenGridSize >> 1) * (_XScreenGridSize >> 1)
+00277                                                                   + (_YScreenGridSize >> 1) * (_YScreenGridSize >> 1))));
+00278         _MaxGridSize = 2 * rotLength;
+00279         const uint w =  _MaxGridSize + 2 * _XGridBorder;
+00280 
+00281         _VB.clearValueEx();
+00282         _VB.addValueEx (WATER_VB_POS, CVertexBuffer::Float3);
+00283         _VB.addValueEx (WATER_VB_DX, CVertexBuffer::Float2);    
+00284 
+00285         _VB.initEx();
+00286         _VB.setNumVertices((w + 1) * 2);
+00287         
+00288 
+00289         
+00290         uint x;
+00291 
+00292         // setup each index buffer
+00293         // We need 2 vb, because, each time 2 lines of the vertex buffer are filled, we start at the beginning again
+00294         // So we need 1 vb for triangle drawn up to down, and one other for triangle drawn down to top  
+00295 
+00296         _IBUpDown.resize(6 * w);        
+00297         for (x = 0; x < w; ++x)
+00298         {
+00299                 _IBUpDown [ 6 * x      ] = x;
+00300                 _IBUpDown [ 6 * x  + 1 ] = x + 1 + (w + 1);
+00301                 _IBUpDown [ 6 * x  + 2 ] = x + 1;
+00302 
+00303                 _IBUpDown [ 6 * x  + 3 ] = x;
+00304                 _IBUpDown [ 6 * x  + 4 ] = x + 1 + (w + 1);
+00305                 _IBUpDown [ 6 * x  + 5 ] = x     + (w + 1);
+00306 
+00307         }
+00308 
+00309         _IBDownUp.resize(6 * w);
+00310         for (x = 0; x < w; ++x)
+00311         {
+00312                 _IBDownUp [ 6 * x      ] = x;
+00313                 _IBDownUp [ 6 * x  + 1 ] = x + 1;
+00314                 _IBDownUp [ 6 * x  + 2 ] = x + 1 + (w + 1);
+00315 
+00316                 _IBDownUp [ 6 * x  + 3 ] = x;
+00317                 _IBDownUp [ 6 * x  + 4 ] = x     + (w + 1);
+00318                 _IBDownUp [ 6 * x  + 5 ] = x + 1 + (w + 1);
+00319 
+00320         }
+00321 
+00322         _GridSizeTouched = false;
+00323 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CWaterShape::setWaterPoolID uint32  id  )  [inline]
+
+ + + + + +
+   + + +

+all water shape that have the same weter id will share the same height map for wave propagations +

+ +

+Definition at line 120 of file water_shape.h. +

+References _WaterPoolID, and uint32. +

+

00120 { _WaterPoolID = id; }          
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CWaterShape::setWaveHeightFactor float  f  )  [inline]
+
+ + + + + +
+   + + +

+Set a factor that is applied to waves height when they are displayed. default is 1. +

+ +

+Definition at line 142 of file water_shape.h. +

+References _WaveHeightFactor. +

+

00142 { _WaveHeightFactor = f; }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual IMeshGeom* NL3D::IShape::supportMeshBlockRendering CTransformShape trans,
float &  polygonCount
const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+return !NULL if this shape can support MeshBlock rendering for a special instance. NB: Mesh Block render cannot occurs if the Mesh is Skinned/MeshMorphed. NB: Mesh Block render can occurs only in Opaque pass NB: Mesh block render can occurs only for CMeshBase meshes.

Parameters:
+ + + +
trans the instance to take into account (meshMultiLod may return NULL in blend transition).
polygonCount the number of polygons to render for the meshGeom returned
+
+
Returns:
the meshgeom to render per block if OK, else NULL (default)
+ +

+Reimplemented in NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, and NL3D::CMeshMultiLod. +

+Definition at line 158 of file shape.h. +

+

00158 {return NULL;}
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CWaterShape::updateHeightMapNormalizationFactors  )  [private]
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 627 of file water_shape.cpp. +

+References _BumpMap, _HeightMapNormalizationFactor, _HeightMapTouch, and uint. +

+

00628 {
+00629         for (uint k = 0; k < 2; ++k)
+00630         {
+00631                 if (_HeightMapTouch[k])
+00632                 {
+00633                         if (_BumpMap[k] != NULL)
+00634                         {
+00635                                 _BumpMap[k]->generate();
+00636                                 _HeightMapNormalizationFactor[k] = NLMISC::safe_cast<CTextureBump *>((ITexture *)_BumpMap[k])->getNormalizationFactor();
+00637                                 if (_BumpMap[k]->getReleasable())
+00638                                 {
+00639                                         _BumpMap[k]->release();
+00640                                 }
+00641                         }
+00642                         else
+00643                         {
+00644                                 _HeightMapNormalizationFactor[k] = 1.f;
+00645                         }
+00646                         _HeightMapTouch[k] = false;
+00647                 }
+00648         }
+00649 }
+
+

+ + + + +
+ + + + + + + + + +
virtual bool NL3D::IShape::useLightingLocalAttenuation  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+tells if the shape wants LocalAttenuation for RealTime lighting. Default is false +

+Reimplemented in NL3D::CMeshBase. +

+Definition at line 142 of file shape.h. +

+

00142 {return false;}
+
+


Friends And Related Function Documentation

+

+ + + + +
+ + +
friend struct CPtrInfo [friend, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 67 of file smart_ptr.h.

+

+ + + + +
+ + +
friend class CWaterModel [friend] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 200 of file water_shape.h.

+


Field Documentation

+

+ + + + +
+ + +
NLMISC::CAABBox NL3D::CWaterShape::_BBox [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 207 of file water_shape.h.

+

+ + + + +
+ + +
NLMISC::CSmartPtr<ITexture> NL3D::CWaterShape::_BumpMap[2] [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 211 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::doSimpleRender(), getHeightMap(), setHeightMap(), NL3D::CWaterModel::setupMaterialNVertexShader(), and updateHeightMapNormalizationFactors().

+

+ + + + +
+ + +
NLMISC::CSmartPtr<ITexture> NL3D::CWaterShape::_ColorMap [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 212 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::doSimpleRender(), getColorMap(), setColorMap(), and NL3D::CWaterModel::setupMaterialNVertexShader().

+

+ + + + +
+ + +
NLMISC::CVector2f NL3D::CWaterShape::_ColorMapMatColumn0 [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 216 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::doSimpleRender(), and NL3D::CWaterModel::updateDiffuseMapMatrix().

+

+ + + + +
+ + +
NLMISC::CVector2f NL3D::CWaterShape::_ColorMapMatColumn1 [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 216 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::doSimpleRender(), and NL3D::CWaterModel::updateDiffuseMapMatrix().

+

+ + + + +
+ + +
NLMISC::CVector2f NL3D::CWaterShape::_ColorMapMatPos [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 216 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::doSimpleRender(), and NL3D::CWaterModel::updateDiffuseMapMatrix().

+

+ + + + +
+ + +
bool NL3D::CWaterShape::_ComputeLightmap [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 223 of file water_shape.h. +

+Referenced by enableLightMapping(), and isLightMappingEnabled().

+

+ + + + +
+ + +
CTrackDefaultVector NL3D::CWaterShape::_DefaultPos [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 218 of file water_shape.h.

+

+ + + + +
+ + +
CTrackDefaultQuat NL3D::CWaterShape::_DefaultRotQuat [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 220 of file water_shape.h.

+

+ + + + +
+ + +
CTrackDefaultVector NL3D::CWaterShape::_DefaultScale [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 219 of file water_shape.h.

+

+ + + + +
+ + +
float NL3D::IShape::_DistMax [protected, inherited] +
+
+ + + + + +
+   + + +

+Default to -1. +

+ +

+Definition at line 165 of file shape.h.

+

+ + + + +
+ + +
NLMISC::CSmartPtr<ITexture> NL3D::CWaterShape::_EnvMap[2] [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 210 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::doSimpleRender(), envMapUpdate(), getEnvMap(), setEnvMap(), NL3D::CWaterModel::setupMaterialNVertexShader(), and ~CWaterShape().

+

+ + + + +
+ + +
bool NL3D::CWaterShape::_GridSizeTouched = true [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 180 of file water_shape.cpp. +

+Referenced by setGridBorderSize(), setScreenGridSize(), setupVertexBuffer(), and NL3D::CWaterModel::traverseRender().

+

+ + + + +
+ + +
float NL3D::CWaterShape::_HeightMapNormalizationFactor[2] [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 225 of file water_shape.h. +

+Referenced by updateHeightMapNormalizationFactors().

+

+ + + + +
+ + +
NLMISC::CVector2f NL3D::CWaterShape::_HeightMapScale[2] [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 214 of file water_shape.h. +

+Referenced by CWaterShape(), NL3D::CWaterModel::doSimpleRender(), getHeightMapScale(), setHeightMapScale(), and NL3D::CWaterModel::setupMaterialNVertexShader().

+

+ + + + +
+ + +
NLMISC::CVector2f NL3D::CWaterShape::_HeightMapSpeed[2] [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 215 of file water_shape.h. +

+Referenced by CWaterShape(), NL3D::CWaterModel::doSimpleRender(), getHeightMapSpeed(), setHeightMapSpeed(), and NL3D::CWaterModel::setupMaterialNVertexShader().

+

+ + + + +
+ + +
bool NL3D::CWaterShape::_HeightMapTouch[2] [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 224 of file water_shape.h. +

+Referenced by CWaterShape(), setHeightMap(), and updateHeightMapNormalizationFactors().

+

+ + + + +
+ + +
std::vector< uint32 > NL3D::CWaterShape::_IBDownUp [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 178 of file water_shape.cpp. +

+Referenced by setupVertexBuffer().

+

+ + + + +
+ + +
std::vector< uint32 > NL3D::CWaterShape::_IBUpDown [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 177 of file water_shape.cpp. +

+Referenced by setupVertexBuffer().

+

+ + + + +
+ + +
uint32 NL3D::CWaterShape::_MaxGridSize [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 175 of file water_shape.cpp. +

+Referenced by setupVertexBuffer(), and NL3D::CWaterModel::traverseRender().

+

+ + + + +
+ + +
NLMISC::CPolygon2D NL3D::CWaterShape::_Poly [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 208 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::computeClippedPoly(), NL3D::CWaterModel::computeSimpleClippedPoly(), and NL3D::CWaterModel::doSimpleRender().

+

+ + + + +
+ + +
float NL3D::CWaterShape::_TransitionRatio [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 221 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::computeClippedPoly(), getTransitionRatio(), setTransitionRatio(), and NL3D::CWaterModel::traverseRender().

+

+ + + + +
+ + +
CVertexBuffer NL3D::CWaterShape::_VB [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 176 of file water_shape.cpp. +

+Referenced by NL3D::CWaterModel::traverseRender().

+

+ + + + +
+ + +
std::auto_ptr< CVertexProgram > NL3D::CWaterShape::_VertexProgramBump1 [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 181 of file water_shape.cpp. +

+Referenced by initVertexProgram().

+

+ + + + +
+ + +
std::auto_ptr< CVertexProgram > NL3D::CWaterShape::_VertexProgramBump1Diffuse [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 183 of file water_shape.cpp. +

+Referenced by initVertexProgram().

+

+ + + + +
+ + +
std::auto_ptr< CVertexProgram > NL3D::CWaterShape::_VertexProgramBump2 [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 182 of file water_shape.cpp. +

+Referenced by initVertexProgram(), and NL3D::CWaterModel::setupMaterialNVertexShader().

+

+ + + + +
+ + +
std::auto_ptr< CVertexProgram > NL3D::CWaterShape::_VertexProgramBump2Diffuse [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 184 of file water_shape.cpp. +

+Referenced by initVertexProgram(), and NL3D::CWaterModel::setupMaterialNVertexShader().

+

+ + + + +
+ + +
std::auto_ptr< CVertexProgram > NL3D::CWaterShape::_VertexProgramNoBump [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 185 of file water_shape.cpp. +

+Referenced by initVertexProgram().

+

+ + + + +
+ + +
std::auto_ptr< CVertexProgram > NL3D::CWaterShape::_VertexProgramNoBumpDiffuse [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 186 of file water_shape.cpp. +

+Referenced by initVertexProgram().

+

+ + + + +
+ + +
uint32 NL3D::CWaterShape::_WaterPoolID [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 209 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::getAttenuatedHeight(), NL3D::CWaterModel::getHeight(), NL3D::CWaterModel::getWaterHeightMapID(), getWaterPoolID(), setWaterPoolID(), and NL3D::CWaterModel::traverseRender().

+

+ + + + +
+ + +
float NL3D::CWaterShape::_WaveHeightFactor [private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 222 of file water_shape.h. +

+Referenced by NL3D::CWaterModel::getAttenuatedHeight(), NL3D::CWaterModel::getHeight(), NL3D::CWaterModel::getHeightFactor(), getWaveHeightFactor(), NL3D::CWaterModel::setupMaterialNVertexShader(), and setWaveHeightFactor().

+

+ + + + +
+ + +
uint32 NL3D::CWaterShape::_XGridBorder = 4 [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 173 of file water_shape.cpp. +

+Referenced by getXGridBorder(), setGridBorderSize(), setupVertexBuffer(), and NL3D::CWaterModel::traverseRender().

+

+ + + + +
+ + +
uint32 NL3D::CWaterShape::_XScreenGridSize = 40 [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 171 of file water_shape.cpp. +

+Referenced by getScreenXGridSize(), setScreenGridSize(), and setupVertexBuffer().

+

+ + + + +
+ + +
uint32 NL3D::CWaterShape::_YGridBorder = 4 [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 174 of file water_shape.cpp. +

+Referenced by getYGridBorder(), and setGridBorderSize().

+

+ + + + +
+ + +
uint32 NL3D::CWaterShape::_YScreenGridSize = 40 [static, private] +
+
+ + + + + +
+   + + +

+Tells this shape that it can replace its colormap by a lightmap during the zone lighting. +

+ +

+Definition at line 172 of file water_shape.cpp. +

+Referenced by getScreenYGridSize(), setScreenGridSize(), and setupVertexBuffer().

+

+ + + + +
+ + +
sint NLMISC::CRefCount::crefs [mutable, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 79 of file smart_ptr.h. +

+Referenced by NLMISC::CRefCount::CRefCount(), NLMISC::CRefCount::getRefCount(), and NLMISC::CRefCount::~CRefCount().

+

+ + + + +
+ + +
CRefCount::CPtrInfo NLMISC::CRefCount::NullPtrInfo [static, inherited] +
+
+ + + + + +
+   + + +

+ +

+Referenced by NLMISC::CRefCount::CRefCount().

+

+ + + + +
+ + +
CPtrInfo* NLMISC::CRefCount::pinfo [mutable, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 80 of file smart_ptr.h. +

+Referenced by NLMISC::CRefCount::CRefCount(), and NLMISC::CRefCount::~CRefCount().

+


The documentation for this class was generated from the following files: +
Generated on Tue Mar 16 08:31:25 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1