IParticleEffect

#include

Inherits _i_reference_target_t.

Inherited by pfx2::IParticleEffectPfx2.

Public Types

enum ECheckOptions { eCheckChildren = 1, eCheckConfig = 2, eCheckFeatures = 4 }
Determines if the effect is enabled.
typedef ::ParticleLoc ParticleLoc

Public Member Functions

virtual int GetVersion () const =0
virtual void GetMemoryUsage (ICrySizer *pSizer) const =0
virtual struct IParticleEmitter * Spawn (const ParticleLoc &loc, const SpawnParams *pSpawnParams=NULL)=0
IParticleEmitter * Spawn (const ParticleLoc &loc, const SpawnParams &sp)
Compatibility versions.
IParticleEmitter * Spawn (bool bIndependent, const ParticleLoc &loc)
virtual void SetName (cstr sFullName)=0
virtual cstr GetName () const =0
virtual stack_string GetFullName () const =0
virtual void SetEnabled (bool bEnabled)=0
virtual bool IsEnabled (uint options=0) const =0
virtual bool IsTemporary () const =0
Returns true if this is a run-time only unsaved effect.
virtual void SetParticleParams (const ParticleParams &params)=0
Sets the particle parameters.
virtual const ParticleParams & GetParticleParams () const =0
virtual const ParticleParams & GetDefaultParams () const =0
Get the set of ParticleParams used as the default for this effect, for serialization, display, etc.
virtual int GetChildCount () const =0
Child particle systems. More...
virtual IParticleEffect * GetChild (int index) const =0
virtual void ClearChilds ()=0
Removes all child particles.
virtual void InsertChild (int slot, IParticleEffect *pEffect)=0
virtual int FindChild (IParticleEffect *pEffect) const =0
virtual void SetParent (IParticleEffect *pParent)=0
virtual IParticleEffect * GetParent () const =0
virtual bool LoadResources ()=0
virtual void UnloadResources ()=0
Unloads all resources previously loaded.
virtual void Serialize (XmlNodeRef node, bool bLoading, bool bChildren)=0
virtual void Serialize (Serialization::IArchive &ar)=0
virtual void Reload (bool bChildren)=0

Detailed Description

Interface to control a particle effect. This interface is used by I3DEngine::CreateParticleEffect to control a particle effect. It is created by CreateParticleEffect method of 3d engine.

Member Function Documentation

◆ FindChild()

virtual int IParticleEffect::FindChild ( IParticleEffect * pEffect) const
pure virtual

Finds in which slot a child particle effect is stored.

Parameters
pEffectPointer to the child particle effect.
Returns
Integer representing the slot number or -1 if the slot is not found.

◆ GetChild()

virtual IParticleEffect* IParticleEffect::GetChild ( int index) const
pure virtual

Get sub Particle's child by index.

Parameters
indexThe index of a particle child.
Returns
A pointer to a IParticleEffect derived object.

◆ GetChildCount()

virtual int IParticleEffect::GetChildCount ( ) const
pure virtual

Child particle systems.

Gets the number of sub particles children.

Returns
An integer representing the amount of sub particles children

◆ GetFullName()

virtual stack_string IParticleEffect::GetFullName ( ) const
pure virtual

Gets the name of this particle effect.

Returns
A stack_string which holds the fully qualified name of this effect, with all parents and library.

◆ GetName()

virtual cstr IParticleEffect::GetName ( ) const
pure virtual

Gets the name of this particle effect.

Returns
A C-string which holds the minimally qualified name of this effect.
Note
For top level effects, the return value includes library.group qualifier.
For child effects, the return value includes only the base name.

◆ GetParent()

virtual IParticleEffect* IParticleEffect::GetParent ( ) const
pure virtual

Gets the particles effect parent, if any.

Returns
Pointer representing the particles effect parent.

◆ GetParticleParams()

virtual const ParticleParams& IParticleEffect::GetParticleParams ( ) const
pure virtual

Gets the particle parameters.

Returns
An object of the type ParticleParams which contains several parameters.

◆ InsertChild()

virtual void IParticleEffect::InsertChild ( int slot,
IParticleEffect * pEffect
)
pure virtual

Inserts a child particle effect at a precise slot.

Parameters
slotIntegervalue which specify the desired slot.
pEffectPointer to the particle effect to insert.

◆ LoadResources()

virtual bool IParticleEffect::LoadResources ( )
pure virtual

Loads all resources needed for a particle effects.

Returns
true if any resources loaded.

◆ Reload()

virtual void IParticleEffect::Reload ( bool bChildren)
pure virtual

Reloads the effect from the particle database.

Parameters
bChildrenWhen true, also recursively reloads effect children.

◆ Serialize()

virtual void IParticleEffect::Serialize ( XmlNodeRef node,
bool bLoading,
bool bChildren
)
pure virtual

Serializes particle effect to/from XML.

Parameters
bLoadingtrue when loading, false for saving.
bChildrenWhen true, also recursively serializes effect children.

◆ SetEnabled()

virtual void IParticleEffect::SetEnabled ( bool bEnabled)
pure virtual

Enables or disables the effect.

Parameters
bEnabledSet to true to enable the effect or to false to disable it.

◆ SetName()

virtual void IParticleEffect::SetName ( cstr sFullName)
pure virtual

Sets a new name to this particle effect.

Parameters
sFullNameFull name of this effect, including library and group qualifiers.

◆ SetParent()

virtual void IParticleEffect::SetParent ( IParticleEffect * pParent)
pure virtual

Remove effect from current parent, and set new parent.

Parameters
pParentNew parent, may be 0.

◆ Spawn() [1/2]

virtual struct IParticleEmitter* IParticleEffect::Spawn ( const ParticleLoc & loc,
const SpawnParams * pSpawnParams = NULL
)
pure virtual

Spawns this effect.

Parameters
qLocWorld location to place emitter.
SpawnParamsEmitter flags and options.
Returns
Spawned emitter, or 0 if unable.

◆ Spawn() [2/2]

IParticleEmitter* IParticleEffect::Spawn ( bool bIndependent,
const ParticleLoc & loc
)
inline

Spawn a particle at the specified location.

Parameters
bIndependentDeprecated: auto-serialization now occurs when external reference count = 0.