# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CPSParticle Class Reference

This is the base class for all particles. More...

#include <ps_particle_basic.h>

Inheritance diagram for NL3D::CPSParticle:

NL3D::CPSLocatedBindable NLMISC::IStreamable NLMISC::IClassable NL3D::CPSConstraintMesh NL3D::CPSDot NL3D::CPSFanLight NL3D::CPSMesh NL3D::CPSQuad NL3D::CPSRibbonBase NL3D::CPSShockWave NL3D::CPSFace NL3D::CPSFaceLookAt NL3D::CPSRibbon NL3D::CPSRibbonLookAt NL3D::CPSTailDot List of all members.

Public Methods

 CPSParticle ()
 Constructor. More...

uint32 getType (void) const
 return this bindable type. More...

virtual uint32 getPriority (void) const
 return priority. More...

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

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

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

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

virtual void draw (bool opaque)
 derivers draw the particles here. More...

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

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

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

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

bool isAutoLODDisabled () const
 Test wether Auto-LOD is disabled. More...


Protected Methods

void notifyOwnerMaxNumFacesChanged (void) const
 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. More...

virtual void newElement (CPSLocated *emitterLocated, uint32 emitterIndex)=0
 Generate a new element for this bindable. More...

virtual void deleteElement (uint32 index)=0
 Delete an element given its index Attributes of the located that hold this bindable are still accessible for the index given index out of range -> nl_assert. More...

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

void computeSrcStep (uint32 &step, uint &numToProcess)
 System may have hand-tuned LOD, or auto LOD. More...


Private Attributes

bool _DisableAutoLOD
 Disable Auto-LOD flag. More...


Detailed Description

This is the base class for all particles.

A deriver must provide a drawing method for his particle. Not sharable accross systems.

Author:
Nicolas Vizerie , Nevrax France
Date:
2001

Definition at line 54 of file ps_particle_basic.h.


Constructor & Destructor Documentation

NL3D::CPSParticle::CPSParticle  
 

Constructor.

Definition at line 48 of file ps_particle_basic.cpp.


Member Function Documentation

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

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 81 of file ps_particle_basic.cpp.

References _DisableAutoLOD, NL3D::CPSLocatedBindable::_Owner, NLMISC::clamp, nlassert, r, and step.

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

virtual void NL3D::CPSParticle::deleteElement uint32    index [protected, pure virtual]
 

Delete an element given its index Attributes of the located that hold this bindable are still accessible for the index given index out of range -> nl_assert.

Implements NL3D::CPSLocatedBindable.

Implemented in NL3D::CPSDot.

void NL3D::CPSParticle::disableAutoLOD bool    disable = true [inline]
 

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

Definition at line 118 of file ps_particle_basic.h.

References _DisableAutoLOD.

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

derivers draw the particles here.

Reimplemented in NL3D::CPSDot.

Definition at line 96 of file ps_particle_basic.h.

Referenced by step.

virtual uint32 NL3D::CPSParticle::getMaxNumFaces void    const [pure virtual]
 

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

Implemented in NL3D::CPSDot.

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

return priority.

Implements NL3D::CPSLocatedBindable.

Definition at line 65 of file ps_particle_basic.h.

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

return this bindable type.

Implements NL3D::CPSLocatedBindable.

Definition at line 62 of file ps_particle_basic.h.

References NL3D::PSParticle.

virtual bool NL3D::CPSParticle::hasOpaqueFaces void    [pure virtual]
 

return true if there are Opaque faces in the object.

Implemented in NL3D::CPSDot.

Referenced by step.

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

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

Reimplemented from NL3D::CPSLocatedBindable.

Definition at line 68 of file ps_particle_basic.h.

References NL3D::CPSLocatedBindable::_Owner, and nlassert.

virtual bool NL3D::CPSParticle::hasTransparentFaces void    [pure virtual]
 

return true if there are transparent faces in the object.

Implemented in NL3D::CPSDot.

Referenced by step.

bool NL3D::CPSParticle::isAutoLODDisabled   const [inline]
 

Test wether Auto-LOD is disabled.

Definition at line 121 of file ps_particle_basic.h.

References _DisableAutoLOD.

virtual void NL3D::CPSParticle::newElement CPSLocated   emitterLocated,
uint32    emitterIndex
[protected, pure virtual]
 

Generate a new element for this bindable.

They are generated according to the properties of the class

Implements NL3D::CPSLocatedBindable.

Implemented in NL3D::CPSDot.

void NL3D::CPSParticle::notifyOwnerMaxNumFacesChanged void    const [inline, protected]
 

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 129 of file ps_particle_basic.h.

References NL3D::CPSLocatedBindable::_Owner.

Referenced by NL3D::CPSFanLight::setNbFans, NL3D::CPSShockWave::setNbSegs, and NL3D::CPSConstraintMesh::update.

virtual void NL3D::CPSParticle::resize uint32    size [protected, pure 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::CPSLocatedBindable.

Implemented in NL3D::CPSDot.

virtual void NL3D::CPSParticle::serial NLMISC::IStream   f throw (NLMISC::EStream) [inline, virtual]
 

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

Reimplemented from NL3D::CPSLocatedBindable.

Reimplemented in NL3D::CPSDot.

Definition at line 105 of file ps_particle_basic.h.

References _DisableAutoLOD.

void NL3D::CPSParticle::showTool   [virtual]
 

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

Definition at line 54 of file ps_particle_basic.cpp.

References NL3D::CPSLocatedBindable::displayIcon2d.

Referenced by step, NL3D::CPSConstraintMesh::step, NL3D::CPSMesh::step, and NL3D::CPSFace::step.

virtual void NL3D::CPSParticle::step TPSProcessPass    pass,
TAnimationTime    ellapsedTime,
TAnimationTime    realEt
[inline, virtual]
 

process one pass for the particles.

The default behaviour shows the particles

Implements NL3D::CPSLocatedBindable.

Reimplemented in NL3D::CPSFace.

Definition at line 73 of file ps_particle_basic.h.

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

Referenced by computeSrcStep, NL3D::CPSShockWave::draw, NL3D::CPSFanLight::draw, NL3D::CPSFaceLookAt::draw, and NL3D::CPSDot::draw.


Member Data Documentation

bool NL3D::CPSParticle::_DisableAutoLOD [private]
 

Disable Auto-LOD flag.

Definition at line 161 of file ps_particle_basic.h.

Referenced by computeSrcStep, disableAutoLOD, isAutoLODDisabled, and serial.


The documentation for this class was generated from the following files: