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

NL3D::CPSConstraintMesh Class Reference

#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 + +

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 176 of file ps_mesh.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

[NOHEADER]

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

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

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


Public Types

enum  TError { ShapeFileNotLoaded = -1, +ShapeFileIsNotAMesh = -2, +ShapeHasTooMuchVertices = -3 + }

Public Member Functions

virtual void basisChanged (TPSMatrixMode systemBasis)
uint32 checkHintRotateTheSame (float &min, float &max) const
virtual bool completeBBox (NLMISC::CAABBox &box) const
NLMISC::CVector computeI (void) const
NLMISC::CVector computeJ (void) const
NLMISC::CVector computeK (void) const
 CPSConstraintMesh ()
 ctor

void disableAutoLOD (bool disable=true)
 Force the Auto-LOD to be disbaled. When set to false, the default behaviour set in the system is used.

void disableHintRotateTheSame (void)
virtual bool doesProduceBBox (void) const
virtual void draw (bool opaque)
 derivers draw the particles here

void enableGlobalColorLighting (bool enabled)
virtual void enumTexs (std::vector< NLMISC::CSmartPtr< ITexture > > &dest, IDriver &drv)
void forceStageModulationByColor (uint stage, bool force)
void forceVertexColorLighting (bool force=true)
 force all material to use vertex color lighting

virtual std::string getClassName ()=0
NLMISC::CRGBA getColor (void) const
 Get the color.

const CPSAttribMaker< CRGBA > * getColorScheme (void) const
 get the color scheme (NULL if none) const version

CPSAttribMaker< CRGBA > * getColorScheme (void)
 get the color scheme (NULL if none)

IDrivergetDriver () const
 shortcut to get an instance of the driver

uint32 getExternID (void) const
 get the extern ID of this located bindable

const CFontGeneratorgetFontGenerator (void) const
 Shortcut to get the font generator if one was set (const version).

CFontGeneratorgetFontGenerator (void)
 Shortcut to get the font generator if one was set.

const CFontManagergetFontManager (void) const
 Shortcut to get the font manager if one was set (const version).

CFontManagergetFontManager (void)
 ***************************************************************************************

const NLMISC::CMatrixgetInvertedSysMat (void) const
 shortcut to get the inverted matrix of the system

const NLMISC::CMatrixgetInvertedViewMat (void) const
 shortcut to get the inverted view matrix

const NLMISC::CMatrixgetLocalToWorldMatrix () const
 Shortcut to get the local to world matrix.

TPSLod getLOD (void) const
 get the valid lods for that object

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

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

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

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

std::string getName (void) const
 get the located bindable name (edition purpose)

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

const CPSLocatedgetOwner (void) const
 get the located that owns this bindable (const version)

CPSLocatedgetOwner (void)
 get the located that owns this bindable

CPlaneBasis getPlaneBasis (void) const
 get the constant basis

const CPSAttribMaker< CPlaneBasis > * getPlaneBasisScheme (void) const
 get the plane basis scheme, (NULL if none) const version

CPSAttribMaker< CPlaneBasis > * getPlaneBasisScheme (void)
 get the plane basis scheme, (NULL if none)

virtual uint32 getPriority (void) const
 return priority

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

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

void getShapeNumVerts (std::vector< sint > &numVerts)
void getShapesNames (std::string *shapesNames) const
float getSize (void) const
 get the constant size

const CPSAttribMaker< float > * getSizeScheme (void) const
 get the size scheme (NULL if none) const version

CPSAttribMaker< float > * getSizeScheme (void)
 get the size scheme (NULL if none)

const NLMISC::CMatrixgetSysMat (void) const
 ***************************************************************************************

uint32 getType (void) const
 return this bindable type

virtual bool getUserMatrixUsageCount () const
const NLMISC::CMatrixgetViewMat (void) const
 shortcut to get the view matrix

virtual bool hasEmitters (void) const
 tells wether there are alive emitters

virtual bool hasLightableFaces ()
 from CPSParticle : return true if there are lightable faces in the object

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

virtual bool hasParticles (void) const
 return true if this located bindable derived class holds alive particles

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

void hintRotateTheSame (uint32 nbConfiguration, float minAngularVelocity=NLMISC::Pi, float maxAngularVelocity=NLMISC::Pi)
bool isActive () const
bool isAutoLODDisabled () const
 Test wether Auto-LOD is disabled.

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

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

virtual void motionTypeChanged (bool parametric)
 called when a located has switch between incrmental / parametric motion. The default does nothing

 NLMISC_DECLARE_CLASS (CPSConstraintMesh)
virtual void notifyTargetRemoved (CPSLocated *ptr)
 ***************************************************************************************

virtual void releaseAllRef ()
 ***************************************************************************************

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

void serialColorScheme (NLMISC::IStream &f) throw (NLMISC::EStream)
 serialization.

void serialPlaneBasisScheme (NLMISC::IStream &f) throw (NLMISC::EStream)
 ===================================================================================

void serialSizeScheme (NLMISC::IStream &f) throw (NLMISC::EStream)
 serialization. We choose a different name because of multiple-inheritance

void setActive (bool active)
 Activate / Deactivate this object. When not active, the owning system won't try to call the 'step' method.

void setColor (NLMISC::CRGBA col)
 Set a constant color for the particles. remove any previous scheme.

void setColorScheme (CPSAttribMaker< CRGBA > *col)
void setExternID (uint32 id)
 ***************************************************************************************

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

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.

void setName (const std::string &name)
 set the located bindable name (edition purpose)

void setPlaneBasis (const CPlaneBasis &basis)
 ===================================================================================

void setPlaneBasisScheme (CPSAttribMaker< CPlaneBasis > *basisMaker)
 ===================================================================================

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

void setShape (const std::string &meshFileName)
void setShapes (const std::string *shapesNames, uint numShapes)
void setSize (float size)
 Set a constant size for the particles.

void setSizeScheme (CPSAttribMaker< float > *size)
void setupDriverModelMatrix (void)
 shortcut to setup the model matrix (system basis or world basis)

virtual void setZBias (float value)
virtual void showTool ()
 draw the particles for edition mode. The default behaviour just draw a wireframe model

virtual bool supportGlobalColorLighting () const
virtual void systemDateChanged ()
bool usesGlobalColorLighting ()
virtual ~CPSConstraintMesh ()
void forceGlobalAnimTimeResetOnNewElement (bool force=true)
 Force the time counter for global anim to be reseted when a new mesh is created.

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

bool isGlobalAnimTimeResetOnNewElementForced () const
 Force the time counter for global anim to be reseted when a new mesh is created.

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


Static Public Member Functions

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


Protected Types

typedef std::auto_ptr< CGlobalTexAnimsPGlobalTexAnims
typedef NLMISC::CSmartPtr<
+ CMesh
PMesh
typedef CPSVector< std::string
+>::V 
TMeshNameVect
typedef CPSVector< PMesh >::V TMeshVect
typedef std::vector< CRdrPassTRdrPassSet
 A set of rendering pass.


Protected Member Functions

virtual void bounceOccured (uint32 index)
void clean (void)
void computeColors (CVertexBuffer &outVB, const CVertexBuffer &inVB, uint startIndex, uint toProcess, uint32 srcStep)
void computeSrcStep (uint32 &step, uint &numToProcess)
void deleteColorElement (uint32 index)
virtual void deleteElement (uint32 index)
void deletePlaneBasisElement (uint32 index)
void deleteSizeElement (uint32 index)
void displayIcon2d (const NLMISC::CVector tab[], uint nbSegs, float scale)
 ***************************************************************************************

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.

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

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

virtual CPSLocatedgetColorOwner (void)
 deriver must return their owner there

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

virtual CPSLocatedgetSizeOwner (void)
 deriver must return their owner there

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

void newColorElement (CPSLocated *emitterLocated, uint32 emitterIndex)
virtual void newElement (CPSLocated *emitterLocated, uint32 emitterIndex)
void newPlaneBasisElement (CPSLocated *emitterLocated, uint32 emitterIndex)
void newSizeElement (CPSLocated *emitterLocated, uint32 emitterIndex)
void notifyOwnerMaxNumFacesChanged (void) const
void releaseShapes ()
 release the shapes used by this particle

virtual void resize (uint32 size)
void resizeColor (uint32 size)
void resizePlaneBasis (uint32 size)
void resizeSize (uint32 size)
void restoreMaterials ()
virtual void setOwner (CPSLocated *psl)
 ***************************************************************************************

void setupMaterialColor (CMaterial &destMat, CMaterial &srcMat)
void setupRenderPasses (float date, TRdrPassSet &rdrPasses, bool opaque)
 Setup a set of rendering passes (set good textures matrix / material colors).

virtual void step (TPSProcessPass pass, TAnimationTime ellapsedTime, TAnimationTime realEt)
bool update (std::vector< sint > *numVerts=NULL)
virtual void updateMatAndVbForColor (void)
 Update the material and the vb and the like so that they match the color scheme.


Protected Attributes

bool _Active
CRGBA _Color
CPSAttribMaker< CRGBA > * _ColorScheme
uint32 _ExternID
uint8 _GlobalAnimationEnabled: 1
float _GlobalAnimDate
PGlobalTexAnims _GlobalTexAnims
uint8 _HasLightableFaces: 1
uint8 _HasOpaqueFaces: 1
uint8 _HasTransparentFaces: 1
CPSVector< uint32 >::V _IndexInPrecompBasis
 this contain an index in _PrecompBasis for each particle

TPSLod _LOD
 tells when this object must be dealt with

float _MaxAngularVelocity
TMeshVect _Meshes
TMeshNameVect _MeshShapeFileName
float _MinAngularVelocity
CShapeBank_ModelBank
uint8 _ModulatedStages
 A 'bitfield' to force some stage to be modulated with the primary color.

std::string _Name
uint _NumFaces
CPSLocated_Owner
float _ParticleSize
CPlaneBasis _PlaneBasis
CPSAttribMaker< CPlaneBasis > * _PlaneBasisScheme
CPSVector< CPlaneBasisPair
+>::V 
_PrecompBasis
 a set of precomp basis, before and after transfomation in world space, used if the hint 'RotateTheSame' has been called

uint8 _ReinitGlobalAnimTimeOnNewElement: 1
CPSAttribMaker< float > * _SizeScheme
uint8 _Touched: 1
uint8 _ValidBuild: 1
uint8 _VertexColorLightingForced: 1
morphing
CPSAttribMaker< float > * _MorphScheme
float _MorphValue

Static Protected Attributes

CMeshDisplayShare _MeshDisplayShare
 manage vertex buffers and primitive blocks used for rendering

CVertexBuffer _PreRotatedMeshVB
 vertex buffer used with prerotated meshs

CVertexBuffer _PreRotatedMeshVBWithNormal

Private Member Functions

 CPSConstraintMesh (const CPSConstraintMesh &)
CPSConstraintMeshoperator= (const CPSConstraintMesh &other)

Friends

class CMeshDisplayShare
class CPSConstraintMeshHelper
class CPSLocated
+


Member Typedef Documentation

+

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

+ +

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

+Referenced by serial(), and setTexAnimType().

+

+ + + + +
+ + +
typedef NLMISC::CSmartPtr<CMesh> NL3D::CPSConstraintMesh::PMesh [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 462 of file ps_mesh.h.

+

+ + + + +
+ + +
typedef CPSVector<std::string>::V NL3D::CPSConstraintMesh::TMeshNameVect [protected] +
+
+ + + + + +
+   + + +

+ +

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

+Referenced by serial().

+

+ + + + +
+ + +
typedef CPSVector<PMesh>::V NL3D::CPSConstraintMesh::TMeshVect [protected] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 464 of file ps_mesh.h.

+

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

+A set of rendering pass. +

+ +

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

+Referenced by NL3D::CPSConstraintMesh::CMeshDisplayShare::buildRdrPassSet(), doRenderPasses(), restoreMaterials(), and setupRenderPasses().

+


Member Enumeration Documentation

+

+ + + + +
+ + +
enum NL3D::CPSConstraintMesh::TError +
+
+ + + + + +
+   + + +

+

Enumeration values:
+ + + + +
ShapeFileNotLoaded  +
ShapeFileIsNotAMesh  +
ShapeHasTooMuchVertices  +
+
+ +

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

+

+

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

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

+

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

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

+Referenced by getTexAnimType(). +

+

00325 { NoAnim = 0, GlobalAnim, /*Local, */ Last};
+
+


Constructor & Destructor Documentation

+

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

+ctor +

+ +

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

+

00937                                      : _NumFaces(0),
+00938                                                                                  _ModelBank(NULL),
+00939                                                                                  _ModulatedStages(0),
+00940                                                                                  _Touched(1),
+00941                                                                                  _HasOpaqueFaces(0),
+00942                                                                                  _VertexColorLightingForced(false),
+00943                                                                                  _GlobalAnimationEnabled(0),
+00944                                                                                  _ReinitGlobalAnimTimeOnNewElement(0),
+00945                                                                                  _HasLightableFaces(0),
+00946                                                                                  _ValidBuild(0),
+00947                                                                                  _MorphValue(0),
+00948                                                                                  _MorphScheme(NULL)
+00949 {               
+00950         if (CParticleSystem::getSerializeIdentifierFlag()) _Name = std::string("ConstraintMesh");
+00951 }
+
+

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

+ +

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

+References _MorphScheme, and clean(). +

+

01500 {
+01501         clean();
+01502         delete _MorphScheme;
+01503 }
+
+

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

+ +

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

+References nlassert. +

+

00583 { nlassert(0); /* not supported */ }
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::basisChanged TPSMatrixMode  systemBasis  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Called when the basis of the owner changed. the default behaviour does nothing

Parameters:
+ + +
newBasis : True if in the system basis, false for the world basis.
+
+ +

+Reimplemented in NL3D::CPSForce. +

+Definition at line 968 of file ps_located.h. +

+

00968 {}
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::bounceOccured uint32  index  )  [inline, protected, virtual, inherited]
+
+ + + + + +
+   + + +

+a bounce occured, so some action could be done. The default behaviour does nothing

Parameters:
+ + +
index the index of the element that bounced
+
+ +

+Reimplemented in NL3D::CPSEmitter. +

+Definition at line 1011 of file ps_located.h. +

+References index, and uint32. +

+

01011 {}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
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 276 of file ps_mesh.h. +

+References min, and uint32. +

+

00277         {
+00278                 min = _MinAngularVelocity;
+00279                 max = _MaxAngularVelocity;
+00280                 return _PrecompBasis.size(); 
+00281         }
+
+

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

+ +

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

+References _ModelBank, and releaseShapes(). +

+Referenced by update(), and ~CPSConstraintMesh(). +

+

01522 {       
+01523         if (_ModelBank)
+01524         {       
+01525                 releaseShapes();                
+01526         }
+01527 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::CPSLocatedBindable::completeBBox NLMISC::CAABBox box  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSFanLight, NL3D::CPSQuad, and NL3D::CPSShockWave. +

+Definition at line 884 of file ps_located.h. +

+

00884 { return false ;}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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 1825 of file ps_mesh.cpp. +

+References NL3D::CVertexBuffer::getColorPointer(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CVertexBuffer::getVertexSize(), NL3D::CPSAttribMaker< CRGBA >::makeN(), NLMISC::CRGBA::modulateColors(), nlassert, uint, uint32, and uint8. +

+Referenced by NL3D::CPSConstraintMeshHelper::drawMeshs(), and NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(). +

+

01826 {       
+01827         nlassert(_ColorScheme);
+01828         // there are 2 case : 1 - the source mesh has colors, which are modulated with the current color
+01829         //                                        2 - the source mesh has no colors : colors are directly copied into the dest vb
+01830 
+01831         if (inVB.getVertexFormat() & CVertexBuffer::PrimaryColorFlag) // case 1
+01832         {
+01833                 // TODO: optimisation : avoid to duplicate colors...
+01834                 _ColorScheme->makeN(_Owner, startIndex, outVB.getColorPointer(), outVB.getVertexSize(), toProcess, inVB.getNumVertices(), srcStep);
+01835                 // modulate from the source mesh
+01836                 uint8 *vDest  = (uint8 *) outVB.getColorPointer();
+01837                 uint8 *vSrc   = (uint8 *) inVB.getColorPointer();
+01838                 const uint vSize = outVB.getVertexSize();
+01839                 const uint numVerts = inVB.getNumVertices();
+01840                 uint  meshSize = vSize * numVerts;              
+01841                 for (uint k = 0; k < toProcess; ++k)
+01842                 {
+01843                         NLMISC::CRGBA::modulateColors((CRGBA *) vDest, (CRGBA *) vSrc, (CRGBA *) vDest, numVerts, vSize, vSize);
+01844                         vDest += meshSize;
+01845                 }
+01846         }
+01847         else // case 2
+01848         {
+01849                 _ColorScheme->makeN(_Owner, startIndex, outVB.getColorPointer(), outVB.getVertexSize(), toProcess, inVB.getNumVertices(), srcStep);
+01850         }
+01851 }
+
+

+ + + + +
+ + + + + + + + + + +
NLMISC::CVector NL3D::CPSLocatedBindable::computeI void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Compute a vector that will map to (1 0 0) after view and model transform. This allow to have object that always faces the user, whatever basis they are in +

+Definition at line 931 of file ps_located.h. +

+References NL3D::CPSLocated::computeI(). +

+Referenced by NL3D::CPSLocatedBindable::displayIcon2d(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSGravity::show(), and NL3D::CPSEmitter::showTool(). +

+

00931 { return _Owner->computeI(); }
+
+

+ + + + +
+ + + + + + + + + + +
NLMISC::CVector NL3D::CPSLocatedBindable::computeJ void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Compute a vector that will map to (0 1 0) after view and model transform. This allow to have object that always faces the user, whatever basis they are in +

+Definition at line 936 of file ps_located.h. +

+References NL3D::CPSLocated::computeJ(). +

+Referenced by NL3D::CPSFaceLookAtHelper::drawLookAt(). +

+

00936 { return _Owner->computeJ(); }
+
+

+ + + + +
+ + + + + + + + + + +
NLMISC::CVector NL3D::CPSLocatedBindable::computeK void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Compute a vector that will map to (0 0 1) after view and model transform. This allow to have object that always faces the user, whatever basis they are in +

+Definition at line 940 of file ps_located.h. +

+References NL3D::CPSLocated::computeK(). +

+Referenced by NL3D::CPSLocatedBindable::displayIcon2d(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), and NL3D::CPSEmitter::showTool(). +

+

00940 { return _Owner->computeK(); }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSParticle::computeSrcStep uint32 step,
uint numToProcess
[protected, inherited]
+
+ + + + + +
+   + + +

+System may have hand-tuned LOD, or auto LOD. This compute the number of particles that must really be displayed, and the src step that allow to go through the whole collection. The step in the source is in a fixed point 16:16 format +

+Definition at line 82 of file ps_particle_basic.cpp. +

+References NL3D::CPSParticle::_DisableAutoLOD, NLMISC::clamp(), NL3D::CParticleSystem::getAutoLODDegradationExponent(), NL3D::CParticleSystem::getAutoLODMode(), NL3D::CParticleSystem::getAutoLODStartDistPercent(), NL3D::CParticleSystem::getOneMinusCurrentLODRatio(), NL3D::CParticleSystemProcess::getOwner(), NL3D::CPSLocated::getSize(), NL3D::CParticleSystem::isAutoLODEnabled(), NL3D::CParticleSystem::isSharingEnabled(), nlassert, r, uint, and uint32. +

+Referenced by NL3D::CPSShockWave::draw(), draw(), NL3D::CPSFanLight::draw(), NL3D::CPSFaceLookAt::draw(), NL3D::CPSDot::draw(), NL3D::CPSTailDot::step(), NL3D::CPSRibbonLookAt::step(), NL3D::CPSRibbon::step(), and NL3D::CPSFace::step(). +

+

00083 {               
+00084         nlassert(_Owner && _Owner->getOwner());
+00085         const CParticleSystem &ps = *(_Owner->getOwner());
+00086         if (_DisableAutoLOD || !ps.isAutoLODEnabled() || !ps.isSharingEnabled() || _Owner->getSize() == 0) // Should Auto-LOD be used ?
+00087         {
+00088                 step = (1 << 16);
+00089                 numToProcess = _Owner->getSize();
+00090         }
+00091         else
+00092         {
+00093                 float oneMinusLODRatio = ps.getOneMinusCurrentLODRatio();
+00094                 float LODRatio = 1.f - oneMinusLODRatio;  
+00095                 if (LODRatio > ps.getAutoLODStartDistPercent())
+00096                 {
+00097                         float factor = (LODRatio - 1.f) / (ps.getAutoLODStartDistPercent() - 1.f);
+00098                         NLMISC::clamp(factor, 0.f, 1.f);
+00099                         float r = factor;
+00100                         for (uint k = 1; k < ps.getAutoLODDegradationExponent(); ++k)
+00101                         {
+00102                                 r *= factor;
+00103                         }
+00104                         numToProcess = (uint) (_Owner->getSize() * r);
+00105                         if (numToProcess < 1) { numToProcess = 1; }
+00106 
+00107                         step =   ps.getAutoLODMode() ?                             // skip or limit number, depending on the mode
+00108                                 (_Owner->getSize() << 16) / numToProcess : // skip particles
+00109                                 (1 << 16);                                                         // just display less particles
+00110                 }
+00111                 else
+00112                 {
+00113                         step = (1 << 16);
+00114                         numToProcess = _Owner->getSize();
+00115                 }
+00116         }
+00117 
+00118 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSColoredParticle::deleteColorElement uint32  index  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 237 of file ps_particle_basic.h. +

+References NL3D::CPSAttribMaker< CRGBA >::deleteElement(), NL3D::CPSAttribMaker< CRGBA >::hasMemory(), index, and uint32. +

+Referenced by NL3D::CPSTailDot::deleteElement(), NL3D::CPSShockWave::deleteElement(), NL3D::CPSRibbonLookAt::deleteElement(), NL3D::CPSRibbon::deleteElement(), NL3D::CPSQuad::deleteElement(), deleteElement(), NL3D::CPSFanLight::deleteElement(), and NL3D::CPSDot::deleteElement(). +

+

00238                 {
+00239                         if (_ColorScheme && _ColorScheme->hasMemory()) _ColorScheme->deleteElement(index);
+00240                 }
+
+

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

+Delete an element by its index +

+Implements NL3D::CPSParticle. +

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

+References _MorphScheme, NL3D::CPSColoredParticle::deleteColorElement(), NL3D::CPSAttribMaker< float >::deleteElement(), NL3D::CPSRotated3DPlaneParticle::deletePlaneBasisElement(), NL3D::CPSSizedParticle::deleteSizeElement(), NL3D::CPSLocated::getSize(), NL3D::CPSAttribMaker< float >::hasMemory(), index, and uint32. +

+

01875 {
+01876         deleteSizeElement(index);
+01877         deletePlaneBasisElement(index);
+01878         // TODO : avoid code cuplication with CPSFace ...
+01879         if (_PrecompBasis.size()) // do we use precomputed basis ?
+01880         {
+01881                 // replace ourself by the last element...
+01882                 _IndexInPrecompBasis[index] = _IndexInPrecompBasis[_Owner->getSize() - 1];
+01883         }
+01884         deleteColorElement(index);
+01885         if (_MorphScheme && _MorphScheme->hasMemory()) _MorphScheme->deleteElement(index);
+01886 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSRotated3DPlaneParticle::deletePlaneBasisElement uint32  index  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 703 of file ps_particle_basic.h. +

+References NL3D::CPSRotated3DPlaneParticle::_PlaneBasisScheme, NL3D::CPSAttribMaker< CPlaneBasis >::deleteElement(), NL3D::CPSAttribMaker< CPlaneBasis >::hasMemory(), index, and uint32. +

+Referenced by deleteElement(), NL3D::CPSMesh::deleteElement(), and NL3D::CPSFace::deleteElement(). +

+

00704                 {
+00705                         if (_PlaneBasisScheme && _PlaneBasisScheme->hasMemory()) _PlaneBasisScheme->deleteElement(index);
+00706                 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSSizedParticle::deleteSizeElement uint32  index  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+ +

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

+References NL3D::CPSSizedParticle::_SizeScheme, NL3D::CPSAttribMaker< float >::deleteElement(), NL3D::CPSAttribMaker< float >::hasMemory(), index, and uint32. +

+Referenced by NL3D::CPSShockWave::deleteElement(), NL3D::CPSRibbonLookAt::deleteElement(), NL3D::CPSRibbon::deleteElement(), NL3D::CPSQuad::deleteElement(), deleteElement(), NL3D::CPSMesh::deleteElement(), and NL3D::CPSFanLight::deleteElement(). +

+

00296                 {
+00297                         if (_SizeScheme && _SizeScheme->hasMemory()) _SizeScheme->deleteElement(index);
+00298                 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSParticle::disableAutoLOD bool  disable = true  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Force the Auto-LOD to be disbaled. When set to false, the default behaviour set in the system is used. +

+ +

+Definition at line 137 of file ps_particle_basic.h. +

+References NL3D::CPSParticle::_DisableAutoLOD. +

+

00137 { _DisableAutoLOD = disable; }
+
+

+ + + + +
+ + + + + + + + + + +
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 266 of file ps_mesh.h. +

+References hintRotateTheSame(). +

+

00267         {
+00268                 hintRotateTheSame(0);
+00269         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CPSLocatedBindable::displayIcon2d const NLMISC::CVector  tab[],
uint  nbSegs,
float  scale
[protected, inherited]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+show an drawing to represent the object, and in red if it is selected

Parameters:
+ + + + +
tab : a table of 2 * nbSeg vector. only the x and y coordinates are used
nbSeg : the number of segment
scale : the scale to use for drawing
+
+ +

+Definition at line 2038 of file ps_located.cpp. +

+References NL3D::CPSLocatedBindable::computeI(), NL3D::CPSLocatedBindable::computeK(), NL3D::CParticleSystem::getCurrentEditedElement(), NL3D::CPSLocatedBindable::getDriver(), NL3D::CParticleSystemProcess::getOwner(), NL3D::CPSLocated::getPos(), NL3D::CPSLocated::getSize(), index, NL3D::CMaterial::setBlend(), NL3D::CMaterial::setBlendFunc(), NL3D::CMaterial::setColor(), NL3D::CMaterial::setLighting(), NL3D::CPSLocatedBindable::setupDriverModelMatrix(), NL3D::CMaterial::setZFunc(), NL3D::CMaterial::setZWrite(), size, uint, uint32, NLMISC::CLine::V0, NLMISC::CLine::V1, NLMISC::CVector::x, and NLMISC::CVector::y. +

+Referenced by NL3D::CPSSpring::show(), NL3D::CPSCentralGravity::show(), and NL3D::CPSParticle::showTool(). +

+

02039 {
+02040         uint32 size = _Owner->getSize();
+02041         if (!size) return;              
+02042         setupDriverModelMatrix();       
+02043 
+02044         const CVector I = computeI();
+02045         const CVector K = computeK();
+02046 
+02047         static std::vector<NLMISC::CLine> lines;
+02048         
+02049         lines.clear();
+02050 
+02051         // ugly slow code, but not for runtime
+02052         for (uint  k = 0; k < size; ++k)
+02053         {
+02054                 // center of the current particle
+02055                 const CVector p = _Owner->getPos()[k];
+02056                 
+02057                 
+02058 
+02059                 for (uint l = 0; l < nbSegs; ++l)
+02060                 {
+02061                         NLMISC::CLine li;
+02062                         li.V0 = p + scale * (tab[l << 1].x * I + tab[l << 1].y * K);
+02063                         li.V1 = p + scale * (tab[(l << 1) + 1].x * I + tab[(l << 1) + 1].y * K);
+02064                         lines.push_back(li);
+02065                 }
+02066         
+02067                 CMaterial mat;
+02068 
+02069                 mat.setBlendFunc(CMaterial::one, CMaterial::one);
+02070                 mat.setZWrite(false);
+02071                 mat.setLighting(false);
+02072                 mat.setBlend(true);
+02073                 mat.setZFunc(CMaterial::less);
+02074                 
+02075         
+02076 
+02077                 CPSLocated *loc;
+02078                 uint32 index;           
+02079                 CPSLocatedBindable *lb;
+02080                 _Owner->getOwner()->getCurrentEditedElement(loc, index, lb);
+02081         
+02082                 mat.setColor((lb == NULL || this == lb) && loc == _Owner && index == k  ? CRGBA::Red : CRGBA(127, 127, 127));
+02083                 
+02084 
+02085                 CDRU::drawLinesUnlit(lines, mat, *getDriver() );
+02086         }
+02087 
+02088 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::CPSLocatedBindable::doesProduceBBox void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSForce. +

+Definition at line 888 of file ps_located.h. +

+

00888 { return true; }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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. +

+setup number of primitives to be rendered

+render the primitives +

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

+References NL3D::ConstraintMeshBufSize, NL3D::CMaterial::getZWrite(), NL3D::IDriver::render(), TRdrPassSet, and uint. +

+Referenced by NL3D::CPSConstraintMeshHelper::drawMeshs(), and NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(). +

+

01803 {               
+01804         // render meshs : we process each rendering pass
+01805         for (TRdrPassSet::iterator rdrPassIt = rdrPasses.begin() 
+01806                 ; rdrPassIt != rdrPasses.end(); ++rdrPassIt)
+01807         {       
+01808                 CMaterial &Mat = rdrPassIt->Mat;
+01809                 if ((opaque && Mat.getZWrite()) || (!opaque && ! Mat.getZWrite()))
+01810                 {
+01812                         rdrPassIt->Pb.setNumTri(rdrPassIt->Pb.capacityTri()   * numObj / ConstraintMeshBufSize);
+01813                         rdrPassIt->Pb.setNumQuad(rdrPassIt->Pb.capacityQuad() * numObj / ConstraintMeshBufSize);
+01814                         rdrPassIt->Pb.setNumLine(rdrPassIt->Pb.capacityLine() * numObj / ConstraintMeshBufSize);
+01815 
+01817                         driver->render(rdrPassIt->Pb, rdrPassIt->Mat);
+01818                 }
+01819         }
+01820 
+01821 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSParticle::draw bool  opaque  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+derivers draw the particles here +

+ +

+Reimplemented in NL3D::CPSDot, NL3D::CPSFaceLookAt, NL3D::CPSFanLight, and NL3D::CPSShockWave. +

+Definition at line 110 of file ps_particle_basic.h. +

+Referenced by NL3D::CPSParticle::step(). +

+

00110 {}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
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 1631 of file ps_mesh.cpp. +

+References NL3D::CPSAttrib< T >::begin(), NL3D::CPSParticle::computeSrcStep(), NL3D::CPSLocated::getPos(), NL3D::CPSLocated::incrementNbDrawnParticles(), nlassert, PARTICLES_CHECK_MEM, NL3D::TAnimationTime, NL3D::TIteratorVectStep1616, uint, uint32, and update(). +

+Referenced by step(). +

+

01632 {
+01633         PARTICLES_CHECK_MEM;
+01634         nlassert(_Owner);       
+01635         
+01636         update(); // update mesh datas if needed
+01637         uint32 step;
+01638         uint   numToProcess;
+01639         computeSrcStep(step, numToProcess);     
+01640         if (!numToProcess) return;
+01641         _Owner->incrementNbDrawnParticles(numToProcess); // for benchmark purpose       
+01642 
+01643         
+01644         if (_PrecompBasis.size() == 0) 
+01645         {
+01646                 if (step == (1 << 16))
+01647                 {
+01648                         CPSConstraintMeshHelper::drawMeshs(_Owner->getPos().begin(),                                       
+01649                                                                                           *this,
+01650                                                                       numToProcess,
+01651                                                                                           step,
+01652                                                                                           opaque
+01653                                                                                          );
+01654                 }
+01655                 else
+01656                 {       
+01657                         CPSConstraintMeshHelper::drawMeshs(TIteratorVectStep1616(_Owner->getPos().begin(), 0, step),
+01658                                                                                           *this,
+01659                                                                       numToProcess,
+01660                                                                                           step,
+01661                                                                                           opaque
+01662                                                                                          );             
+01663                 }
+01664         }
+01665         else
+01666         {
+01667                 if (step == (1 << 16))
+01668                 {
+01669                         CPSConstraintMeshHelper::drawPrerotatedMeshs(_Owner->getPos().begin(),
+01670                                                                                                              _IndexInPrecompBasis.begin(),
+01671                                                                                                                  *this,
+01672                                                                                                                  numToProcess,
+01673                                                                                                                  step,
+01674                                                                                                                  opaque,
+01675                                                                                                                  ellapsedTime
+01676                                                                                                             );
+01677                 }
+01678                 else
+01679                 {       
+01680                         typedef CAdvance1616Iterator<CPSVector<uint32>::V::const_iterator, uint32> TIndexIterator;
+01681                         CPSConstraintMeshHelper::drawPrerotatedMeshs(TIteratorVectStep1616(_Owner->getPos().begin(), 0, step),
+01682                                                                                                                  TIndexIterator(_IndexInPrecompBasis.begin(), 0, step),
+01683                                                                                                                  *this,
+01684                                                                                                                  numToProcess,
+01685                                                                                                                  step,
+01686                                                                                                                  opaque,
+01687                                                                                                                  ellapsedTime
+01688                                                                                                             );          
+01689                 }
+01690         }
+01691         
+01692                 
+01693 }
+
+

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

+draw for pre-rotated meshs +

+

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSParticle::enableGlobalColorLighting bool  enabled  )  [inline, inherited]
+
+ + + + + +
+   + + +

+ +

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

+References NL3D::CPSParticle::_UsesGlobalColorLighting. +

+

00105 { _UsesGlobalColorLighting = enabled; }         
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::enumTexs std::vector< NLMISC::CSmartPtr< ITexture > > &  dest,
IDriver drv
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSFanLight, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonLookAt, and NL3D::CPSShockWave. +

+Definition at line 977 of file ps_located.h. +

+

00977 {}
+
+

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

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

+ +

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

+References NL3D::CPSLocated::getMaxSize(), and uint32. +

+Referenced by hintRotateTheSame(). +

+

01340 {
+01341         // TODO : avoid code duplication with CPSFace ...
+01342         const uint32 nbConf = _PrecompBasis.size();
+01343         if (_Owner)
+01344         {
+01345                 _IndexInPrecompBasis.resize( _Owner->getMaxSize() );
+01346         }       
+01347         for (CPSVector<uint32>::V::iterator it = _IndexInPrecompBasis.begin(); it != _IndexInPrecompBasis.end(); ++it)
+01348         {
+01349                 *it = rand() % nbConf;
+01350         }
+01351 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::finalize void   )  [virtual, inherited]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+this should be called before to delete any bindable inserted in a system, but this is done by the system, so you should never need calling it. This has been introduced because calls in dtor are not polymorphic to derived class (which are already destroyed anyway), and some infos are needed in some dtor. The default behaviour does nothing +

+Reimplemented in NL3D::CPSTargetLocatedBindable. +

+Definition at line 1975 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getOwner(), NL3D::CPSLocatedBindable::getUserMatrixUsageCount(), and NL3D::CParticleSystem::releaseRefForUserSysCoordInfo(). +

+

01976 {
+01977         if (_Owner && _Owner->getOwner())
+01978         {
+01979                 _Owner->getOwner()->releaseRefForUserSysCoordInfo(getUserMatrixUsageCount());
+01980         }
+01981 }       
+
+

+ + + + +
+ + + + + + + + + + +
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 360 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 1910 of file ps_mesh.cpp. +

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

+

01911 {
+01912         nlassert(stage < IDRV_MAT_MAXTEXTURES);
+01913         if (force)
+01914         {
+01915                 _ModulatedStages |= 1 << stage;
+01916         }
+01917         else
+01918         {
+01919                 _ModulatedStages &= ~(1 << stage);
+01920         }
+01921 }
+
+

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

+force all material to use vertex color lighting +

+ +

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

+References _VertexColorLightingForced. +

+

00314 { _VertexColorLightingForced = force; }
+
+

+ + + + +
+ + + + + + + + + +
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().

+

+ + + + +
+ + + + + + + + + + +
NLMISC::CRGBA NL3D::CPSColoredParticle::getColor void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Get the color. +

+ +

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

+

00211 { return _Color; }
+
+

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

+deriver must return their owner there +

+ +

+Implements NL3D::CPSColoredParticle. +

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

+

00384 { return _Owner; }
+
+

+ + + + +
+ + + + + + + + + + +
const CPSAttribMaker<CRGBA>* NL3D::CPSColoredParticle::getColorScheme void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the color scheme (NULL if none) const version +

+ +

+Definition at line 205 of file ps_particle_basic.h. +

+

00205 { return _ColorScheme; }
+
+

+ + + + +
+ + + + + + + + + + +
CPSAttribMaker<CRGBA>* NL3D::CPSColoredParticle::getColorScheme void   )  [inline, inherited]
+
+ + + + + +
+   + + +

+get the color scheme (NULL if none) +

+ +

+Definition at line 202 of file ps_particle_basic.h. +

+

00202 { return _ColorScheme; }
+
+

+ + + + +
+ + + + + + + + + + +
IDriver* NL3D::CPSLocatedBindable::getDriver void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+shortcut to get an instance of the driver +

+ +

+Definition at line 890 of file ps_located.h. +

+References NL3D::CPSLocated::getDriver(), and nlassert. +

+Referenced by NL3D::CPSLocatedBindable::displayIcon2d(), NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CPSDot::draw(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZoneSphere::show(), NL3D::CPSZonePlane::show(), NL3D::CPSLight::show(), NL3D::CPSCylindricVortex::show(), NL3D::CPSGravity::show(), NL3D::CPSDirectionnalForce::show(), NL3D::CPSSphericalEmitter::showTool(), NL3D::CPSEmitterRectangle::showTool(), and NL3D::CPSEmitter::showTool(). +

+

00891          { 
+00892                  nlassert(_Owner);
+00893                  nlassert(_Owner->getDriver());
+00894                  return _Owner->getDriver();
+00895          }              
+
+

+ + + + +
+ + + + + + + + + + +
uint32 NL3D::CPSLocatedBindable::getExternID void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the extern ID of this located bindable +

+ +

+Definition at line 964 of file ps_located.h. +

+References NL3D::CPSLocatedBindable::_ExternID, and uint32. +

+Referenced by NL3D::CPSLocated::bind(), and NL3D::CParticleSystem::unregisterLocatedBindableExternID(). +

+

00964 { return _ExternID; }
+
+

+ + + + +
+ + + + + + + + + + +
const CFontGenerator* NL3D::CPSLocatedBindable::getFontGenerator void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Shortcut to get the font generator if one was set (const version). +

+ +

+Definition at line 904 of file ps_located.h. +

+References NL3D::CParticleSystemProcess::getFontGenerator(), and nlassert. +

+

00905          {
+00906                 nlassert(_Owner);
+00907                 return _Owner->getFontGenerator();
+00908          }
+
+

+ + + + +
+ + + + + + + + + + +
CFontGenerator* NL3D::CPSLocatedBindable::getFontGenerator void   )  [inline, inherited]
+
+ + + + + +
+   + + +

+Shortcut to get the font generator if one was set. +

+ +

+Definition at line 897 of file ps_located.h. +

+References NL3D::CParticleSystemProcess::getFontGenerator(), and nlassert. +

+Referenced by NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZonePlane::show(), NL3D::CPSCylindricVortex::show(), NL3D::CPSGravity::show(), and NL3D::CPSEmitterRectangle::showTool(). +

+

00898          {
+00899                 nlassert(_Owner);
+00900                 return _Owner->getFontGenerator();
+00901          }
+
+

+ + + + +
+ + + + + + + + + + +
const CFontManager * NL3D::CPSLocatedBindable::getFontManager void   )  const [inherited]
+
+ + + + + +
+   + + +

+Shortcut to get the font manager if one was set (const version). +

+ +

+Definition at line 2099 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getFontManager(), and nlassert. +

+

02100 {
+02101         nlassert(_Owner);
+02102         return _Owner->getFontManager();
+02103 }
+
+

+ + + + +
+ + + + + + + + + + +
CFontManager * NL3D::CPSLocatedBindable::getFontManager void   )  [inherited]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+ +

+Definition at line 2091 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getFontManager(), and nlassert. +

+Referenced by NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZonePlane::show(), NL3D::CPSCylindricVortex::show(), NL3D::CPSGravity::show(), and NL3D::CPSEmitterRectangle::showTool(). +

+

02092 {
+02093         nlassert(_Owner);
+02094         return _Owner->getFontManager();
+02095 }
+
+

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

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

+ +

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

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

+

02190 {
+02191         nlassert(_GlobalAnimationEnabled != 0);
+02192         nlassert(stage < IDRV_MAT_MAXTEXTURES);
+02193         nlassert(_GlobalTexAnims.get());
+02194         return _GlobalTexAnims->Anims[stage];
+02195 }
+
+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getInvertedSysMat void   )  const [inherited]
+
+ + + + + +
+   + + +

+shortcut to get the inverted matrix of the system +

+ +

+Definition at line 2116 of file ps_located.cpp. +

+References NL3D::CParticleSystem::getInvertedSysMat(), NL3D::CParticleSystemProcess::getOwner(), and nlassert. +

+

02117 {
+02118         nlassert(_Owner);
+02119                 return _Owner->getOwner()->getInvertedSysMat();
+02120 
+02121 }
+
+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getInvertedViewMat void   )  const [inherited]
+
+ + + + + +
+   + + +

+shortcut to get the inverted view matrix +

+ +

+Definition at line 2134 of file ps_located.cpp. +

+References NL3D::CParticleSystem::getInvertedViewMat(), NL3D::CParticleSystemProcess::getOwner(), and nlassert. +

+

02135 {
+02136         nlassert(_Owner);
+02137         return _Owner->getOwner()->getInvertedViewMat();        
+02138 }       
+
+

+ + + + +
+ + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getLocalToWorldMatrix  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Shortcut to get the local to world matrix. +

+ +

+Definition at line 1144 of file ps_located.h. +

+References NL3D::CPSLocated::getLocalToWorldMatrix(), and nlassert. +

+Referenced by NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSSound::newElement(), NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZonePlane::show(), NL3D::CPSLight::show(), NL3D::CPSGravity::show(), NL3D::CPSEmitterRectangle::showTool(), NL3D::CPSLight::step(), and NL3D::CPSMesh::updatePos(). +

+

01145 {
+01146         nlassert(_Owner);
+01147         return _Owner->getLocalToWorldMatrix();
+01148 }
+
+

+ + + + +
+ + + + + + + + + + +
TPSLod NL3D::CPSLocatedBindable::getLOD void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the valid lods for that object +

+ +

+Definition at line 954 of file ps_located.h. +

+References NL3D::CPSLocatedBindable::_LOD, and NL3D::TPSLod. +

+

00954 { return _LOD; }
+
+

+ + + + +
+ + + + + + + + + + +
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 954 of file ps_mesh.cpp. +

+References _NumFaces, NL3D::CPSLocated::getMaxSize(), and uint32. +

+

00955 {
+00956 //      nlassert(_ModelVb);
+00957         return _NumFaces * _Owner->getMaxSize();
+00958         
+00959 }
+
+

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

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

+ +

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

+References _MorphScheme. +

+

01104 {
+01105         return _MorphScheme;
+01106 }
+
+

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

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

+ +

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

+References _MorphScheme. +

+

01098 {
+01099         return _MorphScheme;
+01100 }
+
+

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

+Get the value used for morphing. +

+ +

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

+References _MorphValue. +

+

01084 {
+01085         return _MorphValue;
+01086 }
+
+

+ + + + +
+ + + + + + + + + + +
std::string NL3D::CPSLocatedBindable::getName void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the located bindable name (edition purpose) +

+ +

+Definition at line 948 of file ps_located.h. +

+

00948 { return _Name; }       
+
+

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

+Get the number of shapes used. +

+ +

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

+References _MeshShapeFileName, and uint. +

+

01030 {
+01031         if (_Touched)
+01032         {       
+01033                 const_cast<CPSConstraintMesh *>(this)->update();
+01034         }
+01035         return _MeshShapeFileName.size();
+01036 }
+
+

+ + + + +
+ + + + + + + + + + +
const CPSLocated* NL3D::CPSLocatedBindable::getOwner void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the located that owns this bindable (const version) +

+ +

+Definition at line 944 of file ps_located.h. +

+

00944 { return _Owner; }              
+
+

+ + + + +
+ + + + + + + + + + +
CPSLocated* NL3D::CPSLocatedBindable::getOwner void   )  [inline, inherited]
+
+ + + + + +
+   + + +

+get the located that owns this bindable +

+ +

+Definition at line 942 of file ps_located.h. +

+Referenced by NL3D::CPSLocated::deleteElement(), NL3D::CParticleSystemInstanceUser::emit(), NL3D::CPSFaceLookAt::CSecondSize::getSizeOwner(), NL3D::CPSSound::newElement(), NL3D::CPSLocated::registerIntegrableForce(), NL3D::CParticleSystem::registerLocatedBindableExternID(), NL3D::CParticleSystemInstanceUser::removeByID(), NL3D::CPSSound::resize(), NL3D::CPSLight::resize(), NL3D::CPSSound::step(), NL3D::CPSLocated::unregisterIntegrableForce(), and NL3D::CParticleSystem::unregisterLocatedBindableExternID(). +

+

00942 { return _Owner; }
+
+

+ + + + +
+ + + + + + + + + + +
CPlaneBasis NL3D::CPSRotated3DPlaneParticle::getPlaneBasis void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the constant basis +

+ +

+Definition at line 678 of file ps_particle_basic.h. +

+References NL3D::CPSRotated3DPlaneParticle::_PlaneBasis. +

+

00678 { return _PlaneBasis; }
+
+

+ + + + +
+ + + + + + + + + + +
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 542 of file ps_mesh.h. +

+

00542 { return _Owner; }
+
+

+ + + + +
+ + + + + + + + + + +
const CPSAttribMaker<CPlaneBasis>* NL3D::CPSRotated3DPlaneParticle::getPlaneBasisScheme void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the plane basis scheme, (NULL if none) const version +

+ +

+Definition at line 673 of file ps_particle_basic.h. +

+References NL3D::CPSRotated3DPlaneParticle::_PlaneBasisScheme. +

+

00673 { return _PlaneBasisScheme; }
+
+

+ + + + +
+ + + + + + + + + + +
CPSAttribMaker<CPlaneBasis>* NL3D::CPSRotated3DPlaneParticle::getPlaneBasisScheme void   )  [inline, inherited]
+
+ + + + + +
+   + + +

+get the plane basis scheme, (NULL if none) +

+Set a constant basis for all particles

See also:
setPlaneBasisSchemeScheme()
+ +

+Definition at line 670 of file ps_particle_basic.h. +

+References NL3D::CPSRotated3DPlaneParticle::_PlaneBasisScheme. +

+

00670 { return _PlaneBasisScheme; }
+
+

+ + + + +
+ + + + + + + + + + +
virtual uint32 NL3D::CPSParticle::getPriority void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+return priority +

+ +

+Implements NL3D::CPSLocatedBindable. +

+Definition at line 66 of file ps_particle_basic.h. +

+References uint32. +

+

00066 { return 1000; }
+
+

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

+Get a shape name by its index. +

+ +

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

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

+

01062 {
+01063         if (_Touched) 
+01064         {       
+01065                 const_cast<CPSConstraintMesh *>(this)->update();
+01066         }
+01067         nlassert(index < _MeshShapeFileName.size());
+01068         return _MeshShapeFileName[index];
+01069 }
+
+

+ + + + +
+ + + + + + + + + + +
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 999 of file ps_mesh.cpp. +

+References _MeshShapeFileName, and nlassert. +

+

01000 {
+01001         if (_Touched) 
+01002         {       
+01003                 const_cast<CPSConstraintMesh *>(this)->update();
+01004         }
+01005         nlassert(_MeshShapeFileName.size() == 1);
+01006         return _MeshShapeFileName[0];
+01007 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSConstraintMesh::getShapeNumVerts std::vector< sint > &  numVerts  ) 
+
+ + + + + +
+   + + +

+get number of vertices for each mesh, or an error code if loading failed (see TError enum) NB : this force the meshs to be reloaded +

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

+References update(). +

+

01128 {
+01129         _Touched = 1; // force reload
+01130         update(&numVerts);
+01131 }
+
+

+ + + + +
+ + + + + + + + + + +
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 1039 of file ps_mesh.cpp. +

+References _MeshShapeFileName. +

+

01040 {
+01041         if (_Touched) 
+01042         {       
+01043                 const_cast<CPSConstraintMesh *>(this)->update();
+01044         }
+01045         std::copy(_MeshShapeFileName.begin(), _MeshShapeFileName.end(), shapesNames);
+01046 }
+
+

+ + + + +
+ + + + + + + + + + +
float NL3D::CPSSizedParticle::getSize void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the constant size +

+ +

+Definition at line 274 of file ps_particle_basic.h. +

+References NL3D::CPSSizedParticle::_ParticleSize. +

+Referenced by NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSSizedParticle::resizeSize(), and NL3D::CPSSizedParticle::setSizeScheme(). +

+

00274 { return _ParticleSize; }
+
+

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

+deriver must return their owner there +

+ +

+Implements NL3D::CPSSizedParticle. +

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

+

00541 { return _Owner; }      
+
+

+ + + + +
+ + + + + + + + + + +
const CPSAttribMaker<float>* NL3D::CPSSizedParticle::getSizeScheme void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the size scheme (NULL if none) const version +

+ +

+Definition at line 268 of file ps_particle_basic.h. +

+References NL3D::CPSSizedParticle::_SizeScheme. +

+

00268 { return _SizeScheme; }
+
+

+ + + + +
+ + + + + + + + + + +
CPSAttribMaker<float>* NL3D::CPSSizedParticle::getSizeScheme void   )  [inline, inherited]
+
+ + + + + +
+   + + +

+get the size scheme (NULL if none) +

+ +

+Definition at line 265 of file ps_particle_basic.h. +

+References NL3D::CPSSizedParticle::_SizeScheme. +

+Referenced by NL3D::CPSFaceLookAtHelper::drawLookAt(), and NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(). +

+

00265 { return _SizeScheme; }
+
+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getSysMat void   )  const [inherited]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+ +

+Definition at line 2108 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getOwner(), NL3D::CParticleSystem::getSysMat(), and nlassert. +

+

02109 {
+02110         nlassert(_Owner);               
+02111         return _Owner->getOwner()->getSysMat();
+02112 }
+
+

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

+Get the the type of texture animation. +

+ +

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

+References _GlobalAnimationEnabled, GlobalAnim, NoAnim, and TTexAnimType. +

+Referenced by setTexAnimType(). +

+

02200 {
+02201         return (TTexAnimType) (_GlobalAnimationEnabled != 0 ? GlobalAnim : NoAnim);     
+02202 }
+
+

+ + + + +
+ + + + + + + + + + +
uint32 NL3D::CPSParticle::getType void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+return this bindable type +

+ +

+Implements NL3D::CPSLocatedBindable. +

+Definition at line 63 of file ps_particle_basic.h. +

+References NL3D::PSParticle, and uint32. +

+

00063 { return PSParticle; }
+
+

+ + + + +
+ + + + + + + + + +
virtual bool NL3D::CPSLocatedBindable::getUserMatrixUsageCount  )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSEmitter. +

+Definition at line 974 of file ps_located.h. +

+Referenced by NL3D::CPSLocatedBindable::finalize(), and NL3D::CPSLocatedBindable::setOwner(). +

+

00974 { return 0; }
+
+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CMatrix & NL3D::CPSLocatedBindable::getViewMat void   )  const [inherited]
+
+ + + + + +
+   + + +

+shortcut to get the view matrix +

+ +

+Definition at line 2125 of file ps_located.cpp. +

+References NL3D::CParticleSystemProcess::getOwner(), NL3D::CParticleSystem::getViewMat(), and nlassert. +

+Referenced by NL3D::CPSRibbonLookAt::displayRibbons(), and NL3D::CPSFaceLookAtHelper::drawLookAt(). +

+

02126 {
+02127         nlassert(_Owner);
+02128         return _Owner->getOwner()->getViewMat();        
+02129 }       
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::CPSLocatedBindable::hasEmitters void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+tells wether there are alive emitters +

+ +

+Definition at line 958 of file ps_located.h. +

+

00958 { return false; }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CPSConstraintMesh::hasLightableFaces  )  [virtual]
+
+ + + + + +
+   + + +

+from CPSParticle : return true if there are lightable faces in the object +

+ +

+Implements NL3D::CPSParticle. +

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

+References _HasLightableFaces, and update(). +

+

00981 {
+00982         if (!_Touched) return _HasLightableFaces != 0;  
+00983         update();
+00984         return _HasLightableFaces != 0;
+00985 }
+
+

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

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

+ +

+Implements NL3D::CPSParticle. +

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

+References _HasOpaqueFaces, and update(). +

+Referenced by step(). +

+

00973 {
+00974         if (!_Touched) return _HasOpaqueFaces != 0;     
+00975         update();
+00976         return _HasOpaqueFaces != 0;
+00977 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual bool NL3D::CPSParticle::hasParticles void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+return true if this located bindable derived class holds alive particles +

+ +

+Reimplemented from NL3D::CPSLocatedBindable. +

+Definition at line 69 of file ps_particle_basic.h. +

+References NL3D::CPSLocated::getSize(), and nlassert. +

+

00069 { nlassert(_Owner); return _Owner->getSize() != 0; }
+
+

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

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

+we must update the mesh to know wether it has transparent faces +

+Implements NL3D::CPSParticle. +

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

+References _HasTransparentFaces, and update(). +

+Referenced by step(). +

+

00964 {
+00965         if (!_Touched) return _HasTransparentFaces != 0;
+00967         update();
+00968         return _HasTransparentFaces != 0;
+00969 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
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.

Parameters:
+ + + + +
 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
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 1304 of file ps_mesh.cpp. +

+References NL3D::ConstraintMeshMaxNumPrerotatedModels, fillIndexesInPrecompBasis(), NL3D::MakeRandomUnitVect(), nlassert, uint, uint32, and v. +

+Referenced by disableHintRotateTheSame(). +

+

01308 {
+01309         nlassert(nbConfiguration <= ConstraintMeshMaxNumPrerotatedModels);
+01310 
+01311         // TODO : avoid code duplication with CPSFace ...
+01312         _MinAngularVelocity = minAngularVelocity;
+01313         _MaxAngularVelocity = maxAngularVelocity;
+01314 
+01315 
+01316 
+01317         _PrecompBasis.resize(nbConfiguration);
+01318 
+01319         if (nbConfiguration)
+01320         {
+01321                 // each precomp basis is created randomly;
+01322                 for (uint k = 0; k < nbConfiguration; ++k)
+01323                 {
+01324                          CVector v = MakeRandomUnitVect();
+01325                         _PrecompBasis[k].Basis = CPlaneBasis(v);
+01326                         _PrecompBasis[k].Axis = MakeRandomUnitVect();
+01327                         _PrecompBasis[k].AngularVelocity = minAngularVelocity 
+01328                                                                                            + (rand() % 20000) / 20000.f * (maxAngularVelocity - minAngularVelocity);
+01329 
+01330                 }       
+01331 
+01332                 // we need to do this because nbConfs may have changed
+01333                 fillIndexesInPrecompBasis();
+01334         }       
+01335 }
+
+

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

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

+ +

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

+References _PreRotatedMeshVB, _PreRotatedMeshVBWithNormal, NL3D::ConstraintMeshMaxNumPrerotatedModels, NL3D::ConstraintMeshMaxNumVerts, NL3D::CVertexBuffer::setNumVertices(), and NL3D::CVertexBuffer::setVertexFormat(). +

+

02022 {
+02023         // position, no normals
+02024         _PreRotatedMeshVB.setVertexFormat(CVertexBuffer::PositionFlag);
+02025         _PreRotatedMeshVB.setNumVertices(ConstraintMeshMaxNumPrerotatedModels * ConstraintMeshMaxNumVerts);
+02026 
+02027         // position & normals
+02028         _PreRotatedMeshVBWithNormal.setVertexFormat(CVertexBuffer::PositionFlag | CVertexBuffer::NormalFlag);
+02029         _PreRotatedMeshVBWithNormal.setNumVertices(ConstraintMeshMaxNumPrerotatedModels * ConstraintMeshMaxNumVerts);
+02030 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CPSLocatedBindable::isActive  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 844 of file ps_located.h. +

+References NL3D::CPSLocatedBindable::_Active. +

+Referenced by NL3D::CParticleSystem::hasActiveEmitters(). +

+

00844 { return _Active; }                             
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CPSParticle::isAutoLODDisabled  )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Test wether Auto-LOD is disabled. +

+ +

+Definition at line 140 of file ps_particle_basic.h. +

+References NL3D::CPSParticle::_DisableAutoLOD. +

+

00140 { return _DisableAutoLOD; }     
+
+

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

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

+ +

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

+References _ReinitGlobalAnimTimeOnNewElement. +

+

00361 { return _ReinitGlobalAnimTimeOnNewElement != 0; }
+
+

+ + + + +
+ + + + + + + + + + +
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 1924 of file ps_mesh.cpp. +

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

+

01925 {
+01926         nlassert(stage < IDRV_MAT_MAXTEXTURES);
+01927         return (_ModulatedStages & (1 << stage)) != 0;
+01928 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CPSConstraintMesh::isValidBuild  )  const
+
+ + + + + +
+   + + +

+test if mesh is correctly loaded and built (e.g all shape have been loaded and have compatible format) * NB : this force the meshs to be loaded +

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

+References _ValidBuild. +

+

01011 {
+01012         if (_Touched) 
+01013         {       
+01014                 const_cast<CPSConstraintMesh *>(this)->update();
+01015         }
+01016         return _ValidBuild != 0;
+01017 }
+
+

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

+test wether vertex color lighting is forced. +

+ +

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

+References _VertexColorLightingForced. +

+

00317 { return _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 1531 of file ps_mesh.cpp. +

+References _PreRotatedMeshVB, _PreRotatedMeshVBWithNormal, CHECK_VERTEX_BUFFER, NL3D::CVertexBuffer::getNormalOff(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBuffer::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CVertexBuffer::getVertexSize(), NLMISC::CMatrix::identity(), NLMISC::CMatrix::mulVector(), NLMISC::CMatrix::rotate(), NLMISC::CMatrix::setRot(), NL3D::TAnimationTime, uint, and uint8. +

+Referenced by NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(). +

+

01532 {
+01533         // get a VB that has positions and eventually normals
+01534         CVertexBuffer &prerotatedVb = inVb.getVertexFormat() & CVertexBuffer::NormalFlag ? _PreRotatedMeshVBWithNormal : _PreRotatedMeshVB;
+01535 
+01536         // size of vertices for source VB
+01537         const uint vSize = inVb.getVertexSize();
+01538 
+01539         // size for vertices in prerotated model
+01540         const uint vpSize = prerotatedVb.getVertexSize();
+01541         
+01542 
+01543         // offset of normals in vertices of the prerotated model, and source model              
+01544         uint normalOff=0;
+01545         uint pNormalOff=0;
+01546         if (prerotatedVb.getVertexFormat() & CVertexBuffer::NormalFlag) 
+01547         {
+01548                 normalOff  =  inVb.getNormalOff();
+01549                 pNormalOff =  prerotatedVb.getNormalOff();                      
+01550         }
+01551 
+01552         const uint nbVerticesInSource   = inVb.getNumVertices();
+01553                 
+01554 
+01555         // rotate basis
+01556         // and compute the set of prerotated meshs that will then duplicated (with scale and translation) to create the Vb of what must be drawn
+01557         uint8 *outVertex = (uint8 *) prerotatedVb.getVertexCoordPointer();
+01558         for (CPSVector<CPlaneBasisPair>::V::iterator it = _PrecompBasis.begin(); it != _PrecompBasis.end(); ++it)
+01559         {
+01560                 // not optimized at all, but this will apply to very few elements anyway...
+01561                 CMatrix mat;
+01562                 mat.rotate(CQuat(it->Axis, ellapsedTime * it->AngularVelocity));
+01563                 CVector n = mat * it->Basis.getNormal();
+01564                 it->Basis = CPlaneBasis(n);
+01565         
+01566                 mat.identity();
+01567                 mat.setRot(it->Basis.X, it->Basis.Y, it->Basis.X ^ it->Basis.Y);
+01568 
+01569                 uint8 *inVertex = (uint8 *) inVb.getVertexCoordPointer();
+01570 
+01571                 uint k = nbVerticesInSource;
+01572 
+01573                 // check wether we need to rotate normals as well...
+01574                 if (inVb.getVertexFormat() & CVertexBuffer::NormalFlag)
+01575                 {
+01576                 
+01577                         do
+01578                         {
+01579                                 CHECK_VERTEX_BUFFER(inVb, inVertex);
+01580                                 CHECK_VERTEX_BUFFER(inVb, inVertex + normalOff);
+01581                                 CHECK_VERTEX_BUFFER(prerotatedVb, outVertex);
+01582                                 CHECK_VERTEX_BUFFER(prerotatedVb, outVertex + pNormalOff);
+01583 
+01584                                 * (CVector *) outVertex =  mat.mulVector(* (CVector *) inVertex);
+01585                                 * (CVector *) (outVertex + normalOff) =  mat.mulVector(* (CVector *) (inVertex + pNormalOff) );
+01586                                 outVertex += vpSize;
+01587                                 inVertex  += vSize;
+01588                                 
+01589                         }
+01590                         while (--k);            
+01591                 }
+01592                 else
+01593                 {
+01594                         // no normal included
+01595                         do
+01596                         {       
+01597                                 
+01598                                 CHECK_VERTEX_BUFFER(prerotatedVb, outVertex);   
+01599                                 CHECK_VERTEX_BUFFER(inVb, inVertex);                                    
+01600 
+01601                                 * (CVector *) outVertex =  mat.mulVector(* (CVector *) inVertex);
+01602                                 outVertex += vpSize;
+01603                                 inVertex += vSize;
+01604                         }
+01605                         while (--k);    
+01606 
+01607                 }
+01608         }
+01609         return prerotatedVb;
+01610 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::motionTypeChanged bool  parametric  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+called when a located has switch between incrmental / parametric motion. The default does nothing +

+ +

+Reimplemented in NL3D::CPSRibbonBase. +

+Definition at line 971 of file ps_located.h. +

+Referenced by NL3D::CPSLocated::bind(). +

+

00971 {}
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSColoredParticle::newColorElement CPSLocated emitterLocated,
uint32  emitterIndex
[inline, protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 233 of file ps_particle_basic.h. +

+References NL3D::CPSAttribMaker< CRGBA >::hasMemory(), NL3D::CPSAttribMaker< CRGBA >::newElement(), and uint32. +

+Referenced by NL3D::CPSTailDot::newElement(), NL3D::CPSShockWave::newElement(), NL3D::CPSRibbonLookAt::newElement(), NL3D::CPSRibbon::newElement(), NL3D::CPSQuad::newElement(), newElement(), NL3D::CPSFanLight::newElement(), and NL3D::CPSDot::newElement(). +

+

00234                 {
+00235                         if (_ColorScheme && _ColorScheme->hasMemory()) _ColorScheme->newElement(emitterLocated, emitterIndex);
+00236                 }       
+
+

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

+Generate a new element. +

+Implements NL3D::CPSParticle. +

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

+References _GlobalAnimationEnabled, _GlobalAnimDate, _MorphScheme, _ReinitGlobalAnimTimeOnNewElement, NL3D::CPSLocated::getNewElementIndex(), NL3D::CParticleSystemProcess::getOwner(), NL3D::CParticleSystem::getSystemDate(), NL3D::CPSAttribMaker< float >::hasMemory(), NL3D::CPSColoredParticle::newColorElement(), NL3D::CPSAttribMaker< float >::newElement(), NL3D::CPSRotated3DPlaneParticle::newPlaneBasisElement(), NL3D::CPSSizedParticle::newSizeElement(), and uint32. +

+

01856 {
+01857         newSizeElement(emitterLocated, emitterIndex);
+01858         newPlaneBasisElement(emitterLocated, emitterIndex);
+01859         // TODO : avoid code cuplication with CPSFace ...
+01860         const uint32 nbConf = _PrecompBasis.size();
+01861         if (nbConf) // do we use precomputed basis ?
+01862         {
+01863                 _IndexInPrecompBasis[_Owner->getNewElementIndex()] = rand() % nbConf;
+01864         }
+01865         newColorElement(emitterLocated, emitterIndex);
+01866         if (_GlobalAnimationEnabled && _ReinitGlobalAnimTimeOnNewElement)
+01867         {               
+01868                 _GlobalAnimDate = _Owner->getOwner()->getSystemDate();
+01869         }
+01870         if (_MorphScheme && _MorphScheme->hasMemory()) _MorphScheme->newElement(emitterLocated, emitterIndex);
+01871 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSRotated3DPlaneParticle::newPlaneBasisElement CPSLocated emitterLocated,
uint32  emitterIndex
[inline, protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 699 of file ps_particle_basic.h. +

+References NL3D::CPSRotated3DPlaneParticle::_PlaneBasisScheme, NL3D::CPSAttribMaker< CPlaneBasis >::hasMemory(), NL3D::CPSAttribMaker< CPlaneBasis >::newElement(), and uint32. +

+Referenced by newElement(), NL3D::CPSMesh::newElement(), and NL3D::CPSFace::newElement(). +

+

00700                 {
+00701                         if (_PlaneBasisScheme && _PlaneBasisScheme->hasMemory()) _PlaneBasisScheme->newElement(emitterLocated, emitterIndex);
+00702                 }       
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSSizedParticle::newSizeElement CPSLocated emitterLocated,
uint32  emitterIndex
[inline, protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 291 of file ps_particle_basic.h. +

+References NL3D::CPSSizedParticle::_SizeScheme, NL3D::CPSAttribMaker< float >::hasMemory(), NL3D::CPSAttribMaker< float >::newElement(), and uint32. +

+Referenced by NL3D::CPSShockWave::newElement(), NL3D::CPSRibbonLookAt::newElement(), NL3D::CPSRibbon::newElement(), NL3D::CPSQuad::newElement(), newElement(), NL3D::CPSMesh::newElement(), and NL3D::CPSFanLight::newElement(). +

+

00292                 {
+00293                         if (_SizeScheme && _SizeScheme->hasMemory()) _SizeScheme->newElement(emitterLocated, emitterIndex);
+00294                 }       
+
+

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

+

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSParticle::notifyOwnerMaxNumFacesChanged void   )  const [inline, protected, inherited]
+
+ + + + + +
+   + + +

+Shortcut to notify that the max number of faces has changed This must be called when a geometric property of the particle has been modified This needn't to be called during CPSParticle::resize overrides +

+Definition at line 151 of file ps_particle_basic.h. +

+References NL3D::CPSLocated::notifyMaxNumFacesChanged(). +

+Referenced by NL3D::CPSFanLight::setNbFans(), NL3D::CPSShockWave::setNbSegs(), and update(). +

+

00152         {
+00153                 if (_Owner)
+00154                 {
+00155                         _Owner->notifyMaxNumFacesChanged();
+00156                 }
+00157         }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::notifyTargetRemoved CPSLocated ptr  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+Can be used by located bindable that have located as targets (emitter, collision zone, forces) to be notified that one of their target has been removed. To do this : The object that focus the target must call registerDTorObserver on the target, with himself as a parameter When the target is removed, this target will call this method for all registered CPSLocated The default behaviour remove this object as an observer

+

See also:
CPSLocated::registerDTorObserver()
+ +

+Reimplemented in NL3D::CPSEmitter, and NL3D::CPSTargetLocatedBindable. +

+Definition at line 1996 of file ps_located.cpp. +

+References NL3D::CPSLocated::unregisterDtorObserver(). +

+Referenced by NL3D::CPSLocated::releaseRefTo(). +

+

01997 {
+01998         ptr->unregisterDtorObserver(this);
+01999 }
+
+

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

+ +

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

+References nlassert. +

+

00584 { nlassert(0); return *this; /* not supported */ }
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CPSLocatedBindable::releaseAllRef  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+Release any reference this obj may have to other process of the system For example, this is used when detaching a located bindable from a system. +

+Reimplemented in NL3D::CPSEmitter, NL3D::CPSLight, NL3D::CPSTargetLocatedBindable, and NL3D::CPSMesh. +

+Definition at line 2170 of file ps_located.cpp. +

+Referenced by NL3D::CPSLocatedBindable::setOwner(). +

+

02171 {
+02172 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::releaseRefTo const CParticleSystemProcess other  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Release any reference this obj may have on the given process. For example, this is used when detaching a located bindable from a system. +

+Reimplemented in NL3D::CPSEmitter, and NL3D::CPSTargetLocatedBindable. +

+Definition at line 871 of file ps_located.h. +

+

00871 {}
+
+

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

+release the shapes used by this particle +

+ +

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

+References _Meshes, _ModelBank, and NL3D::CShapeBank::release(). +

+Referenced by clean(), and update(). +

+

01509 {
+01510         for (TMeshVect::iterator it = _Meshes.begin(); it != _Meshes.end(); ++it)
+01511         {
+01512                 if (*it)
+01513                 {
+01514                         if (_ModelBank) _ModelBank->release(*it);
+01515                 }
+01516         }
+01517         _Meshes.clear();
+01518 }
+
+

+ + + + +
+ + + + + + + + + + +
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 1889 of file ps_mesh.cpp. +

+References _MorphScheme, NL3D::CPSLocated::getSize(), NL3D::CPSAttribMaker< float >::hasMemory(), nlassert, NL3D::CPSAttribMaker< float >::resize(), NL3D::CPSColoredParticle::resizeColor(), NL3D::CPSRotated3DPlaneParticle::resizePlaneBasis(), NL3D::CPSSizedParticle::resizeSize(), size, and uint32. +

+

01890 {
+01891         nlassert(size < (1 << 16));
+01892         resizeSize(size);
+01893         resizePlaneBasis(size);
+01894         // TODO : avoid code cuplication with CPSFace ...
+01895         if (_PrecompBasis.size()) // do we use precomputed basis ?
+01896         {
+01897                 _IndexInPrecompBasis.resize(size);
+01898         }
+01899         resizeColor(size);
+01900         if (_MorphScheme && _MorphScheme->hasMemory()) _MorphScheme->resize(size, _Owner->getSize());
+01901 }       
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSColoredParticle::resizeColor uint32  size  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 241 of file ps_particle_basic.h. +

+References NL3D::CPSColoredParticle::getColorOwner(), NL3D::CPSAttribMaker< CRGBA >::hasMemory(), nlassert, NL3D::CPSAttribMaker< CRGBA >::resize(), size, and uint32. +

+Referenced by NL3D::CPSTailDot::resize(), NL3D::CPSShockWave::resize(), NL3D::CPSRibbonLookAt::resize(), NL3D::CPSRibbon::resize(), NL3D::CPSQuad::resize(), resize(), NL3D::CPSFanLight::resize(), and NL3D::CPSDot::resize(). +

+

00242                 {
+00243                         nlassert(size < (1 << 16));
+00244                         if (_ColorScheme && _ColorScheme->hasMemory()) _ColorScheme->resize(size, getColorOwner()->getSize());
+00245                 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSRotated3DPlaneParticle::resizePlaneBasis uint32  size  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 707 of file ps_particle_basic.h. +

+References NL3D::CPSRotated3DPlaneParticle::_PlaneBasisScheme, NL3D::CPSRotated3DPlaneParticle::getPlaneBasisOwner(), NL3D::CPSAttribMaker< CPlaneBasis >::hasMemory(), nlassert, NL3D::CPSAttribMaker< CPlaneBasis >::resize(), size, and uint32. +

+Referenced by resize(), NL3D::CPSMesh::resize(), and NL3D::CPSFace::resize(). +

+

00708                 {
+00709                         nlassert(size < (1 << 16));
+00710                         if (_PlaneBasisScheme && _PlaneBasisScheme->hasMemory()) _PlaneBasisScheme->resize(size, getPlaneBasisOwner()->getSize());
+00711                 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSSizedParticle::resizeSize uint32  size  )  [inline, protected, inherited]
+
+ + + + + +
+   + + +

+ +

+Definition at line 299 of file ps_particle_basic.h. +

+References NL3D::CPSSizedParticle::_SizeScheme, NL3D::CPSSizedParticle::getSize(), NL3D::CPSSizedParticle::getSizeOwner(), NL3D::CPSAttribMaker< float >::hasMemory(), nlassert, NL3D::CPSAttribMaker< float >::resize(), size, and uint32. +

+Referenced by NL3D::CPSShockWave::resize(), NL3D::CPSRibbonLookAt::resize(), NL3D::CPSRibbon::resize(), NL3D::CPSQuad::resize(), resize(), NL3D::CPSMesh::resize(), and NL3D::CPSFanLight::resize(). +

+

00300                 {
+00301                         nlassert(size < (1 << 16));
+00302                         if (_SizeScheme && _SizeScheme->hasMemory()) _SizeScheme->resize(size, getSizeOwner()->getSize());
+00303                 }
+
+

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

+ +

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

+References _MeshDisplayShare, _Meshes, NL3D::CPSConstraintMesh::CMeshDisplayShare::getMeshDisplay(), NL3D::CPSConstraintMesh::CMeshDisplay::RdrPasses, TRdrPassSet, and update(). +

+Referenced by setTexAnimType(). +

+

02239 {
+02240         update();               
+02241         CMeshDisplay  &md= _MeshDisplayShare.getMeshDisplay(_Meshes[0], _Meshes[0]->getVertexBuffer().getVertexFormat() | (_ColorScheme ? CVertexBuffer::PrimaryColorFlag : 0));
+02242         TRdrPassSet rdrPasses = md.RdrPasses;
+02243         // render meshs : we process each rendering pass
+02244         for (TRdrPassSet::iterator rdrPassIt = rdrPasses.begin(); rdrPassIt != rdrPasses.end(); ++rdrPassIt)
+02245         {       
+02246                 rdrPassIt->Mat = rdrPassIt->SourceMat;          
+02247         }
+02248 }
+
+

+ + + + +
+ + + + + + + + + + +
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 1355 of file ps_mesh.cpp. +

+References PGlobalTexAnims, sint, TMeshNameVect, transform, and uint32. +

+

01356 {
+01357 
+01358         sint ver = f.serialVersion(4);
+01359         if (f.isReading())
+01360         {
+01361                 clean();
+01362         }
+01363 
+01364         CPSParticle::serial(f);
+01365         CPSSizedParticle::serialSizeScheme(f);
+01366         CPSRotated3DPlaneParticle::serialPlaneBasisScheme(f);
+01367 
+01368         // prerotations ...
+01369 
+01370         if (f.isReading())
+01371         {
+01372                 uint32 nbConfigurations;
+01373                 f.serial(nbConfigurations);
+01374                 if (nbConfigurations)
+01375                 {
+01376                         f.serial(_MinAngularVelocity, _MaxAngularVelocity);             
+01377                 }
+01378                 hintRotateTheSame(nbConfigurations, _MinAngularVelocity, _MaxAngularVelocity);  
+01379         }
+01380         else    
+01381         {                               
+01382                 uint32 nbConfigurations = _PrecompBasis.size();
+01383                 f.serial(nbConfigurations);
+01384                 if (nbConfigurations)
+01385                 {
+01386                         f.serial(_MinAngularVelocity, _MaxAngularVelocity);             
+01387                 }
+01388         }
+01389 
+01390         // saves the model file name, or an empty string if nothing has been set        
+01391         static std::string emptyStr;
+01392 
+01393         if (ver < 4) // early version : no morphing support
+01394         {
+01395                 if (!f.isReading())
+01396                 {
+01397                         if (_MeshShapeFileName.size() > 0)
+01398                         {
+01399                                 f.serial(_MeshShapeFileName[0]);                        
+01400                         }
+01401                         else
+01402                         {
+01403                                 f.serial(emptyStr); 
+01404                         }
+01405                 }
+01406                 else
+01407                 {       
+01408                         _MeshShapeFileName.resize(1);                           
+01409                         f.serial(_MeshShapeFileName[0]);
+01410                         _Touched = true;
+01411                         _ValidBuild = 0;
+01412                 }
+01413         }
+01414 
+01415         if (ver > 1)
+01416         {
+01417                 CPSColoredParticle::serialColorScheme(f);
+01418                 f.serial(_ModulatedStages);
+01419                 if (f.isReading())
+01420                 {
+01421                         bool vcEnabled;
+01422                         f.serial(vcEnabled);
+01423                         _VertexColorLightingForced = vcEnabled;
+01424                 }
+01425                 else
+01426                 {
+01427                         bool vcEnabled = (_VertexColorLightingForced != 0);
+01428                         f.serial(vcEnabled);
+01429                 }                                               
+01430         }
+01431 
+01432         if (ver > 2) // texture animation
+01433         {
+01434                 if (f.isReading())
+01435                 {
+01436                         bool gaEnabled;
+01437                         f.serial(gaEnabled);
+01438                         _GlobalAnimationEnabled = gaEnabled;
+01439                         if (gaEnabled)
+01440                         {
+01441                                 PGlobalTexAnims newPtr(new CGlobalTexAnims); // create new
+01442                                 std::swap(_GlobalTexAnims, newPtr);                      // replace old
+01443                                 f.serial(*_GlobalTexAnims);
+01444                         }
+01445 
+01446                         bool rgt;
+01447                         f.serial(rgt);
+01448                         _ReinitGlobalAnimTimeOnNewElement = rgt;
+01449                 }
+01450                 else
+01451                 {
+01452                         bool gaEnabled = (_GlobalAnimationEnabled != 0);
+01453                         f.serial(gaEnabled);
+01454                         if (gaEnabled)
+01455                         {
+01456                                 f.serial(*_GlobalTexAnims);
+01457                         }
+01458 
+01459                         bool rgt = _ReinitGlobalAnimTimeOnNewElement != 0;
+01460                         f.serial(rgt);                  
+01461                 }
+01462         }
+01463 
+01464         if (ver > 3) // mesh morphing
+01465         {
+01466                 if (!f.isReading())
+01467                 {
+01468                         // remove path
+01469                         TMeshNameVect meshNamesWithoutPath = _MeshShapeFileName;
+01470                         std::transform(meshNamesWithoutPath.begin(), meshNamesWithoutPath.end(), meshNamesWithoutPath.begin(), std::ptr_fun(NLMISC::CFile::getFilename));
+01471                         f.serialCont(meshNamesWithoutPath);
+01472                 }
+01473                 else
+01474                 {               
+01475                         f.serialCont(_MeshShapeFileName);
+01476                 }
+01477                 bool useScheme;
+01478                 if (f.isReading())
+01479                 {               
+01480                         delete _MorphScheme;
+01481                 }
+01482                 else
+01483                 {
+01484                         useScheme = _MorphScheme != NULL;
+01485                 }
+01486                 f.serial(useScheme);
+01487                 if (useScheme)
+01488                 {                               
+01489                         f.serialPolyPtr(_MorphScheme);
+01490                 }
+01491                 else
+01492                 {
+01493                         f.serial(_MorphValue);
+01494                 }               
+01495         }
+01496 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSColoredParticle::serialColorScheme NLMISC::IStream f  )  throw (NLMISC::EStream) [inherited]
+
+ + + + + +
+   + + +

+serialization. +

+ +

+Definition at line 155 of file ps_particle_basic.cpp. +

+

00156 {       
+00157         f.serialVersion(1);     
+00158         if (f.isReading())
+00159         {
+00160                 if (_ColorScheme)
+00161                 {
+00162                         delete _ColorScheme;
+00163                         _ColorScheme = NULL;
+00164                 }
+00165         }
+00166         bool useColorScheme = _ColorScheme != NULL;
+00167         f.serial(useColorScheme);
+00168         if (useColorScheme)
+00169         {
+00170                 f.serialPolyPtr(_ColorScheme);
+00171         }
+00172         else
+00173         {
+00174                 f.serial(_Color);
+00175         }
+00176 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSRotated3DPlaneParticle::serialPlaneBasisScheme NLMISC::IStream f  )  throw (NLMISC::EStream) [inherited]
+
+ + + + + +
+   + + +

+=================================================================================== +

+ +

+Definition at line 469 of file ps_particle_basic.cpp. +

+

00470 {
+00471         f.serialVersion(1);     
+00472         f.serialPolyPtr(_PlaneBasisScheme);     
+00473         bool usePlaneBasisScheme = _PlaneBasisScheme != NULL;   
+00474         if (!usePlaneBasisScheme)
+00475         {
+00476                 f.serial(_PlaneBasis);
+00477         }
+00478 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSSizedParticle::serialSizeScheme NLMISC::IStream f  )  throw (NLMISC::EStream) [inherited]
+
+ + + + + +
+   + + +

+serialization. We choose a different name because of multiple-inheritance +

+ +

+Definition at line 211 of file ps_particle_basic.cpp. +

+

00212 {
+00213         f.serialVersion(1);     
+00214         if (f.isReading())
+00215         {
+00216                 if (_SizeScheme)
+00217                 {
+00218                         delete _SizeScheme;
+00219                         _SizeScheme = NULL;
+00220                 }
+00221         }
+00222         bool useSizeScheme = _SizeScheme != NULL;
+00223         f.serial(useSizeScheme);
+00224         if (useSizeScheme)
+00225         {               
+00226                 f.serialPolyPtr(_SizeScheme);
+00227         }
+00228         else
+00229         {
+00230                 f.serial(_ParticleSize);
+00231         }       
+00232 };
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setActive bool  active  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Activate / Deactivate this object. When not active, the owning system won't try to call the 'step' method. +

+ +

+Definition at line 843 of file ps_located.h. +

+References NL3D::CPSLocatedBindable::_Active. +

+Referenced by NL3D::CParticleSystem::activateEmitters(), and NL3D::CParticleSystemInstanceUser::setActive(). +

+

00843 { _Active = active; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSColoredParticle::setColor NLMISC::CRGBA  col  )  [inherited]
+
+ + + + + +
+   + + +

+Set a constant color for the particles. remove any previous scheme. +

+ +

+Definition at line 135 of file ps_particle_basic.cpp. +

+References NL3D::CPSColoredParticle::updateMatAndVbForColor(). +

+

00136 {       
+00137         delete _ColorScheme;
+00138         _ColorScheme = NULL;
+00139         _Color = col;
+00140         updateMatAndVbForColor();
+00141 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSColoredParticle::setColorScheme CPSAttribMaker< CRGBA > *  col  )  [inherited]
+
+ + + + + +
+   + + +

+Set an attribute maker that produce a color It must have been allocated by new It will be deleted by this object +

+Definition at line 125 of file ps_particle_basic.cpp. +

+References NL3D::CPSColoredParticle::getColorOwner(), nlassert, NL3D::CPSAttribMaker< T >::resize(), and NL3D::CPSColoredParticle::updateMatAndVbForColor(). +

+

00126 {       
+00127         nlassert(col);
+00128         delete _ColorScheme;            
+00129         _ColorScheme = col;
+00130         if (getColorOwner() && col->hasMemory()) col->resize(getColorOwner()->getMaxSize(), getColorOwner()->getSize());
+00131         updateMatAndVbForColor();
+00132 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setExternID uint32  id  )  [inherited]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+set the extern ID of this located bindable. 0 means no extern access. The map of ID-locatedBindable. Is in th particle system, so this located bindable must have been attached to a particle system, otherwise an assertion is raised +

+Definition at line 2149 of file ps_located.cpp. +

+References NL3D::CPSLocatedBindable::_ExternID, NL3D::CParticleSystemProcess::getOwner(), NL3D::CParticleSystem::registerLocatedBindableExternID(), uint32, and NL3D::CParticleSystem::unregisterLocatedBindableExternID(). +

+

02150 {
+02151         if (id == _ExternID) return;
+02152         CParticleSystem *ps = NULL;
+02153         if (_Owner && _Owner->getOwner())
+02154         {
+02155                 ps = _Owner->getOwner();
+02156         }       
+02157         if (ps) 
+02158         {
+02159                 ps->unregisterLocatedBindableExternID(this);
+02160                 _ExternID = 0;          
+02161         }
+02162         if (id != 0)
+02163         {       
+02164                 if (ps) ps->registerLocatedBindableExternID(id, this);
+02165                 _ExternID = id;
+02166         }       
+02167 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
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 2180 of file ps_mesh.cpp. +

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

+

02181 {
+02182         nlassert(_GlobalAnimationEnabled != 0);
+02183         nlassert(stage < IDRV_MAT_MAXTEXTURES);
+02184         nlassert(_GlobalTexAnims.get());
+02185         _GlobalTexAnims->Anims[stage] = properties;
+02186 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setLOD TPSLod  lod  )  [inline, inherited]
+
+ + + + + +
+   + + +

+set the LODs that apply to that object (warning : it is based on the position of the system, and don't act on a per instance basis ...) To have per instance precision, you must use an attribute maker that has LOD as its input +

+Definition at line 952 of file ps_located.h. +

+References NL3D::CPSLocatedBindable::_LOD. +

+

00952 { _LOD = lod; }
+
+

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

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

+ +

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

+References _MorphScheme, NL3D::CPSLocated::getMaxSize(), NL3D::CPSLocated::getSize(), NL3D::CPSAttribMaker< float >::hasMemory(), and NL3D::CPSAttribMaker< float >::resize(). +

+

01090 {
+01091         delete _MorphScheme;
+01092         _MorphScheme = scheme;
+01093         if (_MorphScheme->hasMemory()) _MorphScheme->resize(_Owner->getMaxSize(), _Owner->getSize());
+01094 }
+
+

+ + + + +
+ + + + + + + + + + +
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 1074 of file ps_mesh.cpp. +

+References _MorphScheme, _MorphValue, and value. +

+

01075 {
+01076         delete _MorphScheme;
+01077         _MorphScheme = NULL;
+01078         _MorphValue = value;
+01079 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setName const std::string &  name  )  [inline, inherited]
+
+ + + + + +
+   + + +

+set the located bindable name (edition purpose) +

+ +

+Definition at line 946 of file ps_located.h. +

+

00946 { _Name = name; }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setOwner CPSLocated psl  )  [protected, virtual, inherited]
+
+ + + + + +
+   + + +

+*************************************************************************************** +

+ +

+Reimplemented in NL3D::CPSEmitter. +

+Definition at line 1948 of file ps_located.cpp. +

+References NL3D::CParticleSystem::addRefForUserSysCoordInfo(), NL3D::CPSLocatedBindable::deleteElement(), NL3D::CParticleSystemProcess::getOwner(), NL3D::CPSLocated::getSize(), NL3D::CPSLocatedBindable::getUserMatrixUsageCount(), NL3D::CPSLocatedBindable::releaseAllRef(), NL3D::CParticleSystem::releaseRefForUserSysCoordInfo(), and uint. +

+Referenced by NL3D::CPSLocated::bind(), and NL3D::CPSLocated::unbind(). +

+

01949 { 
+01950         if (psl == _Owner) return;
+01951         if (psl == NULL)
+01952         {
+01953                 releaseAllRef();
+01954                 if (_Owner)
+01955                 {
+01956                         // empty this located bindable. Need to be empty if it must be rebound to another located.
+01957                         for (uint k = 0; k < _Owner->getSize(); ++k)
+01958                         {
+01959                                 deleteElement(0);
+01960                         }
+01961                 }                               
+01962         }       
+01963         if (_Owner && _Owner->getOwner())
+01964         {
+01965                 _Owner->getOwner()->releaseRefForUserSysCoordInfo(getUserMatrixUsageCount());
+01966         }
+01967         _Owner = psl;
+01968         if (_Owner && _Owner->getOwner())
+01969         {
+01970                 _Owner->getOwner()->addRefForUserSysCoordInfo(getUserMatrixUsageCount());
+01971         } 
+01972 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSRotated3DPlaneParticle::setPlaneBasis const CPlaneBasis basis  )  [inherited]
+
+ + + + + +
+   + + +

+=================================================================================== +

+ +

+Definition at line 448 of file ps_particle_basic.cpp. +

+References NL3D::CPSRotated3DPlaneParticle::_PlaneBasis, and NL3D::CPSRotated3DPlaneParticle::_PlaneBasisScheme. +

+

00449 {       
+00450         delete _PlaneBasisScheme;               
+00451         _PlaneBasisScheme = NULL;       
+00452         _PlaneBasis = basis;
+00453 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSRotated3DPlaneParticle::setPlaneBasisScheme CPSAttribMaker< CPlaneBasis > *  basisMaker  )  [inherited]
+
+ + + + + +
+   + + +

+=================================================================================== +

+Set an attribute maker that produce a basis It must have been allocated by new It will be deleted by this object +

+Definition at line 439 of file ps_particle_basic.cpp. +

+References NL3D::CPSRotated3DPlaneParticle::_PlaneBasisScheme, NL3D::CPSRotated3DPlaneParticle::getPlaneBasisOwner(), nlassert, and NL3D::CPSAttribMaker< T >::resize(). +

+

00440 {
+00441         nlassert(basisMaker);
+00442         delete _PlaneBasisScheme;       
+00443         _PlaneBasisScheme = basisMaker;
+00444         if (getPlaneBasisOwner() && basisMaker->hasMemory()) basisMaker->resize(getPlaneBasisOwner()->getMaxSize(), getPlaneBasisOwner()->getSize());
+00445 }
+
+

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

+Set a shape by its index. +

+ +

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

+References _MeshShapeFileName, _ValidBuild, index, nlassert, and uint. +

+

01052 {
+01053         nlassert(index < _MeshShapeFileName.size());
+01054         _MeshShapeFileName[index] = shapeName;
+01055         _Touched = 1;
+01056         _ValidBuild = 0;
+01057 }
+
+

+ + + + +
+ + + + + + + + + + +
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 989 of file ps_mesh.cpp. +

+References _MeshShapeFileName, and _ValidBuild. +

+

00990 {               
+00991         _MeshShapeFileName.resize(1);   
+00992         _MeshShapeFileName[0] = meshFileName;
+00993         _Touched = 1;
+00994         _ValidBuild = 0;
+00995 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
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 1020 of file ps_mesh.cpp. +

+References _MeshShapeFileName, _ValidBuild, and uint. +

+

01021 {
+01022         _MeshShapeFileName.resize(numShapes);
+01023         std::copy(shapesNames, shapesNames + numShapes, _MeshShapeFileName.begin());
+01024         _Touched = 1;
+01025         _ValidBuild = 0;
+01026 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSSizedParticle::setSize float  size  )  [inherited]
+
+ + + + + +
+   + + +

+Set a constant size for the particles. +

+ +

+Definition at line 192 of file ps_particle_basic.cpp. +

+References NL3D::CPSSizedParticle::_ParticleSize, NL3D::CPSSizedParticle::_SizeScheme, and size. +

+

00193 {       
+00194         delete _SizeScheme;
+00195         _SizeScheme = NULL;     
+00196         _ParticleSize = size;
+00197 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSSizedParticle::setSizeScheme CPSAttribMaker< float > *  size  )  [inherited]
+
+ + + + + +
+   + + +

+Set an attribute maker that produce a size It must have been allocated by new It will be deleted by this object +

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

+References NL3D::CPSSizedParticle::_SizeScheme, NL3D::CPSSizedParticle::getSize(), NL3D::CPSSizedParticle::getSizeOwner(), nlassert, and size. +

+

00184 {       
+00185         nlassert(size != NULL);
+00186         delete _SizeScheme;     
+00187         _SizeScheme = size;
+00188         if (getSizeOwner() && size->hasMemory()) size->resize(getSizeOwner()->getMaxSize(), getSizeOwner()->getSize());
+00189 }
+
+

+ + + + +
+ + + + + + + + + + +
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 2205 of file ps_mesh.cpp. +

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

+

02206 {
+02207         nlassert(type < Last);
+02208         if (type == getTexAnimType()) return; // does the type of animation change ?
+02209         switch (type)
+02210         {
+02211                 case NoAnim:
+02212                         _GlobalTexAnims.reset();
+02213                         restoreMaterials();
+02214                         _GlobalAnimationEnabled = 0;
+02215                 break;
+02216                 case GlobalAnim:
+02217                 {
+02218                         PGlobalTexAnims newPtr(new CGlobalTexAnims);
+02219                         std::swap(_GlobalTexAnims, newPtr);                     
+02220                         _GlobalAnimationEnabled = 1;
+02221                 }
+02222                 break;
+02223                 default: break;
+02224         }
+02225 }
+
+

+ + + + +
+ + + + + + + + + + +
void NL3D::CPSLocatedBindable::setupDriverModelMatrix void   )  [inherited]
+
+ + + + + +
+   + + +

+shortcut to setup the model matrix (system basis or world basis) +

+ +

+Definition at line 2142 of file ps_located.cpp. +

+References nlassert, and NL3D::CPSLocated::setupDriverModelMatrix(). +

+Referenced by NL3D::CPSLocatedBindable::displayIcon2d(), NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CPSDot::draw(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CPSZoneRectangle::show(), NL3D::CPSZoneCylinder::show(), NL3D::CPSZoneDisc::show(), NL3D::CPSZoneSphere::show(), NL3D::CPSZonePlane::show(), NL3D::CPSCylindricVortex::show(), NL3D::CPSDirectionnalForce::show(), NL3D::CPSSphericalEmitter::showTool(), NL3D::CPSEmitterRectangle::showTool(), and NL3D::CPSEmitter::showTool(). +

+

02143 {
+02144         nlassert(_Owner);
+02145         _Owner->setupDriverModelMatrix();
+02146 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CPSConstraintMesh::setupMaterialColor CMaterial destMat,
CMaterial srcMat
[protected]
+
+ + + + + +
+   + + +

+Setup material so that global or per mesh color is taken in account. Useful if material hasn't been setup correctly in the export +

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

+References _ModulatedStages, NL3D::CMaterial::getShader(), NL3D::CMaterial::getTexEnvMode(), NL3D::IDRV_MAT_MAXTEXTURES, NL3D::CMaterial::isLighted(), NL3D::CMaterial::setColor(), NL3D::CMaterial::setDiffuse(), NL3D::CMaterial::setTexEnvMode(), NL3D::CMaterial::texEnvArg0Alpha(), NL3D::CMaterial::texEnvArg0RGB(), NL3D::CMaterial::texEnvArg1Alpha(), NL3D::CMaterial::texEnvArg1RGB(), NL3D::CMaterial::texEnvOpAlpha(), NL3D::CMaterial::texEnvOpRGB(), and uint. +

+Referenced by setupRenderPasses(). +

+

01697 {               
+01698         if (destMat.getShader() != CMaterial::Normal) return;
+01699         for (uint k = 0; k < IDRV_MAT_MAXTEXTURES; ++k)
+01700         {               
+01701                 if (_ModulatedStages & (1 << k))
+01702                 {                               
+01703                         destMat.texEnvArg0RGB(k, CMaterial::Texture, CMaterial::SrcColor);
+01704                         destMat.texEnvArg0Alpha(k, CMaterial::Texture, CMaterial::SrcAlpha);
+01705                         destMat.texEnvArg1RGB(k, CMaterial::Diffuse, CMaterial::SrcColor);
+01706                         destMat.texEnvArg1Alpha(k, CMaterial::Diffuse, CMaterial::SrcAlpha);
+01707                         destMat.texEnvOpRGB(k, CMaterial::Modulate);
+01708                         destMat.texEnvOpAlpha(k, CMaterial::Modulate);                  
+01709                 }
+01710                 else // restore from source material
+01711                 {
+01712                         destMat.setTexEnvMode(k, srcMat.getTexEnvMode(k));
+01713                 }
+01714         }
+01715         if (_ColorScheme == NULL) // per mesh color ?
+01716         {
+01717                 destMat.setColor(_Color);
+01718                 if (destMat.isLighted())
+01719                 {
+01720                         destMat.setDiffuse(_Color);
+01721                 }               
+01722         }
+01723 }
+
+

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

+Setup a set of rendering passes (set good textures matrix / material colors). +

+check wether this material has to be rendered

+force vertex lighting

+global texture animation +

+Force modulation for some stages & setup global color +

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

+References _GlobalAnimationEnabled, _GlobalTexAnims, _VertexColorLightingForced, NL3D::CMaterial::enableUserTexMat(), NL3D::CMaterial::getLightedVertexColor(), NL3D::CMaterial::getTexture(), NL3D::CMaterial::getZWrite(), NL3D::IDRV_MAT_MAXTEXTURES, NL3D::CMaterial::setLightedVertexColor(), setupMaterialColor(), NL3D::CMaterial::setUserTexMat(), TRdrPassSet, and uint. +

+Referenced by NL3D::CPSConstraintMeshHelper::drawMeshs(), and NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(). +

+

01730 {
+01731         // render meshs : we process each rendering pass
+01732         for (TRdrPassSet::iterator rdrPassIt = rdrPasses.begin();
+01733              rdrPassIt != rdrPasses.end(); ++rdrPassIt)
+01734         {
+01735 
+01736                 CMaterial &Mat = rdrPassIt->Mat;
+01737                 CMaterial &SourceMat = rdrPassIt->SourceMat;
+01738 
+01739 
+01741                 if ((opaque && Mat.getZWrite()) || (!opaque && ! Mat.getZWrite()))
+01742                 {               
+01743 
+01744         
+01745                         // has to setup material constant color ?
+01746                         // global color not supported for mesh
+01747                 /*      CParticleSystem &ps = *(_Owner->getOwner());
+01748                         if (!_ColorScheme) 
+01749                         {                                                               
+01750                                 NLMISC::CRGBA col;
+01751                                 col.modulateFromColor(SourceMat.getColor(), _Color);
+01752                                 if (ps.getColorAttenuationScheme() == NULL || ps.isUserColorUsed())
+01753                                 {
+01754                                         col.modulateFromColor(col, ps.getGlobalColor());
+01755                                 }
+01756                                 Mat.setColor(col);                              
+01757                         }
+01758                         else
+01759                         {                               
+01760                                 Mat.setColor(ps.getGlobalColor());
+01761                         }*/
+01762 
+01765                         setupMaterialColor(Mat, SourceMat);                                             
+01766 
+01768                         bool forceVertexcolorLighting;
+01769                         if (_ColorScheme != NULL)
+01770                         {                       
+01771                                 forceVertexcolorLighting = _VertexColorLightingForced != 0 ? true : SourceMat.getLightedVertexColor();
+01772                         }
+01773                         else
+01774                         {
+01775                                 forceVertexcolorLighting = false;
+01776                         }
+01777                         if (forceVertexcolorLighting != Mat.getLightedVertexColor()) // avoid to touch mat if not needed
+01778                         {
+01779                                 Mat.setLightedVertexColor(forceVertexcolorLighting);
+01780                         }
+01781 
+01783                         if (_GlobalAnimationEnabled != 0)
+01784                         {
+01785                                 for (uint k = 0; k < IDRV_MAT_MAXTEXTURES; ++k)
+01786                                 {
+01787                                         if (Mat.getTexture(k) != NULL)
+01788                                         {
+01789                                                 Mat.enableUserTexMat(k, true);
+01790                                                 CMatrix mat;
+01791                                                 _GlobalTexAnims->Anims[k].buildMatrix(date, mat);
+01792                                                 Mat.setUserTexMat(k ,mat);
+01793                                         }
+01794                                 }
+01795                         }               
+01796                 }                       
+01797         }
+01798 
+01799 }
+
+

+ + + + +
+ + + + + + + + + + +
virtual void NL3D::CPSConstraintMesh::setZBias float  value  )  [inline, virtual]
+
+ + + + + +
+   + + +

+ +

+Implements NL3D::CPSParticle. +

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

+References value. +

+

00379 {}
+
+

+ + + + +
+ + + + + + + + + +
void NL3D::CPSParticle::showTool  )  [virtual, inherited]
+
+ + + + + +
+   + + +

+draw the particles for edition mode. The default behaviour just draw a wireframe model +

+ +

+Definition at line 55 of file ps_particle_basic.cpp. +

+References NL3D::CPSLocatedBindable::displayIcon2d(), PARTICLES_CHECK_MEM, and uint. +

+Referenced by NL3D::CPSParticle::step(), step(), NL3D::CPSMesh::step(), and NL3D::CPSFace::step(). +

+

00056 {
+00057         PARTICLES_CHECK_MEM;
+00058 
+00059         CVector I = CVector::I;
+00060         CVector J = CVector::J;
+00061 
+00062         const CVector tab[] = { 2 * J, I + J
+00063                                                         , I + J, 2 * I + J
+00064                                                         , 2 * I + J, I
+00065                                                         , I,  2 * I - J
+00066                                                         , 2 * I - J, - .5f * J
+00067                                                         , - .5f * J, -2 * I - J
+00068                                                         , -2 * I - J, - I
+00069                                                         , - I, -2 * I + J
+00070                                                         , -2 * I + J, - I + J
+00071                                                         , - I + J, 2 * J
+00072                                                 };
+00073         const uint tabSize = sizeof(tab) / (2 * sizeof(CVector));
+00074 
+00075         const float sSize = 0.1f;
+00076         displayIcon2d(tab, tabSize, sSize);
+00077 
+00078         PARTICLES_CHECK_MEM;
+00079 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
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 1614 of file ps_mesh.cpp. +

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

+

01615 {
+01616                 if (
+01617                         (pass == PSBlendRender && hasTransparentFaces())
+01618                         || (pass == PSSolidRender && hasOpaqueFaces())
+01619                         )
+01620                 {
+01621                         draw(pass == PSSolidRender, ellapsedTime);
+01622                 }
+01623                 else 
+01624                 if (pass == PSToolRender) // edition mode only
+01625                 {                       
+01626                         showTool();
+01627                 }
+01628 }
+
+

+ + + + +
+ + + + + + + + + +
virtual bool NL3D::CPSConstraintMesh::supportGlobalColorLighting  )  const [inline, virtual]
+
+ + + + + +
+   + + +

+ +

+Implements NL3D::CPSParticle. +

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

+

00376 { return false; }
+
+

+ + + + +
+ + + + + + + + + +
virtual void NL3D::CPSLocatedBindable::systemDateChanged  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+PRIVATE USE : called by the system when its date has been manually changed. This his usually for object that expect time to be always increasing, so that they can reset their datas +

+Reimplemented in NL3D::CPSRibbonBase. +

+Definition at line 1038 of file ps_located.h. +

+

01038 {}
+
+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CPSConstraintMesh::update std::vector< sint > *  numVerts = NULL  )  [protected]
+
+ + + + + +
+   + + +

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

Parameters:
+ + +
numVerts,if not NULL, the dest vector will be filled with the number of vertices of each mesh (or a TError enumerated value if loading failed)
+
+
Returns:
true if the mesh could be found and match the requirement
+ +

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

+References _GlobalAnimDate, _HasLightableFaces, _HasOpaqueFaces, _HasTransparentFaces, _Meshes, _MeshShapeFileName, _ModelBank, _NumFaces, _ValidBuild, NL3D::CShapeBank::addRef(), NL3D::CheckForLightableFacesInMesh(), NL3D::CheckForOpaqueAndTransparentFacesInMesh(), clean(), NL3D::ConstraintMeshMaxNumVerts, NL3D::DummyShapeName(), NL3D::GetDummyMeshFromBank(), NL3D::getMeshNumTri(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CParticleSystemProcess::getOwner(), NL3D::CPSLocated::getScene(), NL3D::CScene::getShapeBank(), NL3D::CParticleSystem::getSystemDate(), NL3D::CMesh::getVertexBuffer(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CShapeBank::isPresent(), NL3D::CShapeBank::load(), nlassert, nlwarning, NL3D::CPSParticle::notifyOwnerMaxNumFacesChanged(), NL3D::CShapeBank::release(), releaseShapes(), ShapeFileIsNotAMesh, ShapeFileNotLoaded, ShapeHasTooMuchVertices, sint, uint, uint32, and uint8. +

+Referenced by draw(), getShapeNumVerts(), hasLightableFaces(), hasOpaqueFaces(), hasTransparentFaces(), and restoreMaterials(). +

+

01135 {               
+01136         bool ok = true;
+01137         if (!_Touched) return ok;       
+01138         
+01139         clean();
+01140         
+01141         nlassert(_Owner->getScene());
+01142 
+01143         CScene *scene = _Owner->getScene();
+01144         _ModelBank = scene->getShapeBank();
+01145         IShape *is;
+01146 
+01147 
+01148         uint32 vFormat = 0;
+01149         uint   numVerts = 0;    
+01150         uint8  uvRouting[CVertexBuffer::MaxStage];
+01151 
+01152         if (_MeshShapeFileName.size() == 0)
+01153         {
+01154                 _MeshShapeFileName.resize(1);
+01155                 _MeshShapeFileName[0] = DummyShapeName;         
+01156         }
+01157         
+01158 
+01159         _Meshes.resize(_MeshShapeFileName.size());      
+01160         if (numVertsVect) numVertsVect->resize(_MeshShapeFileName.size());
+01161         for (uint k = 0; k < _MeshShapeFileName.size(); ++k)
+01162         {
+01163                 if (_ModelBank->isPresent(_MeshShapeFileName[k]) == CShapeBank::Present)
+01164                 {
+01165                         CMesh *mesh = dynamic_cast<CMesh *>( _ModelBank->addRef(_MeshShapeFileName[k]));
+01166                         if (!mesh)
+01167                         {
+01168                                 nlwarning("Tried to bind a shape that is not a mesh to a mesh particle : %s", _MeshShapeFileName[k].c_str());
+01169                                 _ModelBank->release(is);                                        
+01170                                 ok = false;
+01171                                 if (numVertsVect) (*numVertsVect)[k] = ShapeFileIsNotAMesh;     
+01172                         }
+01173                         else
+01174                         {                       
+01175                                 _Meshes[k] = mesh;
+01177                                 if (k == 0)
+01178                                 {                       
+01179                                         vFormat = mesh->getVertexBuffer().getVertexFormat();
+01180                                         numVerts =  mesh->getVertexBuffer().getNumVertices();                           
+01181                                         std::copy(mesh->getVertexBuffer().getUVRouting(), mesh->getVertexBuffer().getUVRouting() + CVertexBuffer::MaxStage, uvRouting);
+01182                                         if (numVertsVect) (*numVertsVect)[k] = (sint) numVerts;
+01183                                 }
+01184                                 else
+01185                                 {
+01186                                         if (vFormat != mesh->getVertexBuffer().getVertexFormat())
+01187                                         {
+01188                                                 nlwarning("Vertex format differs between meshs");
+01189                                                 ok = false;
+01190                                         }
+01191                                         if (numVerts != mesh->getVertexBuffer().getNumVertices())
+01192                                         {
+01193                                                 nlwarning("Num vertices differs between meshs");
+01194                                                 ok = false;
+01195                                         }
+01196                                         if (!std::equal(mesh->getVertexBuffer().getUVRouting(), mesh->getVertexBuffer().getUVRouting() + CVertexBuffer::MaxStage, uvRouting))
+01197                                         {
+01198                                                 nlwarning("UV routing differs between meshs");
+01199                                                 ok = false;
+01200                                         }                                                               
+01201                                         if (numVertsVect) (*numVertsVect)[k] = (sint) mesh->getVertexBuffer().getNumVertices();
+01202                                 }
+01203                         }
+01204                 }
+01205                 else
+01206                 {
+01207                         try
+01208                         {
+01209                                 _ModelBank->load(_MeshShapeFileName[k]);
+01210                         }       
+01211                         catch (NLMISC::EPathNotFound &)
+01212                         {
+01213                                 nlwarning("mesh not found : %s; used as a constraint mesh particle", _MeshShapeFileName[k].c_str());
+01214                                 // shape not found, so not present in the shape bank -> we create a dummy shape
+01215                         }
+01216 
+01217                         if (_ModelBank->isPresent(_MeshShapeFileName[k]) != CShapeBank::Present)
+01218                         {                                       
+01219                                 ok = false;
+01220                                 if (numVertsVect) (*numVertsVect)[k] = ShapeFileNotLoaded;
+01221                         }
+01222                         else
+01223                         {
+01224                                 is = _ModelBank->addRef(_MeshShapeFileName[k]);
+01225                                 if (!dynamic_cast<CMesh *>(is)) // is it a mesh
+01226                                 {
+01227                                         nlwarning("Tried to bind a shape that is not a mesh to a mesh particle : %s", _MeshShapeFileName[k].c_str());
+01228                                         _ModelBank->release(is);                                        
+01229                                         ok = false;
+01230                                         if (numVertsVect) (*numVertsVect)[k] = ShapeFileIsNotAMesh;
+01231                                 }
+01232                                 else
+01233                                 {
+01234                                         CMesh &m  = * NLMISC::safe_cast<CMesh *>(is);
+01236                                         if (m.getVertexBuffer().getNumVertices() > ConstraintMeshMaxNumVerts)
+01237                                         {
+01238                                                 nlwarning("Tried to bind a mesh that has more than %d vertices to a particle mesh: %s", (int) ConstraintMeshMaxNumVerts, _MeshShapeFileName[k].c_str());
+01239                                                 _ModelBank->release(is);                                                
+01240                                                 ok = false;
+01241                                                 if (numVertsVect) (*numVertsVect)[k] = ShapeHasTooMuchVertices;
+01242                                         }
+01243                                         else
+01244                                         {
+01245                                                 _Meshes[k] = &m;                                                
+01246                                                 if (k == 0)
+01247                                                 {                       
+01248                                                         vFormat = m.getVertexBuffer().getVertexFormat();
+01249                                                         numVerts =  m.getVertexBuffer().getNumVertices();
+01250                                                         std::copy(m.getVertexBuffer().getUVRouting(), m.getVertexBuffer().getUVRouting() + CVertexBuffer::MaxStage, uvRouting);
+01251                                                         if (numVertsVect) (*numVertsVect)[k] = numVerts;
+01252                                                 }
+01253                                                 else
+01254                                                 {
+01255                                                         uint32 otherVFormat = m.getVertexBuffer().getVertexFormat();
+01256                                                         uint   otherNumVerts = m.getVertexBuffer().getNumVertices();
+01257                                                         if (otherVFormat != vFormat || 
+01258                                                                 otherNumVerts != numVerts ||
+01259                                                             !(std::equal(m.getVertexBuffer().getUVRouting(), m.getVertexBuffer().getUVRouting() + CVertexBuffer::MaxStage, uvRouting)))
+01260                                                         {
+01261                                                                 ok = false;
+01262                                                         }
+01263                                                         if (numVertsVect) (*numVertsVect)[k] = otherNumVerts;
+01264                                                 }
+01265                                         }
+01266                                 }
+01267                         }
+01268                 }
+01269                 
+01270                 if (!ok)
+01271                 {
+01272                         releaseShapes();
+01273                         _Meshes.resize(1);
+01274                         _Meshes[0] = GetDummyMeshFromBank(*_ModelBank);
+01275                         if (!numVertsVect) break;
+01276                 }
+01277         }
+01278 
+01279 
+01280         const CMesh &m  = *_Meshes[0];
+01281 
+01283         _NumFaces = getMeshNumTri(m);
+01284         notifyOwnerMaxNumFacesChanged();
+01285         
+01287         bool hasTransparentFaces, hasOpaqueFaces;
+01288         CheckForOpaqueAndTransparentFacesInMesh(m, hasTransparentFaces, hasOpaqueFaces);
+01289         _HasTransparentFaces = hasTransparentFaces;     
+01290         _HasOpaqueFaces = hasOpaqueFaces;
+01291         _HasLightableFaces = CheckForLightableFacesInMesh(m);           
+01292         _GlobalAnimDate = _Owner->getOwner()->getSystemDate();
+01293         _Touched = 0;
+01294         _ValidBuild = ok ? 1 : 0;
+01295         nlassert(_Meshes.size() > 0);           
+01296 
+01297         return ok;
+01298         
+01299 }
+
+

+ + + + +
+ + + + + + + + + + +
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 1904 of file ps_mesh.cpp. +

+

01905 {
+01906         // nothing to do for us...
+01907 }
+
+

+ + + + +
+ + + + + + + + + +
bool NL3D::CPSParticle::usesGlobalColorLighting  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Returns true if the object can use global lighting color. (example : 'lookat' particle do not have normals, so they use global lighting color instead +

+Definition at line 103 of file ps_particle_basic.h. +

+References NL3D::CPSParticle::_UsesGlobalColorLighting. +

+Referenced by NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CPSShockWave::draw(), NL3D::CPSDot::draw(), NL3D::CPSTailDot::setupGlobalColor(), NL3D::CPSFanLight::setupMaterial(), NL3D::CPSRibbon::setupTexturedGlobalColor(), NL3D::CPSRibbon::setupUntexturedGlobalColor(), NL3D::CPSTailDot::step(), NL3D::CPSRibbonLookAt::step(), NL3D::CPSRibbon::step(), NL3D::CPSQuad::updateMatBeforeRendering(), NL3D::CPSTailDot::updateMaterial(), NL3D::CPSRibbon::updateTexturedMaterial(), and NL3D::CPSRibbon::updateUntexturedMaterial(). +

+

00103 { return _UsesGlobalColorLighting; }
+
+


Friends And Related Function Documentation

+

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

+ +

+Definition at line 505 of file ps_mesh.h.

+

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

+ +

+Definition at line 382 of file ps_mesh.h.

+

+ + + + +
+ + +
friend class CPSLocated [friend, inherited] +
+
+ + + + + +
+   + + +

+ +

+Reimplemented in NL3D::CPSForce. +

+Definition at line 986 of file ps_located.h.

+


Field Documentation

+

+ + + + +
+ + +
bool NL3D::CPSLocatedBindable::_Active [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1033 of file ps_located.h. +

+Referenced by NL3D::CPSLocatedBindable::isActive(), and NL3D::CPSLocatedBindable::setActive().

+

+ + + + +
+ + +
CRGBA NL3D::CPSColoredParticle::_Color [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 226 of file ps_particle_basic.h.

+

+ + + + +
+ + +
CPSAttribMaker<CRGBA>* NL3D::CPSColoredParticle::_ColorScheme [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 228 of file ps_particle_basic.h. +

+Referenced by NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSConstraintMeshHelper::drawMeshs(), and NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs().

+

+ + + + +
+ + +
uint32 NL3D::CPSLocatedBindable::_ExternID [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1027 of file ps_located.h. +

+Referenced by NL3D::CPSLocatedBindable::getExternID(), NL3D::CPSLocatedBindable::setExternID(), and NL3D::CPSLocatedBindable::~CPSLocatedBindable().

+

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

+ +

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

+Referenced by getGlobalTexAnim(), getTexAnimType(), newElement(), setGlobalTexAnim(), setTexAnimType(), and setupRenderPasses().

+

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

+ +

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

+Referenced by NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), newElement(), and update().

+

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

+ +

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

+Referenced by getGlobalTexAnim(), setGlobalTexAnim(), setTexAnimType(), and setupRenderPasses().

+

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

+ +

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

+Referenced by hasLightableFaces(), and update().

+

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

+ +

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

+Referenced by hasOpaqueFaces(), and update().

+

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

+ +

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

+Referenced by hasTransparentFaces(), and update().

+

+ + + + +
+ + +
CPSVector<uint32>::V NL3D::CPSConstraintMesh::_IndexInPrecompBasis [protected] +
+
+ + + + + +
+   + + +

+this contain an index in _PrecompBasis for each particle +

+ +

+Definition at line 533 of file ps_mesh.h.

+

+ + + + +
+ + +
TPSLod NL3D::CPSLocatedBindable::_LOD [protected, inherited] +
+
+ + + + + +
+   + + +

+tells when this object must be dealt with +

+ +

+Definition at line 1029 of file ps_located.h. +

+Referenced by NL3D::CPSLocatedBindable::getLOD(), and NL3D::CPSLocatedBindable::setLOD().

+

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

+ +

+Definition at line 518 of file ps_mesh.h.

+

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

+manage vertex buffers and primitive blocks used for rendering +

+ +

+Referenced by NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), and restoreMaterials().

+

+ + + + +
+ + +
TMeshVect NL3D::CPSConstraintMesh::_Meshes [protected] +
+
+ + + + + +
+   + + +

+ +

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

+Referenced by NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), releaseShapes(), restoreMaterials(), and update().

+

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

+ +

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

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

+

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

+ +

+Definition at line 517 of file ps_mesh.h.

+

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

+ +

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

+Referenced by clean(), releaseShapes(), and update().

+

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

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

+ +

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

+Referenced by forceStageModulationByColor(), isStageModulationForced(), and setupMaterialColor().

+

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

+ +

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

+Referenced by deleteElement(), NL3D::CPSConstraintMeshHelper::drawMeshs(), getMorphScheme(), newElement(), resize(), setMorphScheme(), setMorphValue(), and ~CPSConstraintMesh().

+

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

+ +

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

+Referenced by NL3D::CPSConstraintMeshHelper::drawMeshs(), getMorphValue(), and setMorphValue().

+

+ + + + +
+ + +
std::string NL3D::CPSLocatedBindable::_Name [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1031 of file ps_located.h.

+

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

+ +

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

+Referenced by getMaxNumFaces(), and update().

+

+ + + + +
+ + +
CPSLocated* NL3D::CPSLocatedBindable::_Owner [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1026 of file ps_located.h. +

+Referenced by NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), and NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs().

+

+ + + + +
+ + +
float NL3D::CPSSizedParticle::_ParticleSize [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 289 of file ps_particle_basic.h. +

+Referenced by NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CPSSizedParticle::getSize(), and NL3D::CPSSizedParticle::setSize().

+

+ + + + +
+ + +
CPlaneBasis NL3D::CPSRotated3DPlaneParticle::_PlaneBasis [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 697 of file ps_particle_basic.h. +

+Referenced by NL3D::CPSRotated3DPlaneParticle::CPSRotated3DPlaneParticle(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSRotated3DPlaneParticle::getPlaneBasis(), and NL3D::CPSRotated3DPlaneParticle::setPlaneBasis().

+

+ + + + +
+ + +
CPSAttribMaker<CPlaneBasis>* NL3D::CPSRotated3DPlaneParticle::_PlaneBasisScheme [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 695 of file ps_particle_basic.h. +

+Referenced by NL3D::CPSRotated3DPlaneParticle::deletePlaneBasisElement(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSRotated3DPlaneParticle::getPlaneBasisScheme(), NL3D::CPSRotated3DPlaneParticle::newPlaneBasisElement(), NL3D::CPSRotated3DPlaneParticle::resizePlaneBasis(), NL3D::CPSRotated3DPlaneParticle::setPlaneBasis(), NL3D::CPSRotated3DPlaneParticle::setPlaneBasisScheme(), and NL3D::CPSRotated3DPlaneParticle::~CPSRotated3DPlaneParticle().

+

+ + + + +
+ + +
CPSVector<CPlaneBasisPair>::V 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 530 of file ps_mesh.h.

+

+ + + + +
+ + +
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 560 of file ps_mesh.h. +

+Referenced by forceGlobalAnimTimeResetOnNewElement(), isGlobalAnimTimeResetOnNewElementForced(), and newElement().

+

+ + + + +
+ + +
CPSAttribMaker<float>* NL3D::CPSSizedParticle::_SizeScheme [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 290 of file ps_particle_basic.h. +

+Referenced by NL3D::CPSSizedParticle::deleteSizeElement(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CPSSizedParticle::getSizeScheme(), NL3D::CPSSizedParticle::newSizeElement(), NL3D::CPSSizedParticle::resizeSize(), NL3D::CPSSizedParticle::setSize(), NL3D::CPSSizedParticle::setSizeScheme(), and NL3D::CPSSizedParticle::~CPSSizedParticle().

+

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

+ +

+Definition at line 553 of file ps_mesh.h.

+

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

+ +

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

+Referenced by isValidBuild(), setShape(), setShapes(), and update().

+

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

+ +

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

+Referenced by forceVertexColorLighting(), isVertexColorLightingForced(), and setupRenderPasses().

+


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