|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CMeshVPWindTree Class ReferenceVertexProgram for an effect of Wind on Tree meshes.
More...
#include <meshvp_wind_tree.h>
Inheritance diagram for NL3D::CMeshVPWindTree:
List of all members.
Public Types |
enum | { HrcDepth = 3
} |
Public Methods |
| CMeshVPWindTree () |
| Constructor. More...
|
virtual | ~CMeshVPWindTree () |
|
virtual void | initInstance (CMeshBaseInstance *mbi) |
| Setup a rand phase for wind in mbi. More...
|
virtual bool | begin (IDriver *drv, CScene *scene, CMeshBaseInstance *mbi, const NLMISC::CMatrix &invertedModelMat, const NLMISC::CVector &) |
| Setup Wind constants, Light constants, and activate the VP. More...
|
virtual void | end (IDriver *drv) |
| disable the VertexProgram. More...
|
virtual void | setupForMaterial (const CMaterial &mat, IDriver *drv, CScene *scene, CVertexBuffer *vb) |
| Setup this shader for the given material. More...
|
virtual void | setupForMaterial (const CMaterial &mat, IDriver *drv, CScene *scene, IVertexBufferHard *vb) |
| The same as setupForMaterial, but with a hard vb. More...
|
virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| NLMISC_DECLARE_CLASS (CMeshVPWindTree) |
Public Attributes |
|
float | Frequency [HrcDepth] |
| Frequency of the wind for 3 Hierachy levels. More...
|
float | FrequencyWindFactor [HrcDepth] |
| Additional frequency, multiplied by the globalWindPower. More...
|
float | PowerXY [HrcDepth] |
| Power of the wind on XY. Mul by globalWindPower. More...
|
float | PowerZ [HrcDepth] |
| Power of the wind on Z. Mul by globalWindPower. More...
|
float | Bias [HrcDepth] |
| Bias result of the cosinus: f= cos(time)+bias. More...
|
bool | SpecularLighting |
| true if want Specular Lighting. More...
|
Private Types |
enum | { NumVp = 16
} |
Private Methods |
void | setupLighting (CScene *scene, CMeshBaseInstance *mbi, const NLMISC::CMatrix &invertedModelMat) |
Static Private Methods |
float | speedCos (float angle) |
Private Attributes |
float | _CurrentTime [HrcDepth] |
double | _LastSceneTime |
CVector | _MaxDeltaPos [HrcDepth] |
Static Private Attributes |
std::auto_ptr< CVertexProgram > | _VertexProgram [NumVp] |
| The 16 versions: Specular or not (0 or 2), + normalize normal or not (0 or 1). More...
|
Detailed Description
VertexProgram for an effect of Wind on Tree meshes.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2002
Definition at line 44 of file meshvp_wind_tree.h.
Member Enumeration Documentation
Constructor & Destructor Documentation
NL3D::CMeshVPWindTree::CMeshVPWindTree |
( |
|
) |
|
|
NL3D::CMeshVPWindTree::~CMeshVPWindTree |
( |
|
) |
[virtual] |
|
Member Function Documentation
|
Setup Wind constants, Light constants, and activate the VP.
Implements NL3D::IMeshVertexProgram.
Definition at line 176 of file meshvp_wind_tree.cpp.
References _CurrentTime, _LastSceneTime, _MaxDeltaPos, _VertexProgram, Bias, NLMISC::clamp, Frequency, FrequencyWindFactor, HrcDepth, nlassert, PowerXY, PowerZ, setupLighting, SpecularLighting, and speedCos. |
void NL3D::CMeshVPWindTree::end |
( |
IDriver * |
drv |
) |
[virtual] |
|
NL3D::CMeshVPWindTree::NLMISC_DECLARE_CLASS |
( |
CMeshVPWindTree |
|
) |
|
|
float NL3D::CMeshVPWindTree::speedCos |
( |
float |
angle |
) |
[static, private] |
|
Member Data Documentation
float NL3D::CMeshVPWindTree::_CurrentTime[HrcDepth] [private]
|
|
double NL3D::CMeshVPWindTree::_LastSceneTime [private]
|
|
CVector NL3D::CMeshVPWindTree::_MaxDeltaPos[HrcDepth] [private]
|
|
std::auto_ptr< CVertexProgram > NL3D::CMeshVPWindTree::_VertexProgram [static, private]
|
|
|
The 16 versions: Specular or not (0 or 2), + normalize normal or not (0 or 1).
All multiplied by 4, because support from 0 to 3 pointLights activated. (0.., 4.., 8.., 12..)
Definition at line 51 of file meshvp_wind_tree.cpp.
Referenced by begin, and initInstance. |
float NL3D::CMeshVPWindTree::Bias[HrcDepth]
|
|
float NL3D::CMeshVPWindTree::Frequency[HrcDepth]
|
|
float NL3D::CMeshVPWindTree::FrequencyWindFactor[HrcDepth]
|
|
float NL3D::CMeshVPWindTree::PowerXY[HrcDepth]
|
|
float NL3D::CMeshVPWindTree::PowerZ[HrcDepth]
|
|
bool NL3D::CMeshVPWindTree::SpecularLighting
|
|
The documentation for this class was generated from the following files:
|
|