|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CParticleSystemModel Class ReferenceA particle system model : it is built using a CParticleSystemShape.
More...
#include <particle_system_model.h>
Inheritance diagram for NL3D::CParticleSystemModel:
List of all members.
User params / animation |
enum | TAnimValues {
OwnerBit = CTransformShape::AnimValueLast,
PSParam0,
PSParam1,
PSParam2,
PSParam3,
PSTrigger,
AnimValueLast
} |
| for now, we have 4 animatables value in a system. More...
|
virtual IAnimatedValue * | getValue (uint valueId) |
| =====================================================================================. More...
|
virtual const char * | getValueName (uint valueId) const |
| =====================================================================================. More...
|
virtual ITrack * | getDefaultTrack (uint valueId) |
| =====================================================================================. More...
|
virtual void | registerToChannelMixer (CChannelMixer *chanMixer, const std::string &prefix="") |
| =====================================================================================. More...
|
void | bypassGlobalUserParamValue (uint userParamIndex, bool byPass=true) |
| NB : we don't do this test here for always animated system, as it is done by the CParticleSystemManager, because this code is not sure to be executed if the system has been clipped by a cluster. More...
|
bool | isGlobalUserParamValueBypassed (uint userParamIndex) const |
const char * | getPSParamName (uint valueId) |
| =====================================================================================. More...
|
Object |
| CParticleSystemModel () |
| ===================================================================================== ctor. More...
|
| ~CParticleSystemModel () |
| =====================================================================================. More...
|
void | registerBasic () |
| =====================================================================================. More...
|
Public Types |
Public Methods |
void | updateOpacityInfos (void) |
| =====================================================================================. More...
|
const CMatrix & | getWorldMatrix (void) |
| get the world matrix. More...
|
virtual void | getAABBox (NLMISC::CAABBox &bbox) const |
| =====================================================================================. More...
|
virtual float | getNumTriangles (float distance) |
| =====================================================================================. More...
|
|
CParticleSystem * | getPS (void) |
| Get the particle system contained in this transform shape. More...
|
const CParticleSystem * | getPS (void) const |
| Get the particle system (NB : This is shared by a smart ptr) contained in this transform shape. More...
|
void | setParticleSystem (CParticleSystem *ps) |
| Set the particle system for this transform shape after it has been instanciated (from a memory stream, or by sharing) see CParticleSystemShape. More...
|
|
bool | isInvalid (void) const |
| test wether the system has become invalid. More...
|
void | registerPSModelObserver (IPSModelObserver *obs) |
| =====================================================================================. More...
|
void | removePSModelObserver (IPSModelObserver *obs) |
| =====================================================================================. More...
|
bool | isPSModelObserver (IPSModelObserver *obs) |
| =====================================================================================. More...
|
|
void | enableAutoGetEllapsedTime (bool enable=true) |
| when called with true, this force the model to querry himself the ellapsed time to the scene. More...
|
void | setEllapsedTimeRatio (float value) |
| This apply a ratio on the ellapsed time. More...
|
float | getEllapsedTimeRatio () const |
bool | isAutoGetEllapsedTimeEnabled (void) const |
| tells wether the model will querry himself for the ellapsed time. More...
|
void | setEllapsedTime (TAnimationTime ellapsedTime) |
| set the ellapsed time (in second) used for animation. More...
|
TAnimationTime | getEllapsedTime (void) const |
| get the ellapsed time used for animation. More...
|
|
void | enableDisplayTools (bool enable=true) |
| activate the display of tool (for edition purpose). More...
|
bool | isToolDisplayEnabled (void) const |
void | setEditionMode (bool enable=true) |
| =====================================================================================. More...
|
bool | getEditionMode (void) const |
| test if edition mode is activated. More...
|
void | touchTransparencyState (void) |
| edition purpose : touch the system to tell that the transparency state of the system has changed (added/removes opaque/tansparent faces ). More...
|
Static Public Methods |
IModel * | creator () |
| create an instance of this class. More...
|
Private Methods |
void | reallocRsc () |
| ===================================================================================== Called when the resource (attached system) for this system must be reallocated. More...
|
bool | refreshRscDeletion (const std::vector< CPlane > &worldFrustumPyramid, const NLMISC::CVector &viewerPos) |
| =====================================================================================. More...
|
void | releaseRsc () |
| =====================================================================================. More...
|
void | releaseRscAndInvalidate () |
| =====================================================================================. More...
|
bool | checkAgainstPyramid (const std::vector< CPlane > &worldFrustumPyramid) const |
| =========================================================================================. More...
|
void | releasePSPointer () |
| =====================================================================================. More...
|
Private Attributes |
CParticleSystemManager::TModelHandle | _ModelHandle |
CParticleSystemManager::TModelHandle | _AnimatedModelHandle |
| a handle to say when the resources of the model (_ParticleSystem) are deleted. More...
|
bool | _AutoGetEllapsedTime |
NLMISC::CSmartPtr< CParticleSystem > | _ParticleSystem |
CScene * | _Scene |
TAnimationTime | _EllapsedTime |
float | _EllapsedTimeRatio |
bool | _ToolDisplayEnabled |
bool | _TransparencyStateTouched |
bool | _EditionMode |
bool | _Invalidated |
bool | _InsertedInVisibleList |
| if false, system should be recreated. More...
|
bool | _InClusterAndVisible |
std::vector< IPSModelObserver * > | _Observers |
CAnimatedValueBool | _TriggerAnimatedValue |
CAnimatedValueFloat | _UserParam [MaxPSUserParam] |
| user params of the system. More...
|
uint8 | _BypassGlobalUserParam |
Friends |
class | CParticleSystemShape |
class | CParticleSystemDetailObs |
class | CParticleSystemClipObs |
class | CParticleSystemRenderObs |
class | CParticleSystemManager |
Detailed Description
A particle system model : it is built using a CParticleSystemShape.
You should forgot to call the animate() method of the CScene it is part of if you want motion to be performed
Definition at line 60 of file particle_system_model.h.
Member Enumeration Documentation
enum NL3D::CParticleSystemModel::TAnimValues
|
|
|
for now, we have 4 animatables value in a system.
-
Enumeration values:
-
OwnerBit |
|
PSParam0 |
|
PSParam1 |
|
PSParam2 |
|
PSParam3 |
|
PSTrigger |
|
AnimValueLast |
|
Reimplemented from NL3D::ITransformable.
Definition at line 204 of file particle_system_model.h. |
Constructor & Destructor Documentation
NL3D::CParticleSystemModel::CParticleSystemModel |
( |
|
) |
|
|
NL3D::CParticleSystemModel::~CParticleSystemModel |
( |
|
) |
|
|
Member Function Documentation
void NL3D::CParticleSystemModel::bypassGlobalUserParamValue |
( |
uint |
userParamIndex, |
|
|
bool |
byPass = true |
|
) |
|
|
bool NL3D::CParticleSystemModel::checkAgainstPyramid |
( |
const std::vector< CPlane > & |
worldFrustumPyramid |
) |
const [private] |
|
IModel* NL3D::CParticleSystemModel::creator |
( |
|
) |
[inline, static] |
|
void NL3D::CParticleSystemModel::enableAutoGetEllapsedTime |
( |
bool |
enable = true |
) |
[inline] |
|
|
when called with true, this force the model to querry himself the ellapsed time to the scene.
This is the default. Otherwise, setEllapsedTime must be called
Definition at line 138 of file particle_system_model.h.
References _AutoGetEllapsedTime. |
void NL3D::CParticleSystemModel::enableDisplayTools |
( |
bool |
enable = true |
) |
[inline] |
|
void NL3D::CParticleSystemModel::getAABBox |
( |
NLMISC::CAABBox & |
bbox |
) |
const [virtual] |
|
ITrack * NL3D::CParticleSystemModel::getDefaultTrack |
( |
uint |
valueId |
) |
[virtual] |
|
bool NL3D::CParticleSystemModel::getEditionMode |
( |
void |
|
) |
const [inline] |
|
TAnimationTime NL3D::CParticleSystemModel::getEllapsedTime |
( |
void |
|
) |
const [inline] |
|
float NL3D::CParticleSystemModel::getEllapsedTimeRatio |
( |
|
) |
const [inline] |
|
float NL3D::CParticleSystemModel::getNumTriangles |
( |
float |
distance |
) |
[virtual] |
|
const CParticleSystem* NL3D::CParticleSystemModel::getPS |
( |
void |
|
) |
const [inline] |
|
|
Get the particle system (NB : This is shared by a smart ptr) contained in this transform shape.
This may be null if the model is not visible.
Definition at line 89 of file particle_system_model.h.
References _ParticleSystem. |
|
Get the particle system contained in this transform shape.
(NB: This is shared by a smart ptr) -
Returns:
-
pointer to the system, or NULL if no system is currently hold by this model. this may happen when the system is not visible and that it has been deleted
Definition at line 81 of file particle_system_model.h.
References _ParticleSystem. |
const char * NL3D::CParticleSystemModel::getPSParamName |
( |
uint |
valueId |
) |
[static] |
|
const char * NL3D::CParticleSystemModel::getValueName |
( |
uint |
valueId |
) |
const [virtual] |
|
const CMatrix& NL3D::CParticleSystemModel::getWorldMatrix |
( |
void |
|
) |
[inline] |
|
bool NL3D::CParticleSystemModel::isAutoGetEllapsedTimeEnabled |
( |
void |
|
) |
const [inline] |
|
bool NL3D::CParticleSystemModel::isGlobalUserParamValueBypassed |
( |
uint |
userParamIndex |
) |
const |
|
bool NL3D::CParticleSystemModel::isInvalid |
( |
void |
|
) |
const [inline] |
|
|
test wether the system has become invalid.
The condition for a system to be invalid are encoded in the system itself (no more particles for example). When a system has become invalid, you may want to remove it most of the time
Definition at line 111 of file particle_system_model.h.
References _Invalidated. |
bool NL3D::CParticleSystemModel::isToolDisplayEnabled |
( |
void |
|
) |
const [inline] |
|
void NL3D::CParticleSystemModel::reallocRsc |
( |
|
) |
[private] |
|
bool NL3D::CParticleSystemModel::refreshRscDeletion |
( |
const std::vector< CPlane > & |
worldFrustumPyramid, |
|
|
const NLMISC::CVector & |
viewerPos |
|
) |
[private] |
|
|
=====================================================================================.
IMPORTANT: the handle of the model in the p.s manager is automatically removed when this returns true
Definition at line 205 of file particle_system_model.cpp.
References _AnimatedModelHandle, _Invalidated, _ParticleSystem, _Scene, checkAgainstPyramid, CParticleSystemShape, getWorldMatrix, nlassert, releasePSPointer, NL3D::CTransformShape::Shape, and v. |
void NL3D::CParticleSystemModel::registerBasic |
( |
|
) |
[static] |
|
void NL3D::CParticleSystemModel::registerPSModelObserver |
( |
IPSModelObserver * |
obs |
) |
|
|
void NL3D::CParticleSystemModel::registerToChannelMixer |
( |
CChannelMixer * |
chanMixer, |
|
|
const std::string & |
prefix = "" |
|
) |
[virtual] |
|
void NL3D::CParticleSystemModel::releasePSPointer |
( |
|
) |
[private] |
|
void NL3D::CParticleSystemModel::releaseRsc |
( |
|
) |
[private] |
|
|
=====================================================================================.
Why do we test this here addtionnaly to the clip traversal ? Simply because the clip observer is not called if the cluster it is inserted in is not parsed. This is not good, because we want to keep few CParticleSystem instance. This method solve that problem. This is called by the particle system manager when each scene has rendered
Definition at line 268 of file particle_system_model.cpp.
References _AnimatedModelHandle, _ModelHandle, _ParticleSystem, _Scene, and nlassert. |
void NL3D::CParticleSystemModel::releaseRscAndInvalidate |
( |
|
) |
[private] |
|
void NL3D::CParticleSystemModel::removePSModelObserver |
( |
IPSModelObserver * |
obs |
) |
|
|
void NL3D::CParticleSystemModel::setEditionMode |
( |
bool |
enable = true |
) |
|
|
void NL3D::CParticleSystemModel::setEllapsedTime |
( |
TAnimationTime |
ellapsedTime |
) |
[inline] |
|
void NL3D::CParticleSystemModel::setEllapsedTimeRatio |
( |
float |
value |
) |
[inline] |
|
void NL3D::CParticleSystemModel::setParticleSystem |
( |
CParticleSystem * |
ps |
) |
[inline] |
|
void NL3D::CParticleSystemModel::touchTransparencyState |
( |
void |
|
) |
[inline] |
|
void NL3D::CParticleSystemModel::updateOpacityInfos |
( |
void |
|
) |
|
|
Friends And Related Function Documentation
friend class CParticleSystemClipObs [friend]
|
|
friend class CParticleSystemDetailObs [friend]
|
|
friend class CParticleSystemManager [friend]
|
|
friend class CParticleSystemRenderObs [friend]
|
|
friend class CParticleSystemShape [friend]
|
|
Member Data Documentation
bool NL3D::CParticleSystemModel::_AutoGetEllapsedTime [private]
|
|
uint8 NL3D::CParticleSystemModel::_BypassGlobalUserParam [private]
|
|
bool NL3D::CParticleSystemModel::_EditionMode [private]
|
|
float NL3D::CParticleSystemModel::_EllapsedTimeRatio [private]
|
|
bool NL3D::CParticleSystemModel::_InClusterAndVisible [private]
|
|
bool NL3D::CParticleSystemModel::_InsertedInVisibleList [private]
|
|
bool NL3D::CParticleSystemModel::_Invalidated [private]
|
|
std::vector<IPSModelObserver *> NL3D::CParticleSystemModel::_Observers [private]
|
|
|
Definition at line 278 of file particle_system_model.h.
Referenced by checkAgainstPyramid, getAABBox, getNumTriangles, getPS, reallocRsc, refreshRscDeletion, releasePSPointer, releaseRsc, releaseRscAndInvalidate, setEditionMode, setParticleSystem, and updateOpacityInfos. |
CScene* NL3D::CParticleSystemModel::_Scene [private]
|
|
bool NL3D::CParticleSystemModel::_ToolDisplayEnabled [private]
|
|
bool NL3D::CParticleSystemModel::_TransparencyStateTouched [private]
|
|
The documentation for this class was generated from the following files:
|
|