|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CParticleSystem Class ReferenceThis class holds a particle system.
More...
#include <particle_system.h>
Inheritance diagram for NL3D::CParticleSystem:
List of all members.
Invalidity flags (no direct effect, just indications for a third party, a model holding the system for example) |
enum | TDieCondition { none,
noMoreParticles,
noMoreParticlesAndEmitters
} |
| this enum give consitions on which the system may be invalid. More...
|
enum | TAnimType { AnimVisible = 0,
AnimInCluster,
AnimAlways,
LastValue
} |
| This enum tells when animation must be performed. More...
|
enum | TPresetBehaviour {
EnvironmentFX = 0,
RunningEnvironmentFX,
SpellFX,
LoopingSpellFX,
MinorFX,
UserBehaviour,
PresetLast
} |
| Because choosing the previous parameters can be difficult, this define presets hat can be used to tune the system easily. More...
|
void | setDestroyModelWhenOutOfRange (bool enable=true) |
| Tell the system that it is invalid when its out of range. More...
|
bool | getDestroyModelWhenOutOfRange (void) const |
| check whether the system is invalid it's out of range. More...
|
void | setDestroyCondition (TDieCondition dieCondition) |
| when != to none, the Model hodling this sytem will be considered invalid when dieCondition is met This is only an indication flag and must be checked by third party (a model holding it for example) that must then use the right methods. More...
|
TDieCondition | getDestroyCondition (void) const |
| get the destroy condition. More...
|
void | setDelayBeforeDeathConditionTest (TAnimationTime delay) |
| Set a delay before to apply the death condition test This may be necessary : the system could be destroyed because there are no particles , but no particles were emitted yet This is an indication, and has no direct effect, and must be check by a third party (a model holding it for example). More...
|
TAnimationTime | getDelayBeforeDeathConditionTest (void) const |
| get the a delay before to apply the death condition test. More...
|
void | destroyWhenOutOfFrustum (bool enable=true) |
| tells the model holding this system that he become invalid when its out of the view frustum. More...
|
bool | doesDestroyWhenOutOfFrustum (void) const |
| check wether the system must be destroyed when it goes out of the frustum. More...
|
bool | hasEmitters (void) const |
| =======================================================================================. More...
|
bool | hasParticles (void) const |
| =======================================================================================. More...
|
void | performMotionWhenOutOfFrustum (bool enable=true) |
| Deprecated. More...
|
bool | doesPerformMotionWhenOutOfFrustum (void) const |
| Deprecated. More...
|
void | setAnimType (TAnimType animType) |
| Tells when animation must be done. More...
|
TAnimType | getAnimType () const |
| Test what the animation type is. More...
|
void | activatePresetBehaviour (TPresetBehaviour behaviour) |
| =======================================================================================. More...
|
TPresetBehaviour | getBehaviourType () const |
User parameters. They may be or not used by the system. Theyr meaning is defined during the construction |
of the system
|
void | setUserParam (uint userParamIndex, float value) |
| Set the value of a user parameter. More...
|
float | getUserParam (uint userParamIndex) const |
| Get a user param. More...
|
void | bindGlobalValueToUserParam (const std::string &globalValueName, uint userParamIndex) |
| =======================================================================================. More...
|
std::string | getGlobalValueName (uint userParamIndex) const |
| =======================================================================================. More...
|
void | setGlobalValue (const std::string &name, float value) |
| =======================================================================================. More...
|
float | getGlobalValue (const std::string &name) |
| =======================================================================================. More...
|
void | setGlobalVectorValue (const std::string &name, const NLMISC::CVector &value) |
| =======================================================================================. More...
|
NLMISC::CVector | getGlobalVectorValue (const std::string &name) |
| =======================================================================================. More...
|
CGlobalVectorValueHandle | getGlobalVectorValueHandle (const std::string &name) |
| =======================================================================================. More...
|
sound managment |
void | stopSound () |
| ======================================================================================= immediatly shut down all the sound in this system. More...
|
void | reactivateSound () |
| =======================================================================================. More...
|
void | registerSoundServer (UPSSoundServer *soundServer) |
| register a Sound server to this system. All systems share the same sound server. More...
|
UPSSoundServer * | getSoundServer (void) |
| get the current sound server used by this system. NULL if none. More...
|
Public Types |
enum | TPass { Anim,
SolidRender,
BlendRender,
ToolRender
} |
Public Methods |
void | setName (const std::string &s) |
| Set the name of the system. More...
|
std::string | getName (void) const |
| Get the name of the system. More...
|
void | interpolatePosDelta (NLMISC::CVector &dest, TAnimationTime deltaT) |
| =======================================================================================. More...
|
|
| CParticleSystem () |
| ctor. More...
|
virtual | ~CParticleSystem () |
| ======================================================================================= dtor. More...
|
void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| =======================================================================================. More...
|
void | merge (CParticleSystemShape *toMerge) |
| =======================================================================================. More...
|
|
void | enableSharing (bool enabled=true) |
| Enable/Disable sharing. More...
|
bool | isSharingEnabled () const |
| Test wether sharing is enabled. More...
|
|
void | setDriver (IDriver *driver) |
| set the driver use to render the system. More...
|
IDriver * | getDriver (void) |
| return the driver that will be used for rendering. More...
|
|
void | setScene (CScene *scene) |
| Set the scene in which the particle system is inserted. More...
|
CScene * | getScene (void) |
|
void | setSysMat (const NLMISC::CMatrix &m) |
| =======================================================================================. More...
|
const NLMISC::CMatrix & | getSysMat (void) const |
| return the matrix of the system. More...
|
const NLMISC::CMatrix & | getOldSysMat (void) const |
| return the previous matrix of the system. More...
|
const NLMISC::CMatrix & | getInvertedSysMat (void) const |
| return the inverted matrix of the system. More...
|
void | setViewMat (const NLMISC::CMatrix &m) |
| =======================================================================================. More...
|
const NLMISC::CMatrix & | getViewMat (void) const |
| get the view matrix . More...
|
const NLMISC::CMatrix & | getInvertedViewMat (void) const |
| get the inverted view matrix . It is stored each time a new frame is processed. More...
|
|
virtual void | step (TPass pass, TAnimationTime ellapsedTime) |
| =======================================================================================. More...
|
|
in space
|
void | attach (CParticleSystemProcess *process) |
| =======================================================================================. More...
|
CParticleSystemProcess * | detach (uint index) |
| =======================================================================================. More...
|
bool | isProcess (CParticleSystemProcess *process) const |
| =======================================================================================. More...
|
uint | getIndexOf (const CParticleSystemProcess *process) const |
| =======================================================================================. More...
|
void | remove (CParticleSystemProcess *process) |
| =======================================================================================. More...
|
uint32 | getNbProcess (void) const |
| get the number of process that are attached to the system. More...
|
CParticleSystemProcess * | getProcess (uint32 index) |
| Get a pointer to the nth process. More...
|
const CParticleSystemProcess * | getProcess (uint32 index) const |
| Get a const pointer to the nth process. More...
|
|
TAnimationTime | getSystemDate (void) const |
| get the time ellapsed since the system was created. More...
|
uint64 | getDate (void) const |
| Get the date of the system (the number of time it has been drawn in fact) This may be used to skip frames in an animation for example. More...
|
|
void | setCurrentEditedElement (CPSLocated *loc=NULL, uint32 index=0, class CPSLocatedBindable *bd=NULL) |
| For edition purposes only : this allow to highlight in red the current element being edited. More...
|
void | getCurrentEditedElement (CPSLocated *&loc, uint32 &index, CPSLocatedBindable *&lb) |
| Retrieve the current edited element. More...
|
void | setFontGenerator (CFontGenerator *fg) |
| Set a font generator. Useful only for edition. don't need that in runtime. More...
|
CFontGenerator * | getFontGenerator (void) |
| Retrieve the font generator. Edition purpose only. More...
|
const CFontGenerator * | getFontGenerator (void) const |
| Retrieve the font generator (const version). Edition purpose only. More...
|
void | setFontManager (CFontManager *fg) |
| Set a font Manager. Useful only for edition. don't need that in runtime. More...
|
CFontManager * | getFontManager (void) |
| Retrieve the font Manager. Edition purpose only. More...
|
const CFontManager * | getFontManager (void) const |
| Retrieve the font Manager (const version). Edition purpose only. More...
|
|
bool | hasOpaqueObjects (void) const |
| =======================================================================================. More...
|
bool | hasTransparentObjects (void) const |
| =======================================================================================. More...
|
|
void | enableAccurateIntegration (bool enable=true) |
| This enable for more accurate integrations of movement. More...
|
bool | isAccurateIntegrationEnabled (void) const |
void | setAccurateIntegrationParams (TAnimationTime threshold, uint32 maxNbIntegrations, bool canSlowDown, bool keepEllapsedTimeForLifeUpdate) |
| the the time threshold and the max number of integration to perform, when accurate integration is activated. More...
|
void | getAccurateIntegrationParams (TAnimationTime &threshold, uint32 &maxNbIntegrations, bool &canSlowDown, bool &keepEllapsedTimeForLifeUpdate) |
| get the parameters used for integration. More...
|
|
Hand tuned LOD (for emission, color, size : this uses LOD as an input for attribute makers).
- * - Auto LOD : Results are less good than with Hand- tuned LOD, but this may be needed when sharing is enabled. NB : auto-lod may not be supported by all kinds of particles.
|
void | setMaxViewDist (float maxDist) |
| set the max view distance for the system (in meters) . The default is 50 meters. More...
|
float | getMaxViewDist (void) const |
| get the max view distance. More...
|
void | setLODRatio (float ratio) |
| set a percentage that indicate where the 2nd LOD is located. Default is 0.5. More...
|
float | getLODRatio (void) const |
| get the lod ratio. More...
|
void | getLODVect (NLMISC::CVector &v, float &offset, bool systemBasis) |
| =======================================================================================. More...
|
TPSLod | getLOD (void) const |
| =======================================================================================. More...
|
float | getOneMinusCurrentLODRatio (void) const |
| get 1.f - the current lod ratio (it is updated at each motion pass). More...
|
void | enableAutoLOD (bool enabled=true) |
| Enable / disbale auto-lod. More...
|
bool | isAutoLODEnabled () const |
| test wether Auto-LOD is enabled. More...
|
void | setupAutoLOD (float startDistPercent, uint8 degradationExponent) |
| Setup auto lod parameters. More...
|
float | getAutoLODStartDistPercent () const |
uint8 | getAutoLODDegradationExponent () const |
void | setAutoLODMode (bool skipParticles) |
| There are 2 modes for the auto-LOD : Particle are skip in the source container when display is performed (the default) There are just less particles displayed, but this can lead to 'pulse effect'. More...
|
bool | getAutoLODMode () const |
void | setColorAttenuationScheme (CPSAttribMaker< NLMISC::CRGBA > *colScheme) |
| Setup a color attenuation scheme with the distance from the viewer. More...
|
CPSAttribMaker< NLMISC::CRGBA > * | getColorAttenuationScheme () |
| Get the global color attenuation scheme. More...
|
const CPSAttribMaker< NLMISC::CRGBA > * | getColorAttenuationScheme () const |
const NLMISC::CRGBA & | getGlobalColor () const |
| Get the current global color of the system. More...
|
|
float | getWantedNumTris (float dist) |
| =======================================================================================. More...
|
void | setNumTris (uint numFaces) |
| =======================================================================================. More...
|
void | notifyMaxNumFacesChanged (void) |
| =======================================================================================. More...
|
bool | isLoadBalancingEnabled () const |
| Test whether load balancing has been activated for that system. More...
|
void | enableLoadBalancing (bool enabled=true) |
| =======================================================================================. More...
|
|
void | computeBBox (NLMISC::CAABBox &aabbox) |
| =======================================================================================. More...
|
void | setAutoComputeBBox (bool enable=true) |
| When this is set to false, the system will recompute his bbox each time it is querried This may be needed for systems that move fast. More...
|
bool | getAutoComputeBBox (void) const |
| test whether the system compute himself his bbox. More...
|
void | setPrecomputedBBox (const NLMISC::CAABBox &precompBBox) |
| set a precomputed bbox (expressed in the system basis). More...
|
void | getLastComputedBBox (NLMISC::CAABBox &dest) |
| get the last computed bbox. More...
|
|
void | registerLocatedBindableExternID (uint32 id, CPSLocatedBindable *lb) |
| =======================================================================================. More...
|
void | unregisterLocatedBindableExternID (CPSLocatedBindable *lb) |
| =======================================================================================. More...
|
|
uint | getNumLocatedBindableByExternID (uint32 id) const |
| =======================================================================================. More...
|
CPSLocatedBindable * | getLocatedBindableByExternID (uint32 id, uint index) |
| =======================================================================================. More...
|
const CPSLocatedBindable * | getLocatedBindableByExternID (uint32 id, uint index) const |
| =======================================================================================. More...
|
uint | getNumID () const |
| =======================================================================================. More...
|
uint32 | getID (uint index) const |
| =======================================================================================. More...
|
void | getIDs (std::vector< uint32 > &dest) const |
| =======================================================================================. More...
|
Static Public Attributes |
uint32 | NbParticlesDrawn = 0 |
| used for benchs. must be reset by the user. More...
|
Private Types |
typedef std::map< std::string,
float > | TGlobalValuesMap |
typedef std::map< std::string,
NLMISC::CVector > | TGlobalVectorValuesMap |
typedef std::vector< CParticleSystemProcess * > | TProcessVect |
typedef std::multimap< uint32,
CPSLocatedBindable * > | TLBMap |
Private Methods |
void | stepLocated (TPSProcessPass pass, TAnimationTime et, TAnimationTime realEt) |
| =======================================================================================. More...
|
void | updateLODRatio () |
| =======================================================================================. More...
|
void | updateColor () |
| =======================================================================================. More...
|
Private Attributes |
NLMISC::CAABBox | _PreComputedBBox |
IDriver * | _Driver |
TProcessVect | _ProcessVect |
CFontGenerator * | _FontGenerator |
CFontManager * | _FontManager |
NLMISC::CMatrix | _ViewMat |
NLMISC::CMatrix | _InvertedViewMat |
NLMISC::CMatrix | _SysMat |
NLMISC::CMatrix | _OldSysMat |
NLMISC::CMatrix | _InvSysMat |
NLMISC::CVector | _CurrentDeltaPos |
NLMISC::CVector | _DeltaPos |
uint64 | _Date |
sint64 | _LastUpdateDate |
| Last update date of the system. Useful with sharing only, to avoid several motions. More...
|
CPSLocated * | _CurrEditedElementLocated |
CPSLocatedBindable * | _CurrEditedElementLocatedBindable |
uint32 | _CurrEditedElementIndex |
CScene * | _Scene |
| the scene in which the particle system is inserted. More...
|
std::string | _Name |
TAnimationTime | _TimeThreshold |
TAnimationTime | _SystemDate |
uint32 | _MaxNbIntegrations |
float | _LODRatio |
float | _OneMinusCurrentLODRatio |
float | _MaxViewDist |
float | _InvMaxViewDist |
float | _InvCurrentViewDist |
TDieCondition | _DieCondition |
TAnimationTime | _DelayBeforeDieTest |
uint | _MaxNumFacesWanted |
TAnimType | _AnimType |
float | _UserParam [MaxPSUserParam] |
const TGlobalValuesMap::value_type ** | _UserParamGlobalValue |
uint8 | _BypassGlobalUserParam |
TPresetBehaviour | _PresetBehaviour |
TLBMap | _LBMap |
float | _AutoLODStartDistPercent |
uint8 | _AutoLODDegradationExponent |
CPSAttribMaker< NLMISC::CRGBA > * | _ColorAttenuationScheme |
NLMISC::CRGBA | _GlobalColor |
bool | _ComputeBBox |
| \TODO nico replace this with a bitfield (and change serialisation accordingly) when set to true, the system will compute his BBox every time computeBBox is called. More...
|
bool | _BBoxTouched |
bool | _AccurateIntegration |
bool | _CanSlowDown |
bool | _DestroyModelWhenOutOfRange |
bool | _DestroyWhenOutOfFrustum |
bool | _Sharing |
bool | _AutoLOD |
bool | _KeepEllapsedTimeForLifeUpdate |
bool | _AutoLODSkipParticles |
bool | _EnableLoadBalancing |
float | _InverseEllapsedTime |
| Inverse of the ellapsed time (call to step, valid only for motion pass). More...
|
Static Private Attributes |
TGlobalValuesMap | _GlobalValuesMap |
TGlobalVectorValuesMap | _GlobalVectorValuesMap |
UPSSoundServer * | _SoundServer = NULL |
Friends |
class | CParticleSystemDetailObs |
Detailed Description
This class holds a particle system.
Most of the time it is used with a particle system model. See particle_system_shape.h and particle_system_model.h for more details. It can be used directly to create a shape. If you plan to use this without a particle system model, make sure :
- you've setup the driver before calls to step()
- you've setup the font manager if you want to display font informations
-
Author:
-
Nicolas Vizerie , Nevrax France
-
Date:
-
2001
Definition at line 83 of file particle_system.h.
Member Typedef Documentation
typedef std::map<std::string, float> NL3D::CParticleSystem::TGlobalValuesMap [private]
|
|
typedef std::map<std::string, NLMISC::CVector> NL3D::CParticleSystem::TGlobalVectorValuesMap [private]
|
|
Member Enumeration Documentation
enum NL3D::CParticleSystem::TAnimType
|
|
|
This enum tells when animation must be performed.
-
Enumeration values:
-
AnimVisible |
|
AnimInCluster |
|
AnimAlways |
|
LastValue |
|
Definition at line 690 of file particle_system.h.
Referenced by getAnimType, and setAnimType. |
enum NL3D::CParticleSystem::TDieCondition
|
|
enum NL3D::CParticleSystem::TPass
|
|
|
-
Enumeration values:
-
Anim |
|
SolidRender |
|
BlendRender |
|
ToolRender |
|
Definition at line 87 of file particle_system.h. |
enum NL3D::CParticleSystem::TPresetBehaviour
|
|
|
Because choosing the previous parameters can be difficult, this define presets hat can be used to tune the system easily.
Any call to :
- setDestroyModelWhenOutOfRange
- setAnimType
- setDestroyCondition
- destroyWhenOutOfFrustum
- performMotionWhenOutOfFrustum
will set the behaviour to 'user' -
Enumeration values:
-
EnvironmentFX |
|
RunningEnvironmentFX |
|
SpellFX |
|
LoopingSpellFX |
|
MinorFX |
|
UserBehaviour |
|
PresetLast |
|
Definition at line 733 of file particle_system.h.
Referenced by getBehaviourType. |
Constructor & Destructor Documentation
NL3D::CParticleSystem::CParticleSystem |
( |
|
) |
|
|
NL3D::CParticleSystem::~CParticleSystem |
( |
|
) |
[virtual] |
|
Member Function Documentation
void NL3D::CParticleSystem::activatePresetBehaviour |
( |
TPresetBehaviour |
behaviour |
) |
|
|
|
=======================================================================================.
Definition at line 817 of file particle_system.cpp.
References _PresetBehaviour, AnimAlways, AnimInCluster, AnimVisible, destroyWhenOutOfFrustum, EnvironmentFX, LoopingSpellFX, MinorFX, noMoreParticles, none, RunningEnvironmentFX, setAnimType, setDestroyCondition, setDestroyModelWhenOutOfRange, and SpellFX. |
void NL3D::CParticleSystem::bindGlobalValueToUserParam |
( |
const std::string & |
globalValueName, |
|
|
uint |
userParamIndex |
|
) |
|
|
void NL3D::CParticleSystem::destroyWhenOutOfFrustum |
( |
bool |
enable = true |
) |
[inline] |
|
bool NL3D::CParticleSystem::doesDestroyWhenOutOfFrustum |
( |
void |
|
) |
const [inline] |
|
bool NL3D::CParticleSystem::doesPerformMotionWhenOutOfFrustum |
( |
void |
|
) |
const [inline] |
|
void NL3D::CParticleSystem::enableAccurateIntegration |
( |
bool |
enable = true |
) |
[inline] |
|
|
This enable for more accurate integrations of movement.
When this is activated, integration is performed in a more accurate way when the ellapsed time goes over a threshold, but it is more slow to perform.
Definition at line 418 of file particle_system.h.
References _AccurateIntegration. |
void NL3D::CParticleSystem::enableAutoLOD |
( |
bool |
enabled = true |
) |
[inline] |
|
|
Enable / disbale auto-lod.
When auto-LOD is enabled, less particles are displayed when the system is far. This apply to all particles in the systems (unless they override that behaviour). The default is AutoLOD off.
Definition at line 503 of file particle_system.h.
References _AutoLOD. |
void NL3D::CParticleSystem::enableLoadBalancing |
( |
bool |
enabled = true |
) |
|
|
void NL3D::CParticleSystem::enableSharing |
( |
bool |
enabled = true |
) |
[inline] |
|
|
Enable/Disable sharing.
When sharing is enabled, the state of a particle system is the same for all the system that have the same shape. This allow to gain memory. However, such system should not be built with LOD in mind (for example, less emission with distance) LOD should be automatic for these system (see Auto-Lod). This means that sharing is only useful for system that have the same state, and if they are numerous : motion is performed once, but only for one system with no LOD. LOD is done during display only (when activated). The default for systems is to have no sharing.
Definition at line 122 of file particle_system.h.
References _Sharing. |
void NL3D::CParticleSystem::getAccurateIntegrationParams |
( |
TAnimationTime & |
threshold, |
|
|
uint32 & |
maxNbIntegrations, |
|
|
bool & |
canSlowDown, |
|
|
bool & |
keepEllapsedTimeForLifeUpdate |
|
) |
[inline] |
|
TAnimType NL3D::CParticleSystem::getAnimType |
( |
|
) |
const [inline] |
|
bool NL3D::CParticleSystem::getAutoComputeBBox |
( |
void |
|
) |
const [inline] |
|
uint8 NL3D::CParticleSystem::getAutoLODDegradationExponent |
( |
|
) |
const [inline] |
|
bool NL3D::CParticleSystem::getAutoLODMode |
( |
|
) |
const [inline] |
|
float NL3D::CParticleSystem::getAutoLODStartDistPercent |
( |
|
) |
const [inline] |
|
uint64 NL3D::CParticleSystem::getDate |
( |
void |
|
) |
const [inline] |
|
|
Get the date of the system (the number of time it has been drawn in fact) This may be used to skip frames in an animation for example.
Definition at line 277 of file particle_system.h.
References _Date. |
TAnimationTime NL3D::CParticleSystem::getDelayBeforeDeathConditionTest |
( |
void |
|
) |
const [inline] |
|
TDieCondition NL3D::CParticleSystem::getDestroyCondition |
( |
void |
|
) |
const [inline] |
|
bool NL3D::CParticleSystem::getDestroyModelWhenOutOfRange |
( |
void |
|
) |
const [inline] |
|
IDriver* NL3D::CParticleSystem::getDriver |
( |
void |
|
) |
[inline] |
|
const CFontGenerator* NL3D::CParticleSystem::getFontGenerator |
( |
void |
|
) |
const [inline] |
|
CFontGenerator* NL3D::CParticleSystem::getFontGenerator |
( |
void |
|
) |
[inline] |
|
const CFontManager* NL3D::CParticleSystem::getFontManager |
( |
void |
|
) |
const [inline] |
|
CFontManager* NL3D::CParticleSystem::getFontManager |
( |
void |
|
) |
[inline] |
|
const NLMISC::CRGBA& NL3D::CParticleSystem::getGlobalColor |
( |
|
) |
const [inline] |
|
|
Get the current global color of the system.
(It is updated just before drawing...). It there's no color attenuation scheme it can be assumed to be white
Definition at line 554 of file particle_system.h.
References _GlobalColor. |
float NL3D::CParticleSystem::getGlobalValue |
( |
const std::string & |
name |
) |
[static] |
|
std::string NL3D::CParticleSystem::getGlobalValueName |
( |
uint |
userParamIndex |
) |
const |
|
NLMISC::CVector NL3D::CParticleSystem::getGlobalVectorValue |
( |
const std::string & |
name |
) |
[static] |
|
uint32 NL3D::CParticleSystem::getID |
( |
uint |
index |
) |
const |
|
|
=======================================================================================.
Definition at line 903 of file particle_system.cpp.
References _LBMap, and index. |
void NL3D::CParticleSystem::getIDs |
( |
std::vector< uint32 > & |
dest |
) |
const |
|
|
=======================================================================================.
-
Warning:
-
As IDs are not internally stored in a vector, it is faster than several calls to getID
Definition at line 915 of file particle_system.cpp.
References _LBMap. |
|
=======================================================================================.
The process must be part of the system, otherwise an assertion is raised
Definition at line 886 of file particle_system.cpp.
References _ProcessVect, and nlassert. |
const NLMISC::CMatrix& NL3D::CParticleSystem::getInvertedSysMat |
( |
void |
|
) |
const [inline] |
|
const NLMISC::CMatrix& NL3D::CParticleSystem::getInvertedViewMat |
( |
void |
|
) |
const [inline] |
|
void NL3D::CParticleSystem::getLastComputedBBox |
( |
NLMISC::CAABBox & |
dest |
) |
[inline] |
|
|
=======================================================================================.
-
Returns:
-
NULL if it doesn't exist
Definition at line 776 of file particle_system.cpp.
References _LBMap, id, and index. |
TPSLod NL3D::CParticleSystem::getLOD |
( |
void |
|
) |
const |
|
float NL3D::CParticleSystem::getLODRatio |
( |
void |
|
) |
const [inline] |
|
void NL3D::CParticleSystem::getLODVect |
( |
NLMISC::CVector & |
v, |
|
|
float & |
offset, |
|
|
bool |
systemBasis |
|
) |
|
|
float NL3D::CParticleSystem::getMaxViewDist |
( |
void |
|
) |
const [inline] |
|
std::string NL3D::CParticleSystem::getName |
( |
void |
|
) |
const [inline] |
|
uint32 NL3D::CParticleSystem::getNbProcess |
( |
void |
|
) |
const [inline] |
|
uint NL3D::CParticleSystem::getNumID |
( |
|
) |
const |
|
|
=======================================================================================.
Definition at line 897 of file particle_system.cpp.
References _LBMap. |
uint NL3D::CParticleSystem::getNumLocatedBindableByExternID |
( |
uint32 |
id |
) |
const |
|
|
=======================================================================================.
Definition at line 770 of file particle_system.cpp.
References _LBMap, and id. |
const NLMISC::CMatrix& NL3D::CParticleSystem::getOldSysMat |
( |
void |
|
) |
const [inline] |
|
float NL3D::CParticleSystem::getOneMinusCurrentLODRatio |
( |
void |
|
) |
const [inline] |
|
CScene* NL3D::CParticleSystem::getScene |
( |
void |
|
) |
[inline] |
|
UPSSoundServer* NL3D::CParticleSystem::getSoundServer |
( |
void |
|
) |
[inline, static] |
|
const NLMISC::CMatrix& NL3D::CParticleSystem::getSysMat |
( |
void |
|
) |
const [inline] |
|
TAnimationTime NL3D::CParticleSystem::getSystemDate |
( |
void |
|
) |
const [inline] |
|
float NL3D::CParticleSystem::getUserParam |
( |
uint |
userParamIndex |
) |
const [inline] |
|
const NLMISC::CMatrix& NL3D::CParticleSystem::getViewMat |
( |
void |
|
) |
const [inline] |
|
float NL3D::CParticleSystem::getWantedNumTris |
( |
float |
dist |
) |
|
|
bool NL3D::CParticleSystem::hasEmitters |
( |
void |
|
) |
const |
|
bool NL3D::CParticleSystem::hasOpaqueObjects |
( |
void |
|
) |
const |
|
bool NL3D::CParticleSystem::hasParticles |
( |
void |
|
) |
const |
|
bool NL3D::CParticleSystem::hasTransparentObjects |
( |
void |
|
) |
const |
|
bool NL3D::CParticleSystem::isAccurateIntegrationEnabled |
( |
void |
|
) |
const [inline] |
|
bool NL3D::CParticleSystem::isAutoLODEnabled |
( |
|
) |
const [inline] |
|
bool NL3D::CParticleSystem::isLoadBalancingEnabled |
( |
|
) |
const [inline] |
|
bool NL3D::CParticleSystem::isSharingEnabled |
( |
|
) |
const [inline] |
|
void NL3D::CParticleSystem::notifyMaxNumFacesChanged |
( |
void |
|
) |
|
|
void NL3D::CParticleSystem::performMotionWhenOutOfFrustum |
( |
bool |
enable = true |
) |
[inline] |
|
void NL3D::CParticleSystem::reactivateSound |
( |
|
) |
|
|
|
=======================================================================================.
each pair <id, locatedBindable> must be unique, but there may be sevral LB for the same key
Definition at line 742 of file particle_system.cpp.
References _LBMap, id, and nlassert. |
void NL3D::CParticleSystem::registerSoundServer |
( |
UPSSoundServer * |
soundServer |
) |
[inline, static] |
|
void NL3D::CParticleSystem::setAccurateIntegrationParams |
( |
TAnimationTime |
threshold, |
|
|
uint32 |
maxNbIntegrations, |
|
|
bool |
canSlowDown, |
|
|
bool |
keepEllapsedTimeForLifeUpdate |
|
) |
[inline] |
|
void NL3D::CParticleSystem::setAnimType |
( |
TAnimType |
animType |
) |
[inline] |
|
void NL3D::CParticleSystem::setAutoComputeBBox |
( |
bool |
enable = true |
) |
[inline] |
|
|
When this is set to false, the system will recompute his bbox each time it is querried This may be needed for systems that move fast.
Definition at line 593 of file particle_system.h.
References _ComputeBBox. |
void NL3D::CParticleSystem::setAutoLODMode |
( |
bool |
skipParticles |
) |
[inline] |
|
|
There are 2 modes for the auto-LOD : Particle are skip in the source container when display is performed (the default) There are just less particles displayed, but this can lead to 'pulse effect'.
- * - This is faster, though.
Definition at line 528 of file particle_system.h.
References _AutoLODSkipParticles. |
|
Setup a color attenuation scheme with the distance from the viewer.
This doesn't act on a particle basis, the whole color of the system is changed in an uniform way so it is fast (the same can be achieved on a particle basis). This bypass the source of the scheme : it is set to 0 when the system is on the user, and to 1 when it is at its max distance. -
Parameters:
-
scheme |
A color scheme, that is then owned by this object. NULL disable color attenuation. Any previous scheme is removed |
Definition at line 537 of file particle_system.h.
References _ColorAttenuationScheme, _GlobalColor, and NLMISC::CRGBA::White. |
void NL3D::CParticleSystem::setDelayBeforeDeathConditionTest |
( |
TAnimationTime |
delay |
) |
[inline] |
|
void NL3D::CParticleSystem::setDestroyCondition |
( |
TDieCondition |
dieCondition |
) |
[inline] |
|
void NL3D::CParticleSystem::setDestroyModelWhenOutOfRange |
( |
bool |
enable = true |
) |
[inline] |
|
void NL3D::CParticleSystem::setDriver |
( |
IDriver * |
driver |
) |
[inline] |
|
void NL3D::CParticleSystem::setFontGenerator |
( |
CFontGenerator * |
fg |
) |
[inline] |
|
void NL3D::CParticleSystem::setFontManager |
( |
CFontManager * |
fg |
) |
[inline] |
|
void NL3D::CParticleSystem::setGlobalValue |
( |
const std::string & |
name, |
|
|
float |
value |
|
) |
[static] |
|
void NL3D::CParticleSystem::setGlobalVectorValue |
( |
const std::string & |
name, |
|
|
const NLMISC::CVector & |
value |
|
) |
[static] |
|
|
=======================================================================================.
Global vector values are set to (0, 0, 0) by default Global vector values are used in some places. For example, direction for a directionnal force.
Definition at line 998 of file particle_system.cpp.
References _GlobalVectorValuesMap, nlassert, and value. |
void NL3D::CParticleSystem::setLODRatio |
( |
float |
ratio |
) |
[inline] |
|
void NL3D::CParticleSystem::setMaxViewDist |
( |
float |
maxDist |
) |
[inline] |
|
void NL3D::CParticleSystem::setName |
( |
const std::string & |
s |
) |
[inline] |
|
void NL3D::CParticleSystem::setNumTris |
( |
uint |
numFaces |
) |
|
|
void NL3D::CParticleSystem::setPrecomputedBBox |
( |
const NLMISC::CAABBox & |
precompBBox |
) |
[inline] |
|
void NL3D::CParticleSystem::setScene |
( |
CScene * |
scene |
) |
[inline] |
|
|
Set the scene in which the particle system is inserted.
This is needed when system must add objects to the scene (for particle that are mesh for instance)
Definition at line 145 of file particle_system.h.
References _Scene. |
void NL3D::CParticleSystem::setupAutoLOD |
( |
float |
startDistPercent, |
|
|
uint8 |
degradationExponent |
|
) |
[inline] |
|
void NL3D::CParticleSystem::setUserParam |
( |
uint |
userParamIndex, |
|
|
float |
value |
|
) |
[inline] |
|
|
=======================================================================================.
It uses the driver that was set by a call to setDriver. -
Parameters:
-
ellapsedTime |
The ellapsed time since the last call |
pass |
the pass to be executed |
-
See also:
-
setDriver
Definition at line 298 of file particle_system.cpp.
References _BBoxTouched, _BypassGlobalUserParam, _CurrentDeltaPos, _Date, _DeltaPos, _InverseEllapsedTime, _KeepEllapsedTimeForLifeUpdate, _MaxNbIntegrations, _ProcessVect, _SystemDate, _TimeThreshold, _UserParam, _UserParamGlobalValue, Anim, BlendRender, NL3D::MaxPSUserParam, nlassert, nlctassert, NL3D::PSBlendRender, NL3D::PSCollision, NL3D::PSEmit, NL3D::PSMotion, NL3D::PSSolidRender, NL3D::PSToolRender, SolidRender, stepLocated, NL3D::TAnimationTime, ToolRender, updateColor, and updateLODRatio. |
void NL3D::CParticleSystem::stopSound |
( |
|
) |
|
|
void NL3D::CParticleSystem::updateColor |
( |
|
) |
[inline, private] |
|
void NL3D::CParticleSystem::updateLODRatio |
( |
|
) |
[inline, private] |
|
Friends And Related Function Documentation
friend class CParticleSystemDetailObs [friend]
|
|
Member Data Documentation
bool NL3D::CParticleSystem::_AccurateIntegration [private]
|
|
TAnimType NL3D::CParticleSystem::_AnimType [private]
|
|
bool NL3D::CParticleSystem::_AutoLOD [private]
|
|
uint8 NL3D::CParticleSystem::_AutoLODDegradationExponent [private]
|
|
bool NL3D::CParticleSystem::_AutoLODSkipParticles [private]
|
|
float NL3D::CParticleSystem::_AutoLODStartDistPercent [private]
|
|
bool NL3D::CParticleSystem::_BBoxTouched [private]
|
|
uint8 NL3D::CParticleSystem::_BypassGlobalUserParam [private]
|
|
bool NL3D::CParticleSystem::_CanSlowDown [private]
|
|
bool NL3D::CParticleSystem::_ComputeBBox [private]
|
|
uint32 NL3D::CParticleSystem::_CurrEditedElementIndex [private]
|
|
CPSLocated* NL3D::CParticleSystem::_CurrEditedElementLocated [private]
|
|
uint64 NL3D::CParticleSystem::_Date [private]
|
|
bool NL3D::CParticleSystem::_DestroyModelWhenOutOfRange [private]
|
|
bool NL3D::CParticleSystem::_DestroyWhenOutOfFrustum [private]
|
|
IDriver* NL3D::CParticleSystem::_Driver [private]
|
|
bool NL3D::CParticleSystem::_EnableLoadBalancing [private]
|
|
float NL3D::CParticleSystem::_InvCurrentViewDist [private]
|
|
float NL3D::CParticleSystem::_InverseEllapsedTime [private]
|
|
float NL3D::CParticleSystem::_InvMaxViewDist [private]
|
|
bool NL3D::CParticleSystem::_KeepEllapsedTimeForLifeUpdate [private]
|
|
sint64 NL3D::CParticleSystem::_LastUpdateDate [private]
|
|
|
Last update date of the system. Useful with sharing only, to avoid several motions.
Definition at line 860 of file particle_system.h. |
TLBMap NL3D::CParticleSystem::_LBMap [private]
|
|
float NL3D::CParticleSystem::_LODRatio [private]
|
|
uint32 NL3D::CParticleSystem::_MaxNbIntegrations [private]
|
|
uint NL3D::CParticleSystem::_MaxNumFacesWanted [private]
|
|
float NL3D::CParticleSystem::_MaxViewDist [private]
|
|
std::string NL3D::CParticleSystem::_Name [private]
|
|
float NL3D::CParticleSystem::_OneMinusCurrentLODRatio [private]
|
|
|
Definition at line 836 of file particle_system.h.
Referenced by attach, computeBBox, detach, getIndexOf, getNbProcess, getProcess, hasEmitters, hasOpaqueObjects, hasParticles, hasTransparentObjects, isProcess, notifyMaxNumFacesChanged, remove, step, stepLocated, and ~CParticleSystem. |
CScene* NL3D::CParticleSystem::_Scene [private]
|
|
|
the scene in which the particle system is inserted.
This is needed because the system may add objects to the scene (for particle that are meshs for instance)
Definition at line 874 of file particle_system.h.
Referenced by getScene, and setScene. |
bool NL3D::CParticleSystem::_Sharing [private]
|
|
UPSSoundServer * NL3D::CParticleSystem::_SoundServer = NULL [static, private]
|
|
const TGlobalValuesMap::value_type** NL3D::CParticleSystem::_UserParamGlobalValue [private]
|
|
uint32 NL3D::CParticleSystem::NbParticlesDrawn = 0 [static]
|
|
The documentation for this class was generated from the following files:
|
|