#include <particle.h>
Inheritance diagram for ParticleSystem:
Public Types | |
Public Member Functions | |
ParticleSystem (ParticleGenerator *pkGenerator, unsigned int uiMaxParticles, float fTTL=0.0f, float fTTLAccuracy=0.0f) | |
virtual | ~ParticleSystem () |
virtual void | Update (float fDeltaTime=0.0f) |
virtual SceneNode * | Duplicate () |
unsigned int | GetNumParticles () |
void | SetRoom (Room *pkRoom) |
void | SetGenerate (bool bGenerate) |
void | ToggleGenerate () |
virtual void | NotifyUpdate (bool bRecurse=true) |
virtual void | NotifyVolumeUpdate (bool bRecurse=true) |
virtual bool | Render (Frustum *pkFrustum=0, bool bForce=false) |
BoundingVolume * | GetBoundingVolume () |
void | SetBoundingVolume (BoundingVolume *pkVolume) |
SceneEntity * | GetEntity () |
void | SetEntity (SceneEntity *pkEntity, bool bDeleteOld=true) |
void | PrintHierarchy (unsigned int uiLevel=0) |
virtual void | TraverseNode (BaseVisitor &rkVisitor) |
virtual bool | Intersection (BoundingVolume *pkObj, ContactSet *pkContactSet=0) |
virtual bool | Intersection (const Ray &rkRay, ContactSet *pkContactSet=0) |
bool | IsActive () const |
virtual void | Activate () |
virtual void | Deactivate () |
bool | Toggle () |
virtual void | SetTranslation (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
virtual void | SetRotation (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
virtual void | SetScaling (float fScaling, bool bNotifyUpdate=true) |
void | SetName (const HashString &rstrName) |
const HashString & | GetName () const |
SceneNode * | GetParent () |
virtual int | AttachNode (SceneNode *pkNode, bool bKeepWorldSRT=false) |
virtual int | DetachNode (SceneNode *pkNode) |
void | DetachFromParent () |
const Vector3d & | GetWorldTranslation () |
const Quaternion & | GetWorldRotation () |
float | GetWorldScaling () |
const Matrix & | GetWorldTransform () |
const Matrix & | GetInverseWorldTransform () |
const std::vector< SceneNode * > & | GetChildren () |
SceneNode * | GetByName (const HashString &rstrName, NODESEARCHMODE eMode=BREADTH_FIRST, bool bInitSearch=true) |
virtual void | Traverse (BaseVisitor &rkVisitor, NODESEARCHMODE eMode=DEPTH_FIRST, int iDirection=1, bool bInitSearch=true) |
virtual void | Accept (BaseVisitor &rkVisitor)=0 |
const Vector3d & | GetTranslation () const |
const Quaternion & | GetRotation () const |
float | GetScaling () const |
void | Translate (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
void | TranslateWorld (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
void | Rotate (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
void | RotateWorld (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
void | Scale (float fScaling, bool bNotifyUpdate=true) |
Public Attributes | |
ParticleSubSystem ** | m_ppkSubSystems |
unsigned int | m_uiNumParticles |
unsigned int | m_uiMaxParticles |
unsigned int | m_uiNumSubSystemPointers |
unsigned int | m_uiNumSubSystems |
float | m_fNormalTTL |
float | m_fTTLAccuracy |
ParticleGenerator * | m_pkGenerator |
Particle ** | m_ppkGeneratePool |
unsigned int | m_uiGeneratePoolSize |
unsigned int | m_uiNumFreeParticles |
Room * | m_pkRoom |
bool | m_bGenerate |
bool | m_bIgnoreVolume |
unsigned int | m_uiLastFrame |
Static Public Attributes | |
unsigned int | s_uiFrameCount |
Protected Member Functions | |
virtual bool | UpdateWorld () |
virtual bool | UpdateVolume () |
virtual SceneNode * | Get () |
Static Protected Member Functions | |
template<class NodeType> void | AcceptImpl (NodeType &rkVisited, BaseVisitor &rkVisitor) |
Protected Attributes | |
SceneEntity * | m_pkEntity |
BoundingVolume * | m_pkBoundingVolume |
bool | m_bNeedVolumeUpdate |
bool | m_bIgnoreVolumeUpdate |
bool | m_bActive |
bool | m_bWorldUpdate |
float | m_fWorldScaling |
Quaternion | m_kWorldRotation |
Vector3d | m_kWorldTranslation |
std::vector< SceneNode * > | m_vpkChildren |
SceneNode * | m_pkParent |
HashString | m_strName |
Matrix | m_kWorldTransform |
Matrix | m_kInverseWorldTransform |
float | m_fScaling |
Quaternion | m_kRotation |
Vector3d | m_kTranslation |
|
|
|
Also deletes generator object and all particles |
|
Update system and generate particles
Reimplemented from SceneNode. |
|
Duplicate system
Reimplemented from SceneNode. |
|
|
|
Set room to attach new particles to
|
|
Set generate flag
|
|
Toggle generate flag |
|
Updates world SRT data cache
Reimplemented from HierarchyNode< SceneNode >. |
|
Updates bounding volume for subtree rooted at this node
|
|
Used to get this as correct type
Reimplemented from HierarchyNode< SceneNode >. |
|
Set world udpate flag. If flag is set, a call to any of the GetWorldScaling, GetWorldRotation, GetWorldTranslation will cause world cache data to be updated. Optionally recurses on all child nodes (default).
Reimplemented from HierarchyNode< SceneNode >. |
|
Set bounding volume udpate flag. If flag is set, a call to any of the GetBoundingVolume will cause volume to be remerged from child nodes and entity. Optionally recurses on parent (default).
|
|
If node is active, render entity (if any) and any child nodes.
Reimplemented from RenderEntity. |
|
Get bounding volume
|
|
Set bounding volume object. Bounding volume transformation should be in world coordinate system
|
|
Get scene entity attached to this node
|
|
Attach new scene entity to this node. If flag set, Will delete previous entity (if any)
|
|
Debug output. Print hierarchy of nodes
|
|
Also traverse the entitiy
Reimplemented from HierarchyNode< SceneNode >. |
|
Intersection test with unknown object type
|
|
Intersection test with ray
|
|
Query state of object
|
|
Activate object |
|
Deactivate object |
|
Toggle active state. This method does not need to be overloaded, it is only a wrapper to Activate and Deactivate
|
|
Set position relative parent node. Will set flag to update world cache data, and optionally recurse and flag child nodes to update data
Reimplemented from SRTNode. |
|
Set rotation relative parent node. Will set flag to update world cache data, and optionally recurse and flag child nodes to update data
Reimplemented from SRTNode. |
|
Set uniform scaling relative parent node. Will set flag to update world cache data, and optionally recurse and flag child nodes to update data
Reimplemented from SRTNode. |
|
Set name
|
|
|
|
|
|
Attach node. If the node is attached to a parent, detach it first. This will cause the node to get it's world SRT data as local SRT data. If bKeepWorldSRT is set, node will be updated with inverse of this (new parent) node's SRT data, effectively keeping it intact in world space. If flag not set, node will effectivaly get new parent world SRT data added to own (used in initialization phase, for example).
Reimplemented in Room. |
|
Detach node. The node will store world SRT data in local SRT data.
Reimplemented in Room. |
|
Detach this node from parent, if any. Will store world SRT data (and update first if needed) in local SRT data to remain in same world position and orientation. |
|
Get position relative world coordinate system origo. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get rotation relative world unrotated coordinate system. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get total unform scaling factor relative world scale. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get total transform matrix relative world coordinate system origo. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get inverse total transform matrix relative world coordinate system origo. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get all child nodes
|
|
Search hierarchy for named node, including this node. Will return first node found along selected search mode.
|
|
Traverse the hierarchy applying the visitor to the nodes.
|
|
Accept visitors if implementation available
|
|
Accept a visitor
|
|
|
|
|
|
|
|
Translate node from current position, in local (along current rotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Translate node from current position, in world (along unrotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Rotate node in local (current rotation) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Rotate node in world (unrotated) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Scale node by uniform factor. Will use SetScaling for setting new scaling of node, derived classes do not need to overload this method directly. Must be >0, where a value of 1.0f indicates no scaling
|
|
Particles |
|
Number of particles currently in system |
|
Max number of particles |
|
Number of subsystem pointers in array |
|
Number of valid subsystems in array |
|
Normal lifetime for a particle, if any |
|
TTL accuracy |
|
Particle generator |
|
Generate array |
|
Number of pointers in generate pool |
|
Number of freed particles |
|
Room to attach new particles to Reimplemented from SceneNode. |
|
Generate flag |
|
Scene entity contained in this node |
|
Bounding volume for subtree rooted at this node |
|
Flag indicating bounding volume needs remerging |
|
Internal flag for indicating we should ignore requests for volume update |
|
Flag indicating parent node should ignore this node when calculating bounding volume |
|
Active flag |
|
Frame counter (at 500 frames per second, can be active ~100 days continously before loop, and then it will just skip one frame -> safe enough) |
|
Last frame count we were rendered |
|
Flag indicating we need to update world relative SRT information |
|
Total scaling relative world (cached) |
|
Total rotation relative world (cached) |
|
Total translation relative world (cached) |
|
Child nodes |
|
Parent node |
|
Name |
|
Total transformation matrix relative world (cached) |
|
Total inverse transformation matrix relative world (cached) |
|
Uniform scaling factor (must be >0, default 1) |
|
Rotation |
|
Translation |