From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- .../nel/classNL3D_1_1CPSConstraintMesh.html | 3196 ++++++++++++++++++++ 1 file changed, 3196 insertions(+) create mode 100644 docs/doxygen/nel/classNL3D_1_1CPSConstraintMesh.html (limited to 'docs/doxygen/nel/classNL3D_1_1CPSConstraintMesh.html') diff --git a/docs/doxygen/nel/classNL3D_1_1CPSConstraintMesh.html b/docs/doxygen/nel/classNL3D_1_1CPSConstraintMesh.html new file mode 100644 index 00000000..efea2c0f --- /dev/null +++ b/docs/doxygen/nel/classNL3D_1_1CPSConstraintMesh.html @@ -0,0 +1,3196 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NL3D::CPSConstraintMesh Class Reference

This class is for mesh that have very simple geometry. +More... +

+#include <ps_mesh.h> +

+

Inheritance diagram for NL3D::CPSConstraintMesh: +

+ +NL3D::CPSParticle +NL3D::CPSSizedParticle +NL3D::CPSRotated3DPlaneParticle +NL3D::CPSHintParticleRotateTheSame +NL3D::CPSShapeParticle +NL3D::CPSColoredParticle +NL3D::CPSLocatedBindable +NLMISC::IStreamable +NLMISC::IClassable + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

[NOHEADER]

enum  TTexAnimType { NoAnim = 0, +GlobalAnim, +Last + }
 The type of animation that is used with meshs textures. More...

void setTexAnimType (TTexAnimType type)
 Set the type of texture animation to use. None is the default. Setting a new value discard the previous change. More...

TTexAnimType getTexAnimType () const
 Get the the type of texture animation. More...


Public Types


Public Methods

 CPSConstraintMesh ()
 ctor. More...

virtual ~CPSConstraintMesh ()
void setShape (const std::string &meshFileName)
 Construct the mesh by using the given mesh shape file. More...

std::string getShape (void) const
 Get the shape used for those particles. (must use no morphing or an assertion is raised). More...

void setShapes (const std::string *shapesNames, uint numShapes)
 Setup the mesh for morphing use. More...

void setShape (uint index, const std::string &shapeName)
 Set a shape by its index. More...

const std::string & getShape (uint index) const
 Get a shape name by its index. More...

uint getNumShapes () const
 Get the number of shapes used. More...

void getShapesNames (std::string *shapesNames) const
 Retrieve the names of the shapes. More...

void setMorphValue (float value)
 Use a constant value for morphing. This discard any scheme for the morph value. The value must range from 0 to numberOfShapes. More...

float getMorphValue () const
 Get the value used for morphing. More...

void setMorphScheme (CPSAttribMaker< float > *scheme)
 Set a morphing scheme. The scheme is then owned by this object. More...

CPSAttribMaker< float > * getMorphScheme ()
 Get the current morphing scheme or NULL if no one was set. More...

const CPSAttribMaker< float > * getMorphScheme () const
 Get the current morphing scheme or NULL if no one was set. Const version. More...

void hintRotateTheSame (uint32 nbConfiguration, float minAngularVelocity=NLMISC::Pi, float maxAngularVelocity=NLMISC::Pi)
 Tells that all meshs are turning in the same manner, and only have a rotationnal bias This is a lot faster then other method. More...

void disableHintRotateTheSame (void)
 disable the hint 'hintRotateTheSame' The previous set scheme for roation is used. More...

uint32 checkHintRotateTheSame (float &min, float &max) const
 check wether a call to hintRotateTheSame was performed. More...

virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 serialisation. Derivers must override this, and call their parent version. More...

 NLMISC_DECLARE_CLASS (CPSConstraintMesh)
virtual bool hasTransparentFaces (void)
 return true if there are transparent faces in the object. More...

virtual bool hasOpaqueFaces (void)
 return true if there are Opaque faces in the object. More...

virtual uint32 getMaxNumFaces (void) const
 return the max number of faces needed for display. This is needed for LOD balancing. More...

void forceStageModulationByColor (uint stage, bool force)
 Force the n-th stage of all material to be modulated by the mesh color. More...

bool isStageModulationForced (uint stage) const
 Test if the i-th stage of all materials is forced to be modulated with the mesh color. More...

void forceVertexColorLighting (bool force=true)
 force all material to use vertex color lighting. More...

bool isVertexColorLightingForced () const
 test wether vertex color lighting is forced. More...

void setGlobalTexAnim (uint stage, const CGlobalTexAnim &properties)
 Set the properties of texture animation for a texture stage. Global animation should have been activated. More...

const CGlobalTexAnimgetGlobalTexAnim (uint stage) const
 Get the properties of texture animation.Global animation should have been activated. More...

void forceGlobalAnimTimeResetOnNewElement (bool force=true)
 Force the time counter for global anim to be reseted when a new mesh is created. More...

bool isGlobalAnimTimeResetOnNewElementForced () const

Static Public Methods

void initPrerotVB ()
 Setup the buffers used with prerotated meshs. Must be called during initialization. More...


Protected Types

typedef std::vector< CRdrPassTRdrPassSet
 A set of rendering pass. More...

typedef NLMISC::CSmartPtr<
+ IShape
PShape
typedef std::vector< std::string > TShapeNameVect
typedef std::vector< PShapeTShapeVect
typedef std::auto_ptr< CGlobalTexAnimsPGlobalTexAnims

Protected Methods

virtual CPSLocatedgetColorOwner (void)
 deriver must return their owner there. More...

virtual void updateMatAndVbForColor (void)
 Update the material and the vb and the like so that they match the color scheme. More...

virtual void newElement (CPSLocated *emitterLocated, uint32 emitterIndex)
 Generate a new element. More...

virtual void deleteElement (uint32 index)
 Delete an element by its index. More...

virtual void step (TPSProcessPass pass, TAnimationTime ellapsedTime, TAnimationTime realEt)
 process one pass for the particles. More...

void draw (bool opaque, TAnimationTime ellapsedTime)
 called by the system when particles must be drawn. More...

void drawPreRotatedMeshs (bool opaque, TAnimationTime ellapsedTime)
 draw for pre-rotated meshs. More...

void releaseShapes ()
 release the shapes used by this particle. More...

void computeColors (CVertexBuffer &outVB, const CVertexBuffer &inVB, uint startIndex, uint toProcess, uint32 srcStep)
 Compute (optionnal) mesh colors. More...

virtual void resize (uint32 size)
 Resize the bindable attributes containers. More...

bool update (void)
 Build the mesh data, if the 'touch' flag is set. More...

CVertexBuffermakePrerotatedVb (const CVertexBuffer &inVB, TAnimationTime ellapsedTime)
 make a vb for the prerotated mesh from a source vb. More...

void restoreMaterials ()
void CPSConstraintMesh::setupRenderPasses (float date, TRdrPassSet &rdrPasses, bool opaque)
 Setup a set of rendering passes. More...

void doRenderPasses (IDriver *driver, uint numObj, TRdrPassSet &rdrPasses, bool opaque)
 Perform a set of rendering passes. The VB must have been activated in the driver before to call this. More...

void fillIndexesInPrecompBasis (void)
 fill _IndexInPrecompBasis with index in the range [0.. nb configurations[. More...

void clean (void)
virtual CPSLocatedgetSizeOwner (void)
 deriver must return their owner there. More...

virtual CPSLocatedgetPlaneBasisOwner (void)
 if this is false, constant size will be used instead of a scheme deriver must return their owner there. More...


Protected Attributes

TShapeNameVect _MeshShapeFileName
TShapeVect _Shapes
uint _NumFaces
CShapeBank_ModelBank
float _MinAngularVelocity
float _MaxAngularVelocity
std::vector< CPlaneBasisPair_PrecompBasis
 a set of precomp basis, before and after transfomation in world space, used if the hint 'RotateTheSame' has been called. More...

std::vector< uint32_IndexInPrecompBasis
 this contain an index in _PrecompBasis for each particle. More...

uint8 _ModulatedStages
 A 'bitfield' to force some stage to be modulated with the primary color. More...

uint8 _Touched: 1
uint8 _HasTransparentFaces: 1
uint8 _HasOpaqueFaces: 1
uint8 _VertexColorLightingForced: 1
uint8 _GlobalAnimationEnabled: 1
uint8 _ReinitGlobalAnimTimeOnNewElement: 1
PGlobalTexAnims _GlobalTexAnims
float _GlobalAnimDate
morphing
float _MorphValue
CPSAttribMaker< float > * _MorphScheme

Static Protected Attributes

CMeshDisplayShare _MeshDisplayShare
 manage vertex buffers and primitive blocks used for rendering. More...

CVertexBuffer _PreRotatedMeshVB
 vertex buffer used with prerotated meshs. More...

CVertexBuffer _PreRotatedMeshVBWithNormal

Private Methods

 CPSConstraintMesh (const CPSConstraintMesh &)
CPSConstraintMesh & operator= (const CPSConstraintMesh &other)

Friends

class CPSConstraintMeshHelper
class CMeshDisplayShare
+

Detailed Description

+This class is for mesh that have very simple geometry. +

+The constraint is that they can only have one matrix block. They got a hint for constant rotation scheme. With little meshs, this is the best to draw a maximum of them +

+ +

+Definition at line 163 of file ps_mesh.h.


Member Typedef Documentation

+

+ + + + +
+ + +
typedef std::auto_ptr<CGlobalTexAnims> NL3D::CPSConstraintMesh::PGlobalTexAnims [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 541 of file ps_mesh.h. +

+Referenced by setTexAnimType.

+

+ + + + +
+ + +
typedef NLMISC::CSmartPtr<IShape> NL3D::CPSConstraintMesh::PShape [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 427 of file ps_mesh.h.

+

+ + + + +
+ + +
typedef std::vector<CRdrPass> NL3D::CPSConstraintMesh::TRdrPassSet [protected] +
+
+ + + + + +
+   + + +

+A set of rendering pass. +

+ +

+Definition at line 409 of file ps_mesh.h. +

+Referenced by NL3D::CPSConstraintMesh::CMeshDisplayShare::buildRdrPassSet, and restoreMaterials.

+

+ + + + +
+ + +
typedef std::vector<std::string> NL3D::CPSConstraintMesh::TShapeNameVect [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 428 of file ps_mesh.h.

+

+ + + + +
+ + +
typedef std::vector<PShape> NL3D::CPSConstraintMesh::TShapeVect [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 429 of file ps_mesh.h.

+


Member Enumeration Documentation

+

+ + + + +
+ + +
enum NL3D::CPSConstraintMesh::TTexAnimType +
+
+ + + + + +
+   + + +

+The type of animation that is used with meshs textures. +

+

+Enumeration values:
+ + + + +
NoAnim  +
GlobalAnim  +
Last  +
+
+ +

+Definition at line 306 of file ps_mesh.h.

+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CPSConstraintMesh::CPSConstraintMesh  
+
+ + + + + +
+   + + +

+ctor. +

+ +

+Definition at line 895 of file ps_mesh.cpp. +

+References NL3D::CPSLocatedBindable::_Name. +

+Referenced by CPSConstraintMesh, and operator=.

+

+ + + + +
+ + + + + + + + + +
NL3D::CPSConstraintMesh::~CPSConstraintMesh   [virtual]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1373 of file ps_mesh.cpp. +

+References _MorphScheme, and clean.

+

+ + + + +
+ + + + + + + + + + +
NL3D::CPSConstraintMesh::CPSConstraintMesh const CPSConstraintMesh &   [inline, private]
+
+ + + + + +
+   + + +

+ +

+Definition at line 552 of file ps_mesh.h. +

+References CPSConstraintMesh, and nlassert.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
uint32 NL3D::CPSConstraintMesh::checkHintRotateTheSame float &   min,
float &   max
const [inline, virtual]
+
+ + + + + +
+   + + +

+check wether a call to hintRotateTheSame was performed. +

+

+Returns:
+0 if the hint is disabled, the number of configurations else
+See also:
+hintRotateTheSame(), CPSRotated3dPlaneParticle
+

+Implements NL3D::CPSHintParticleRotateTheSame. +

+Definition at line 260 of file ps_mesh.h. +

+References _MaxAngularVelocity, _MinAngularVelocity, _PrecompBasis, and min.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::clean void   [protected]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1395 of file ps_mesh.cpp. +

+References releaseShapes. +

+Referenced by update, and ~CPSConstraintMesh.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::computeColors CVertexBuffer  outVB,
const CVertexBuffer  inVB,
uint   startIndex,
uint   toProcess,
uint32   srcStep
[protected]
+
+ + + + + +
+   + + +

+Compute (optionnal) mesh colors. +

+

+Parameters:
+ + + + + +
outVB  +The destination VB.
inVB  +the vb of the current shape
startIndex  +Index of the mesh being processed
toProcess  +Number of meshs to process
+
+

+Definition at line 1680 of file ps_mesh.cpp. +

+References NL3D::CPSColoredParticle::_ColorScheme, NL3D::CPSLocatedBindable::_Owner, NLMISC::CRGBA::modulateColors, and nlassert.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::CPSConstraintMesh::setupRenderPasses float   date,
TRdrPassSet  rdrPasses,
bool   opaque
[protected]
+
+ + + + + +
+   + + +

+Setup a set of rendering passes. +

+

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::deleteElement uint32   index [protected, virtual]
+
+ + + + + +
+   + + +

+Delete an element by its index. +

+ +

+Implements NL3D::CPSParticle. +

+Definition at line 1729 of file ps_mesh.cpp. +

+References _IndexInPrecompBasis, _MorphScheme, NL3D::CPSLocatedBindable::_Owner, _PrecompBasis, NL3D::CPSColoredParticle::deleteColorElement, NL3D::CPSRotated3DPlaneParticle::deletePlaneBasisElement, NL3D::CPSSizedParticle::deleteSizeElement, and index.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::disableHintRotateTheSame void   [inline, virtual]
+
+ + + + + +
+   + + +

+disable the hint 'hintRotateTheSame' The previous set scheme for roation is used. +

+

+See also:
+hintRotateTheSame(), CPSRotated3dPlaneParticle
+

+Implements NL3D::CPSHintParticleRotateTheSame. +

+Definition at line 250 of file ps_mesh.h. +

+References hintRotateTheSame.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::doRenderPasses IDriver  driver,
uint   numObj,
TRdrPassSet  rdrPasses,
bool   opaque
[protected]
+
+ + + + + +
+   + + +

+Perform a set of rendering passes. The VB must have been activated in the driver before to call this. +

+ +

+Definition at line 1657 of file ps_mesh.cpp. +

+References NL3D::ConstraintMeshBufSize.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::draw bool   opaque,
TAnimationTime   ellapsedTime
[protected]
+
+ + + + + +
+   + + +

+called by the system when particles must be drawn. +

+

+Parameters:
+ + +
opaque  +true if we are dealing with the opaque pass, false for transparent faces
+
+

+Definition at line 1505 of file ps_mesh.cpp. +

+References _IndexInPrecompBasis, NL3D::CPSLocatedBindable::_Owner, _PrecompBasis, NL3D::CPSParticle::computeSrcStep, nlassert, step, NL3D::TAnimationTime, NL3D::TIteratorVectStep1616, and update. +

+Referenced by step.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::drawPreRotatedMeshs bool   opaque,
TAnimationTime   ellapsedTime
[protected]
+
+ + + + + +
+   + + +

+draw for pre-rotated meshs. +

+

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::fillIndexesInPrecompBasis void   [protected]
+
+ + + + + +
+   + + +

+fill _IndexInPrecompBasis with index in the range [0.. nb configurations[. +

+ +

+Definition at line 1224 of file ps_mesh.cpp. +

+References _IndexInPrecompBasis, NL3D::CPSLocatedBindable::_Owner, and _PrecompBasis. +

+Referenced by hintRotateTheSame.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::forceGlobalAnimTimeResetOnNewElement bool   force = true [inline]
+
+ + + + + +
+   + + +

+Force the time counter for global anim to be reseted when a new mesh is created. +

+ +

+Definition at line 340 of file ps_mesh.h. +

+References _ReinitGlobalAnimTimeOnNewElement.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::forceStageModulationByColor uint   stage,
bool   force
+
+ + + + + +
+   + + +

+Force the n-th stage of all material to be modulated by the mesh color. +

+This allow to put colors on meshs that haven't got material that allow them.

+Parameters:
+ + + +
stage  +The stage the modulation applies on. Range from 0 to IDRV_MAT_MAXTEXTURES - 1.
force  +True enable modulation, false disable it.
+
+

+Definition at line 1765 of file ps_mesh.cpp. +

+References _ModulatedStages, NL3D::IDRV_MAT_MAXTEXTURES, and nlassert.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::forceVertexColorLighting bool   force = true [inline]
+
+ + + + + +
+   + + +

+force all material to use vertex color lighting. +

+ +

+Definition at line 295 of file ps_mesh.h. +

+References _VertexColorLightingForced.

+

+ + + + +
+ + + + + + + + + + +
virtual CPSLocated* NL3D::CPSConstraintMesh::getColorOwner void   [inline, protected, virtual]
+
+ + + + + +
+   + + +

+deriver must return their owner there. +

+ +

+Implements NL3D::CPSColoredParticle. +

+Definition at line 350 of file ps_mesh.h. +

+References NL3D::CPSLocatedBindable::_Owner, and NL3D::CPSLocatedBindable::CPSLocated.

+

+ + + + +
+ + + + + + + + + + +
const CPSConstraintMesh::CGlobalTexAnim & NL3D::CPSConstraintMesh::getGlobalTexAnim uint   stage const
+
+ + + + + +
+   + + +

+Get the properties of texture animation.Global animation should have been activated. +

+ +

+Definition at line 2053 of file ps_mesh.cpp. +

+References _GlobalAnimationEnabled, _GlobalTexAnims, NL3D::IDRV_MAT_MAXTEXTURES, and nlassert.

+

+ + + + +
+ + + + + + + + + + +
uint32 NL3D::CPSConstraintMesh::getMaxNumFaces void   const [virtual]
+
+ + + + + +
+   + + +

+return the max number of faces needed for display. This is needed for LOD balancing. +

+ +

+Implements NL3D::CPSParticle. +

+Definition at line 909 of file ps_mesh.cpp. +

+References _NumFaces, and NL3D::CPSLocatedBindable::_Owner.

+

+ + + + +
+ + + + + + + + + +
const CPSAttribMaker< float > * NL3D::CPSConstraintMesh::getMorphScheme   const
+
+ + + + + +
+   + + +

+Get the current morphing scheme or NULL if no one was set. Const version. +

+ +

+Definition at line 1020 of file ps_mesh.cpp. +

+References _MorphScheme.

+

+ + + + +
+ + + + + + + + + +
CPSAttribMaker< float > * NL3D::CPSConstraintMesh::getMorphScheme  
+
+ + + + + +
+   + + +

+Get the current morphing scheme or NULL if no one was set. +

+ +

+Definition at line 1014 of file ps_mesh.cpp. +

+References _MorphScheme.

+

+ + + + +
+ + + + + + + + + +
float NL3D::CPSConstraintMesh::getMorphValue   const
+
+ + + + + +
+   + + +

+Get the value used for morphing. +

+ +

+Definition at line 1000 of file ps_mesh.cpp. +

+References _MorphValue.

+

+ + + + +
+ + + + + + + + + +
uint NL3D::CPSConstraintMesh::getNumShapes   const
+
+ + + + + +
+   + + +

+Get the number of shapes used. +

+ +

+Definition at line 959 of file ps_mesh.cpp. +

+References _MeshShapeFileName.

+

+ + + + +
+ + + + + + + + + + +
virtual CPSLocated* NL3D::CPSConstraintMesh::getPlaneBasisOwner void   [inline, protected, virtual]
+
+ + + + + +
+   + + +

+if this is false, constant size will be used instead of a scheme deriver must return their owner there. +

+ +

+Implements NL3D::CPSRotated3DPlaneParticle. +

+Definition at line 518 of file ps_mesh.h. +

+References NL3D::CPSLocatedBindable::_Owner, and NL3D::CPSLocatedBindable::CPSLocated.

+

+ + + + +
+ + + + + + + + + + +
const std::string & NL3D::CPSConstraintMesh::getShape uint   index const
+
+ + + + + +
+   + + +

+Get a shape name by its index. +

+ +

+Definition at line 982 of file ps_mesh.cpp. +

+References _MeshShapeFileName, index, and nlassert.

+

+ + + + +
+ + + + + + + + + + +
std::string NL3D::CPSConstraintMesh::getShape void   const [virtual]
+
+ + + + + +
+   + + +

+Get the shape used for those particles. (must use no morphing or an assertion is raised). +

+ +

+Implements NL3D::CPSShapeParticle. +

+Definition at line 944 of file ps_mesh.cpp. +

+References _MeshShapeFileName, and nlassert.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::getShapesNames std::string *   shapesNames const
+
+ + + + + +
+   + + +

+Retrieve the names of the shapes. +

+

+Parameters:
+ + +
shapesNames  +:A tab of shapes with enough spaces to store the names
+
+

+Definition at line 965 of file ps_mesh.cpp. +

+References _MeshShapeFileName.

+

+ + + + +
+ + + + + + + + + + +
virtual CPSLocated* NL3D::CPSConstraintMesh::getSizeOwner void   [inline, protected, virtual]
+
+ + + + + +
+   + + +

+deriver must return their owner there. +

+ +

+Implements NL3D::CPSSizedParticle. +

+Definition at line 517 of file ps_mesh.h. +

+References NL3D::CPSLocatedBindable::_Owner, and NL3D::CPSLocatedBindable::CPSLocated.

+

+ + + + +
+ + + + + + + + + +
CPSConstraintMesh::TTexAnimType NL3D::CPSConstraintMesh::getTexAnimType   const
+
+ + + + + +
+   + + +

+Get the the type of texture animation. +

+ +

+Definition at line 2063 of file ps_mesh.cpp. +

+References _GlobalAnimationEnabled, GlobalAnim, and NoAnim. +

+Referenced by setTexAnimType.

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CPSConstraintMesh::hasOpaqueFaces void   [virtual]
+
+ + + + + +
+   + + +

+return true if there are Opaque faces in the object. +

+ +

+Implements NL3D::CPSParticle. +

+Definition at line 927 of file ps_mesh.cpp. +

+References _HasOpaqueFaces, _Touched, and update. +

+Referenced by step, and update.

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CPSConstraintMesh::hasTransparentFaces void   [virtual]
+
+ + + + + +
+   + + +

+return true if there are transparent faces in the object. +

+ +

+Implements NL3D::CPSParticle. +

+Definition at line 918 of file ps_mesh.cpp. +

+References _HasTransparentFaces, _Touched, and update. +

+Referenced by step, and update.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::hintRotateTheSame uint32   nbConfiguration,
float   minAngularVelocity = NLMISC::Pi,
float   maxAngularVelocity = NLMISC::Pi
[virtual]
+
+ + + + + +
+   + + +

+Tells that all meshs are turning in the same manner, and only have a rotationnal bias This is a lot faster then other method. +

+Any previous set scheme for 3d rotation is kept.

+am: the number of rotation configuration we have. The more high it is, the slower it'll be
+ If this is too low, a lot of particles will have the same orientation If it is 0, then the hint is disabled. This can't be higher than ConstraintMeshMaxNumPrerotatedModels
+Parameters:
+ + + +
minAngularVelocity  +: the maximum angular velocity for particle rotation
maxAngularVelocity  +: the maximum angular velocity for particle rotation
+
+See also:
+CPSRotated3dPlaneParticle
+

+Implements NL3D::CPSHintParticleRotateTheSame. +

+Definition at line 1189 of file ps_mesh.cpp. +

+References _MaxAngularVelocity, _MinAngularVelocity, _PrecompBasis, NL3D::ConstraintMeshMaxNumPrerotatedModels, fillIndexesInPrecompBasis, NL3D::MakeRandomUnitVect, nlassert, and v. +

+Referenced by disableHintRotateTheSame.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CPSConstraintMesh::initPrerotVB   [static]
+
+ + + + + +
+   + + +

+Setup the buffers used with prerotated meshs. Must be called during initialization. +

+ +

+Definition at line 1876 of file ps_mesh.cpp. +

+References _PreRotatedMeshVB, _PreRotatedMeshVBWithNormal, NL3D::ConstraintMeshMaxNumPrerotatedModels, and NL3D::ConstraintMeshMaxNumVerts.

+

+ + + + +
+ + + + + + + + + +
bool NL3D::CPSConstraintMesh::isGlobalAnimTimeResetOnNewElementForced   const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 341 of file ps_mesh.h. +

+References _ReinitGlobalAnimTimeOnNewElement.

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CPSConstraintMesh::isStageModulationForced uint   stage const
+
+ + + + + +
+   + + +

+Test if the i-th stage of all materials is forced to be modulated with the mesh color. +

+ +

+Definition at line 1779 of file ps_mesh.cpp. +

+References _ModulatedStages, NL3D::IDRV_MAT_MAXTEXTURES, and nlassert.

+

+ + + + +
+ + + + + + + + + +
bool NL3D::CPSConstraintMesh::isVertexColorLightingForced   const [inline]
+
+ + + + + +
+   + + +

+test wether vertex color lighting is forced. +

+ +

+Definition at line 298 of file ps_mesh.h. +

+References _VertexColorLightingForced.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
CVertexBuffer & NL3D::CPSConstraintMesh::makePrerotatedVb const CVertexBuffer  inVB,
TAnimationTime   ellapsedTime
[protected]
+
+ + + + + +
+   + + +

+make a vb for the prerotated mesh from a source vb. +

+ +

+Definition at line 1405 of file ps_mesh.cpp. +

+References _PrecompBasis, _PreRotatedMeshVB, _PreRotatedMeshVBWithNormal, CHECK_VERTEX_BUFFER, and NL3D::TAnimationTime.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::newElement CPSLocated  emitterLocated,
uint32   emitterIndex
[protected, virtual]
+
+ + + + + +
+   + + +

+Generate a new element. +

+ +

+Implements NL3D::CPSParticle. +

+Definition at line 1710 of file ps_mesh.cpp. +

+References _GlobalAnimationEnabled, _GlobalAnimDate, _IndexInPrecompBasis, _MorphScheme, NL3D::CPSLocatedBindable::_Owner, _PrecompBasis, _ReinitGlobalAnimTimeOnNewElement, NL3D::CPSColoredParticle::newColorElement, NL3D::CPSRotated3DPlaneParticle::newPlaneBasisElement, and NL3D::CPSSizedParticle::newSizeElement.

+

+ + + + +
+ + + + + + + + + + +
NL3D::CPSConstraintMesh::NLMISC_DECLARE_CLASS CPSConstraintMesh  
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + +
CPSConstraintMesh& NL3D::CPSConstraintMesh::operator= const CPSConstraintMesh &   other [inline, private]
+
+ + + + + +
+   + + +

+ +

+Definition at line 553 of file ps_mesh.h. +

+References CPSConstraintMesh, and nlassert.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CPSConstraintMesh::releaseShapes   [protected]
+
+ + + + + +
+   + + +

+release the shapes used by this particle. +

+ +

+Definition at line 1382 of file ps_mesh.cpp. +

+References _ModelBank, and _Shapes. +

+Referenced by clean, and update.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::resize uint32   size [protected, virtual]
+
+ + + + + +
+   + + +

+Resize the bindable attributes containers. +

+Size is the max number of element to be contained. DERIVERS MUST CALL THEIR PARENT VERSION should not be called directly. Call CPSLocated::resize instead +

+Implements NL3D::CPSParticle. +

+Definition at line 1744 of file ps_mesh.cpp. +

+References _IndexInPrecompBasis, _MorphScheme, NL3D::CPSLocatedBindable::_Owner, _PrecompBasis, nlassert, NL3D::CPSColoredParticle::resizeColor, NL3D::CPSRotated3DPlaneParticle::resizePlaneBasis, and NL3D::CPSSizedParticle::resizeSize.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CPSConstraintMesh::restoreMaterials   [protected]
+
+ + + + + +
+   + + +

+ +

+Definition at line 2102 of file ps_mesh.cpp. +

+References NL3D::CPSColoredParticle::_ColorScheme, _MeshDisplayShare, _Shapes, NL3D::CPSConstraintMesh::CMeshDisplayShare::getMeshDisplay, TRdrPassSet, and update. +

+Referenced by setTexAnimType.

+

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

+serialisation. Derivers must override this, and call their parent version. +

+ +

+Reimplemented from NL3D::CPSParticle. +

+Definition at line 1240 of file ps_mesh.cpp.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::setGlobalTexAnim uint   stage,
const CGlobalTexAnim  properties
+
+ + + + + +
+   + + +

+Set the properties of texture animation for a texture stage. Global animation should have been activated. +

+ +

+Definition at line 2044 of file ps_mesh.cpp. +

+References _GlobalAnimationEnabled, _GlobalTexAnims, NL3D::IDRV_MAT_MAXTEXTURES, and nlassert.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::setMorphScheme CPSAttribMaker< float > *   scheme
+
+ + + + + +
+   + + +

+Set a morphing scheme. The scheme is then owned by this object. +

+ +

+Definition at line 1006 of file ps_mesh.cpp. +

+References _MorphScheme, and NL3D::CPSLocatedBindable::_Owner.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::setMorphValue float   value
+
+ + + + + +
+   + + +

+Use a constant value for morphing. This discard any scheme for the morph value. The value must range from 0 to numberOfShapes. +

+ +

+Definition at line 991 of file ps_mesh.cpp. +

+References _MorphScheme, _MorphValue, and value.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::setShape uint   index,
const std::string &   shapeName
+
+ + + + + +
+   + + +

+Set a shape by its index. +

+ +

+Definition at line 973 of file ps_mesh.cpp. +

+References _MeshShapeFileName, _Touched, index, and nlassert.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::setShape const std::string &   meshFileName [virtual]
+
+ + + + + +
+   + + +

+Construct the mesh by using the given mesh shape file. +

+No morphing is applied. The mesh is used 'as it'. +

+Implements NL3D::CPSShapeParticle. +

+Definition at line 935 of file ps_mesh.cpp. +

+References _MeshShapeFileName, and _Touched.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::setShapes const std::string *   shapesNames,
uint   numShapes
+
+ + + + + +
+   + + +

+Setup the mesh for morphing use. +

+There are several restrictions :

    +
  • All meshs must have the same number of vertices
  • All meshes must have the same vertex format If these conditions are not met, a 'dummy' mesh will be used instead. If there's only one mesh, no morphing is performed. NB : Morphing not supported with precomputed rotations. First mesh is used instead
+
+Parameters:
+ + + +
shapesNames  +A tab of string containing the names of the shapes
numShapes  +
+
+

+Definition at line 951 of file ps_mesh.cpp. +

+References _MeshShapeFileName, and _Touched.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::setTexAnimType TTexAnimType   type
+
+ + + + + +
+   + + +

+Set the type of texture animation to use. None is the default. Setting a new value discard the previous change. +

+ +

+Definition at line 2069 of file ps_mesh.cpp. +

+References _GlobalAnimationEnabled, _GlobalTexAnims, getTexAnimType, GlobalAnim, Last, nlassert, NoAnim, PGlobalTexAnims, restoreMaterials, and type.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::step TPSProcessPass   pass,
TAnimationTime   ellapsedTime,
TAnimationTime   realEt
[protected, virtual]
+
+ + + + + +
+   + + +

+process one pass for the particles. +

+The default behaviour shows the particles +

+Reimplemented from NL3D::CPSParticle. +

+Definition at line 1488 of file ps_mesh.cpp. +

+References draw, hasOpaqueFaces, hasTransparentFaces, NL3D::PSBlendRender, NL3D::PSSolidRender, NL3D::PSToolRender, NL3D::CPSParticle::showTool, NL3D::TAnimationTime, and NL3D::TPSProcessPass. +

+Referenced by draw.

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CPSConstraintMesh::update void   [protected]
+
+ + + + + +
+   + + +

+Build the mesh data, if the 'touch' flag is set. +

+

+Returns:
+true if the mesh could be found and match the requirement
+

+Definition at line 1044 of file ps_mesh.cpp. +

+References _GlobalAnimDate, _HasOpaqueFaces, _HasTransparentFaces, _MeshShapeFileName, _ModelBank, _NumFaces, NL3D::CPSLocatedBindable::_Owner, _Shapes, _Touched, NL3D::CheckForOpaqueAndTransparentFacesInMesh, clean, NL3D::ConstraintMeshMaxNumVerts, NL3D::DummyShapeName, NL3D::GetDummyShapeFromBank, NL3D::getMeshNumTri, hasOpaqueFaces, hasTransparentFaces, nlassert, nlwarning, NL3D::CPSParticle::notifyOwnerMaxNumFacesChanged, and releaseShapes. +

+Referenced by draw, hasOpaqueFaces, hasTransparentFaces, and restoreMaterials.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::updateMatAndVbForColor void   [protected, virtual]
+
+ + + + + +
+   + + +

+Update the material and the vb and the like so that they match the color scheme. +

+ +

+Implements NL3D::CPSColoredParticle. +

+Definition at line 1759 of file ps_mesh.cpp.

+


Friends And Related Function Documentation

+

+ + + + +
+ + +
friend class CMeshDisplayShare [friend] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 481 of file ps_mesh.h.

+

+ + + + +
+ + +
friend class CPSConstraintMeshHelper [friend] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 348 of file ps_mesh.h.

+


Member Data Documentation

+

+ + + + +
+ + +
uint8 NL3D::CPSConstraintMesh::_GlobalAnimationEnabled [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 530 of file ps_mesh.h. +

+Referenced by getGlobalTexAnim, getTexAnimType, newElement, setGlobalTexAnim, and setTexAnimType.

+

+ + + + +
+ + +
float NL3D::CPSConstraintMesh::_GlobalAnimDate [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 543 of file ps_mesh.h. +

+Referenced by newElement, and update.

+

+ + + + +
+ + +
PGlobalTexAnims NL3D::CPSConstraintMesh::_GlobalTexAnims [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 542 of file ps_mesh.h. +

+Referenced by getGlobalTexAnim, setGlobalTexAnim, and setTexAnimType.

+

+ + + + +
+ + +
uint8 NL3D::CPSConstraintMesh::_HasOpaqueFaces [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 528 of file ps_mesh.h. +

+Referenced by hasOpaqueFaces, and update.

+

+ + + + +
+ + +
uint8 NL3D::CPSConstraintMesh::_HasTransparentFaces [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 526 of file ps_mesh.h. +

+Referenced by hasTransparentFaces, and update.

+

+ + + + +
+ + +
std::vector<uint32> NL3D::CPSConstraintMesh::_IndexInPrecompBasis [protected] +
+
+ + + + + +
+   + + +

+this contain an index in _PrecompBasis for each particle. +

+ +

+Definition at line 509 of file ps_mesh.h. +

+Referenced by deleteElement, draw, fillIndexesInPrecompBasis, newElement, and resize.

+

+ + + + +
+ + +
float NL3D::CPSConstraintMesh::_MaxAngularVelocity [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 494 of file ps_mesh.h. +

+Referenced by checkHintRotateTheSame, and hintRotateTheSame.

+

+ + + + +
+ + +
CPSConstraintMesh::CMeshDisplayShare NL3D::CPSConstraintMesh::_MeshDisplayShare [static, protected] +
+
+ + + + + +
+   + + +

+manage vertex buffers and primitive blocks used for rendering. +

+ +

+Referenced by restoreMaterials.

+

+ + + + +
+ + +
TShapeNameVect NL3D::CPSConstraintMesh::_MeshShapeFileName [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 432 of file ps_mesh.h. +

+Referenced by getNumShapes, getShape, getShapesNames, setShape, setShapes, and update.

+

+ + + + +
+ + +
float NL3D::CPSConstraintMesh::_MinAngularVelocity [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 493 of file ps_mesh.h. +

+Referenced by checkHintRotateTheSame, and hintRotateTheSame.

+

+ + + + +
+ + +
CShapeBank* NL3D::CPSConstraintMesh::_ModelBank [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 439 of file ps_mesh.h. +

+Referenced by releaseShapes, and update.

+

+ + + + +
+ + +
uint8 NL3D::CPSConstraintMesh::_ModulatedStages [protected] +
+
+ + + + + +
+   + + +

+A 'bitfield' to force some stage to be modulated with the primary color. +

+ +

+Definition at line 521 of file ps_mesh.h. +

+Referenced by forceStageModulationByColor, and isStageModulationForced.

+

+ + + + +
+ + +
CPSAttribMaker<float>* NL3D::CPSConstraintMesh::_MorphScheme [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 549 of file ps_mesh.h. +

+Referenced by deleteElement, getMorphScheme, newElement, resize, setMorphScheme, setMorphValue, and ~CPSConstraintMesh.

+

+ + + + +
+ + +
float NL3D::CPSConstraintMesh::_MorphValue [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 548 of file ps_mesh.h. +

+Referenced by getMorphValue, and setMorphValue.

+

+ + + + +
+ + +
uint NL3D::CPSConstraintMesh::_NumFaces [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 436 of file ps_mesh.h. +

+Referenced by getMaxNumFaces, and update.

+

+ + + + +
+ + +
std::vector< CPlaneBasisPair > NL3D::CPSConstraintMesh::_PrecompBasis [protected] +
+
+ + + + + +
+   + + +

+a set of precomp basis, before and after transfomation in world space, used if the hint 'RotateTheSame' has been called. +

+ +

+Definition at line 506 of file ps_mesh.h. +

+Referenced by checkHintRotateTheSame, deleteElement, draw, fillIndexesInPrecompBasis, hintRotateTheSame, makePrerotatedVb, newElement, and resize.

+

+ + + + +
+ + +
CVertexBuffer NL3D::CPSConstraintMesh::_PreRotatedMeshVB [static, protected] +
+
+ + + + + +
+   + + +

+vertex buffer used with prerotated meshs. +

+ +

+Definition at line 60 of file ps_mesh.cpp. +

+Referenced by initPrerotVB, and makePrerotatedVb.

+

+ + + + +
+ + +
CVertexBuffer NL3D::CPSConstraintMesh::_PreRotatedMeshVBWithNormal [static, protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 61 of file ps_mesh.cpp. +

+Referenced by initPrerotVB, and makePrerotatedVb.

+

+ + + + +
+ + +
uint8 NL3D::CPSConstraintMesh::_ReinitGlobalAnimTimeOnNewElement [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 531 of file ps_mesh.h. +

+Referenced by forceGlobalAnimTimeResetOnNewElement, isGlobalAnimTimeResetOnNewElementForced, and newElement.

+

+ + + + +
+ + +
TShapeVect NL3D::CPSConstraintMesh::_Shapes [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 433 of file ps_mesh.h. +

+Referenced by releaseShapes, restoreMaterials, and update.

+

+ + + + +
+ + +
uint8 NL3D::CPSConstraintMesh::_Touched [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 524 of file ps_mesh.h. +

+Referenced by hasOpaqueFaces, hasTransparentFaces, setShape, setShapes, and update.

+

+ + + + +
+ + +
uint8 NL3D::CPSConstraintMesh::_VertexColorLightingForced [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 529 of file ps_mesh.h. +

+Referenced by forceVertexColorLighting, and isVertexColorLightingForced.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1