#include <water_shape.h>
Inheritance diagram for NL3D::CWaveMakerShape:
Definition at line 251 of file water_shape.h.
Public Member Functions | |
virtual bool | clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix) |
inherited from IShape | |
virtual CTransformShape * | createInstance (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 |
CTrackDefaultVector * | getDefaultPos () |
float | getDistMax () const |
bool | getImpulsionMode () const |
float | getIntensity () const |
virtual float | getNumTriangles (float distance) |
inherited from ishape | |
TAnimationTime | getPeriod () const |
float | getRadius () const |
const sint & | getRefCount () const |
uint32 | getWaterPoolID () const |
NLMISC_DECLARE_CLASS (CWaveMakerShape) | |
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) |
void | setImpulsionMode (bool on=true) |
use a periodic impulsion rather than a sinus | |
void | setIntensity (float intensity) |
set the intensity of the waves | |
void | setPeriod (TAnimationTime period) |
set the period for this wave maker | |
void | setRadius (float radius) |
radius of the impulsion | |
void | setWaterPoolID (uint32 id) |
set the water pool that's being modified | |
Mesh Block Render Interface | |
virtual IMeshGeom * | supportMeshBlockRendering (CTransformShape *trans, float &polygonCount) const |
Lighting method | |
virtual bool | useLightingLocalAttenuation () const |
Mesh Block Render Interface | |
virtual IMeshGeom * | supportMeshBlockRendering (CTransformShape *trans, float &polygonCount) const |
Mesh Block Render Interface | |
virtual IMeshGeom * | supportMeshBlockRendering (CTransformShape *trans, float &polygonCount) const |
Lighting method | |
virtual bool | useLightingLocalAttenuation () const |
Mesh Block Render Interface | |
virtual IMeshGeom * | supportMeshBlockRendering (CTransformShape *trans, float &polygonCount) const |
Lighting method | |
virtual bool | useLightingLocalAttenuation () const |
Mesh Block Render Interface | |
virtual IMeshGeom * | supportMeshBlockRendering (CTransformShape *trans, float &polygonCount) const |
Lighting method | |
virtual bool | useLightingLocalAttenuation () const |
Mesh Block Render Interface | |
virtual IMeshGeom * | supportMeshBlockRendering (CTransformShape *trans, float &polygonCount) const |
Lighting method | |
virtual bool | useLightingLocalAttenuation () const |
Object | |
CWaveMakerShape () | |
ctor | |
void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
serial this shape | |
~CWaveMakerShape () | |
dtor | |
Mesh Block Render Interface | |
virtual IMeshGeom * | supportMeshBlockRendering (CTransformShape *trans, float &polygonCount) const |
Lighting method | |
virtual bool | useLightingLocalAttenuation () const |
Mesh Block Render Interface | |
virtual IMeshGeom * | supportMeshBlockRendering (CTransformShape *trans, float &polygonCount) const |
Lighting method | |
virtual bool | useLightingLocalAttenuation () const |
Data Fields | |
sint | crefs |
CPtrInfo * | pinfo |
Static Public Attributes | |
CPtrInfo | NullPtrInfo |
Protected Attributes | |
float | _DistMax |
Default to -1. | |
Private Attributes | |
CTrackDefaultVector | _DefaultPos |
bool | _ImpulsionMode |
float | _Intensity |
TAnimationTime | _Period |
uint32 | _PoolID |
float | _Radius |
Friends | |
struct | CPtrInfo |
class | CWaveMakerModel |
|
ctor
Definition at line 660 of file water_shape.cpp.
00660 : _Period(1), 00661 _Radius(3), 00662 _PoolID(0), 00663 _Intensity(1), 00664 _ImpulsionMode(true) 00665 { 00666 } |
|
dtor
Definition at line 670 of file water_shape.cpp.
00671 { 00672 } |
|
inherited from IShape
Reimplemented from NL3D::IShape. Definition at line 695 of file water_shape.cpp. References _PoolID, NL3D::CWaterPoolManager::getPoolByID(), NLMISC::CMatrix::getPos(), NL3D::CWaterHeightMap::getSize(), NL3D::CWaterHeightMap::getUnitSize(), and NL3D::GetWaterPoolManager().
00696 { 00697 // we just test if not too far 00698 const CWaterHeightMap &whm = GetWaterPoolManager().getPoolByID(_PoolID); 00699 const float maxDist = 0.5f * whm.getUnitSize() * whm.getSize(); 00700 const NLMISC::CVector pos = worldMatrix.getPos(); 00701 for (std::vector<NLMISC::CPlane>::const_iterator it = pyramid.begin(); it != pyramid.end(); ++it) 00702 { 00703 if ((*it) * pos > maxDist) return false; 00704 } 00705 return true; 00706 00707 } |
|
inherited from IShape
Reimplemented from NL3D::IShape. Definition at line 684 of file water_shape.cpp. References NL3D::CAnimatedValueVector, NL3D::CScene::createModel(), NL3D::CTrackDefaultBlendable< CVector >::getValue(), NL3D::CTransformShape::Shape, and NL3D::WaveMakerModelClassId.
00685 { 00686 CWaveMakerModel *wmm = NLMISC::safe_cast<CWaveMakerModel *>(scene.createModel(WaveMakerModelClassId) ); 00687 wmm->Shape = this; 00688 // set default pos & scale 00689 wmm->ITransformable::setPos( ((CAnimatedValueVector&)_DefaultPos.getValue()).Value ); 00690 return wmm; 00691 } |
|
inherited from ishape
Implements NL3D::IShape. Definition at line 285 of file water_shape.h. References uint.
00285 {} |
|
inherited from IShape
Reimplemented from NL3D::IShape. Definition at line 710 of file water_shape.cpp. References NLMISC::CAABBox::setCenter(), and NLMISC::CAABBox::setHalfSize().
00711 { 00712 // its just a point 00713 bbox.setCenter(NLMISC::CVector::Null); 00714 bbox.setHalfSize(NLMISC::CVector::Null); 00715 } |
|
Implemented in NLAIAGENT::CNumericIndex, NLAIC::IPointerGestion, NLAIC::CIdentType, and CAutomataDesc. Referenced by NLMISC::CClassRegistry::checkObject(), and NL3D::GetTextureSize(). |
|
Definition at line 308 of file water_shape.h. Referenced by NL3D::CWaveMakerModel::getDefaultTrack().
00308 {return &_DefaultPos;} |
|
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;} |
|
Definition at line 306 of file water_shape.h. References _ImpulsionMode.
00306 { return _ImpulsionMode; } |
|
Definition at line 294 of file water_shape.h.
00294 { return _Intensity; } |
|
inherited from ishape
Implements NL3D::IShape. Definition at line 282 of file water_shape.h.
00282 { return 0; }
|
|
Definition at line 290 of file water_shape.h. References NL3D::TAnimationTime.
00290 { return _Period; } |
|
Definition at line 298 of file water_shape.h.
00298 { return _Radius; } |
|
Definition at line 70 of file smart_ptr.h. References NLMISC::CRefCount::crefs, and sint.
00071 { 00072 return crefs; 00073 } |
|
Definition at line 302 of file water_shape.h. References _PoolID, and uint32.
00302 { return _PoolID; } |
|
|
|
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 {} |
|
inherited from IShape. Does nothing. A new traverseRender() was set for that
Implements NL3D::IShape. Definition at line 276 of file water_shape.h.
00276 {} |
|
serial this shape
Implements NLMISC::IStreamable. Definition at line 676 of file water_shape.cpp.
00677 { 00678 f.serialVersion(0); 00679 f.serial(_Period, _Radius, _Intensity, _PoolID, _ImpulsionMode); 00680 } |
|
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().
|
|
use a periodic impulsion rather than a sinus
Definition at line 305 of file water_shape.h. References _ImpulsionMode.
00305 { _ImpulsionMode = on; } |
|
set the intensity of the waves
Definition at line 293 of file water_shape.h.
00293 { _Intensity = intensity; } |
|
set the period for this wave maker
Definition at line 289 of file water_shape.h. References NL3D::TAnimationTime.
00289 { _Period = period; } |
|
radius of the impulsion
Definition at line 297 of file water_shape.h.
00297 { _Radius = radius; } |
|
set the water pool that's being modified
Definition at line 301 of file water_shape.h. References _PoolID, and uint32.
00301 { _PoolID = id; } |
|
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.
Reimplemented in NL3D::CMesh, NL3D::CMeshMRM, NL3D::CMeshMRMSkinned, and NL3D::CMeshMultiLod. Definition at line 158 of file shape.h.
00158 {return NULL;}
|
|
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;} |
|
Definition at line 67 of file smart_ptr.h. |
|
Definition at line 310 of file water_shape.h. |
|
Definition at line 316 of file water_shape.h. |
|
Default to -1.
|
|
Definition at line 315 of file water_shape.h. Referenced by getImpulsionMode(), setImpulsionMode(), and NL3D::CWaveMakerModel::traverseAnimDetail(). |
|
Definition at line 314 of file water_shape.h. Referenced by NL3D::CWaveMakerModel::traverseAnimDetail(). |
|
Definition at line 311 of file water_shape.h. Referenced by NL3D::CWaveMakerModel::traverseAnimDetail(). |
|
Definition at line 313 of file water_shape.h. Referenced by clip(), getWaterPoolID(), setWaterPoolID(), and NL3D::CWaveMakerModel::traverseAnimDetail(). |
|
Definition at line 312 of file water_shape.h. Referenced by NL3D::CWaveMakerModel::traverseAnimDetail(). |
|
Definition at line 79 of file smart_ptr.h. Referenced by NLMISC::CRefCount::CRefCount(), NLMISC::CRefCount::getRefCount(), and NLMISC::CRefCount::~CRefCount(). |
|
Referenced by NLMISC::CRefCount::CRefCount(). |
|
Definition at line 80 of file smart_ptr.h. Referenced by NLMISC::CRefCount::CRefCount(), and NLMISC::CRefCount::~CRefCount(). |