Wrapper class for managing particles through SEffectManager. More...
Private Member Functions | |
EffectType | |
Information about what type of effect the Effect is, without the need for casting | |
override EffectType | GetEffectType () |
Get what type of effect the Effect is. | |
override bool | IsParticle () |
Check whether the Effect is EffectParticle without casting. | |
Main particle | |
Set or get the main particle which this Effect will manage | |
void | SetParticle (Particle p) |
Sets the main particle which this Effect will manage. | |
Particle | GetParticle () |
Gets the main particle which this Effect is managing. | |
Playback | |
Methods to Play/Stop Effect Generally, SEffectManager.Play methods are used instead of Start | |
override void | Start () |
Plays all elements this effect consists of. | |
override void | Stop () |
Stops all elements this effect consists of. | |
Attach | |
Helper methods for attaching to prent | |
void | AttachTo (Object obj, vector local_pos="0 0 0", vector local_ori="0 0 0", bool force_rotation_to_world=false) |
Read Particle.AddAsChild. | |
void | ReAttach () |
Helper method to attach to parent using stored settings. | |
protected void | AddAsChild (Object obj, vector local_pos, vector local_ori, bool force_rotation_to_world) |
Helper method to attach to parent. | |
Events | |
Various events that can be overriden for custom behaviour | |
void | Event_OnPlayStart () |
Event which just simply exists (DEPRECATED) | |
void | Event_OnPlayStarted () |
Event which just simply exists (DEPRECATED) | |
Generic API | |
Setters and getters for generic data and properties | |
void | SetParticleID (int id) |
Sets the id of the particle to be used. | |
int | GetParticleID () |
Gets the id of the particle to be used. | |
void | SetCurrentParticleID (int id) |
Sets the id of the particle to be used. | |
int | GetCurrentParticleID () |
Gets the current id of the managed Particle. | |
override void | SetCurrentParent (Object parent_obj, bool updateCached=true) |
Set current parent of the managed Particle. | |
override Object | GetCurrentParent () |
Get the current parent of the managed Particle. | |
override void | SetCurrentPosition (vector pos, bool updateCached=true) |
Set the current world position of the managed Particle. | |
override vector | GetCurrentPosition () |
Get the current world position of the managed Particle. | |
override void | SetCurrentLocalPosition (vector pos, bool updateCached=true) |
Set the current local position of the managed Particle. | |
override vector | GetCurrentLocalPosition () |
Get the current local position of the managed Particle. | |
void | SetOrientation (vector ori) |
Set orientation of the EffectParticle. | |
vector | GetOrientation () |
Get the orientation of the EffectParticle. | |
void | SetCurrentOrientation (vector ori, bool updateCached=true) |
Set the current orientation of the managed Particle. | |
vector | GetCurrentOrientation () |
Get the current orientation of the managed Particle. | |
void | ForceParticleRotationRelativeToWorld (bool state) |
Set orientation setting to be used by the effect when the Effect starts. | |
bool | IsParticleRotationRelativeToWorld () |
Get the orientation setting to be used by the effect when the Effect starts. | |
bool | IsParticleCurrentRotationRelativeToWorld () |
Get the current orientation setting to be used by the managed Particle. | |
Private Attributes | |
protected Particle | m_ParticleObj |
The main Particle effect that this Effect wrapper manages. | |
Generic data | |
Generic data for the particle | |
protected int | m_ParticleID |
The ID in the ParticleList to create Particle from. | |
protected vector | m_Orientation |
Orientation set by SetOrientation. | |
protected bool | m_ForceRotationRelativeToWorld |
Orientation setting to be used by the effect when the Effect starts. | |
DEPRECATED | |
Methods which exist for backwards compatibility and are no longer in use or have never been in use | |
protected vector | m_ParticleOrientation |
protected Object | m_Object |
void | EffectParticle () |
ctor | |
void | ~EffectParticle () |
dtor | |
override void | InitEffect () |
init | |
override string | GetDebugName () |
Override when getting debug information. | |
override void | ValidateStart () |
Validation whether an effect truly started playing or if the Effect should stop as none is present. | |
void | CheckLifeSpan () |
Was never called and probably should never be called. | |
void | SetDecalOwner (Object o) |
Wrapper class for managing particles through SEffectManager.
|
inlineprivate |
ctor
|
inlineprivate |
dtor
|
inlineprivate |
Helper method to attach to parent.
References Particle::AddAsChild(), and GetParticle().
Referenced by AttachTo(), and ReAttach().
|
inlineprivate |
Read Particle.AddAsChild.
References AddAsChild(), ForceParticleRotationRelativeToWorld(), SetAttachedLocalOri(), SetLocalPosition(), and SetParent().
|
inlineprivate |
Was never called and probably should never be called.
|
inlineprivate |
Event which just simply exists (DEPRECATED)
|
inlineprivate |
Event which just simply exists (DEPRECATED)
|
inlineprivate |
Set orientation setting to be used by the effect when the Effect starts.
state | bool Whether to keep WS orientation when attaching it to parent |
References m_ForceRotationRelativeToWorld.
Referenced by AttachTo(), and SEffectManager::PlayOnObject().
|
inlineprivate |
Get the current local position of the managed Particle.
vector
The current local position of the managed Particle References GetParent(), and GetParticle().
|
inlineprivate |
Get the current orientation of the managed Particle.
vector
The current orientation of the managed Particle References GetParticle(), and vector::Zero.
|
inlineprivate |
Get the current parent of the managed Particle.
References GetParticle().
|
inlineprivate |
Gets the current id of the managed Particle.
int
Particle ID registered in ParticleList References GetParticle(), Particle::GetParticleID(), and ParticleList::INVALID.
|
inlineprivate |
Get the current world position of the managed Particle.
vector
The current world position of the managed Particle References GetParticle().
|
inlineprivate |
Override when getting debug information.
References string::Format(), GetParticle(), and m_ParticleID.
|
inlineprivate |
Get what type of effect the Effect is.
EffectType
What type of effect the Effect is
|
inlineprivate |
Get the orientation of the EffectParticle.
vector
The orientation of EffectParticle References m_Orientation.
Referenced by Start().
|
inlineprivate |
Gets the main particle which this Effect is managing.
Particle
Main particle which this Effect is managing References m_ParticleObj.
Referenced by AddAsChild(), Hit_MeatBones::BloodSplatGround(), BoatScript::ClearWaterEffects(), CreateParticle(), DrawDebugShape(), EffEngineSmoke::Event_OnFrameUpdate(), GetCurrentLocalPosition(), GetCurrentOrientation(), GetCurrentParent(), GetCurrentParticleID(), GetCurrentPosition(), GetDebugName(), IsParticleCurrentRotationRelativeToWorld(), IsParticleRotationRelativeToWorld(), ManBase::OnParticleEvent(), SetCurrentLocalPosition(), SetCurrentOrientation(), SetCurrentParticleID(), SetCurrentPosition(), BleedingSourcesManagerBase::SetDiag(), EffExhaustSmoke::SetParticleStateLight(), Stop(), Update(), EffectBoatWaterBack::Update(), EffCoolantSteam::UpdateParticle(), and ValidateStart().
|
inlineprivate |
Gets the id of the particle to be used.
int
Particle ID registered in ParticleList References m_ParticleID.
|
inlineprivate |
init
References Event_OnEffectEnded, Event_OnStopped, and ScriptInvoker::Remove().
|
inlineprivate |
Check whether the Effect is EffectParticle without casting.
bool
Whether the Effect is EffectParticle
|
inlineprivate |
Get the current orientation setting to be used by the managed Particle.
bool
Whether the managed Particle is only updating position from parent References GetParticle().
|
inlineprivate |
Get the orientation setting to be used by the effect when the Effect starts.
bool
Whether to keep WS orientation when attaching it to parent References GetParticle(), and m_ForceRotationRelativeToWorld.
Referenced by ReAttach(), and Start().
|
inlineprivate |
Helper method to attach to parent using stored settings.
References AddAsChild(), GetAttachedLocalOri(), GetLocalPosition(), GetParent(), and IsParticleRotationRelativeToWorld().
Referenced by SetCurrentLocalPosition(), and SetCurrentParent().
Set the current local position of the managed Particle.
pos | vector The current local position for the managed Particle |
updateCached | bool Whether to update the cached variable |
References GetParent(), GetParticle(), and ReAttach().
Referenced by EOnPostSimulate(), and EffectBoatWaterBase::UpdatePosToSeaLevel().
Set the current orientation of the managed Particle.
ori | vector Orientation in degrees (yaw, pitch, roll) |
References GetParticle(), and SetOrientation().
Set current parent of the managed Particle.
parent_obj | Object The parent for the Particle |
updateCached | bool Whether to update the cached variable |
References ReAttach().
|
inlineprivate |
Sets the id of the particle to be used.
id | int Particle ID registered in ParticleList |
References GetParticle(), m_ParticleID, and Particle::SetSource().
Set the current world position of the managed Particle.
pos | vector The current world position for the Particle |
updateCached | bool Whether to update the cached variable |
References GetParticle().
|
inlineprivate |
References m_Object.
Referenced by ManBase::OnParticleEvent().
|
inlineprivate |
Set orientation of the EffectParticle.
ori | vector Orientation in degrees (yaw, pitch, roll) |
References m_Orientation.
Referenced by SetCurrentOrientation().
|
inlineprivate |
Sets the main particle which this Effect will manage.
p | Particle Main particle which this Effect will manage |
References Event_OnEffectEnded, Event_OnEffectStarted, ParticleEvents::Event_OnParticleStart, ParticleEvents::Event_OnParticleStop, ScriptInvoker::Insert(), m_ParticleObj, and ScriptInvoker::Remove().
Referenced by EffBulletImpactBase::Event_OnStarted(), Start(), and Stop().
|
inlineprivate |
Sets the id of the particle to be used.
id | int Particle ID registered in ParticleList |
References m_ParticleID.
Referenced by BleedingSourceEffect::BleedingSourceEffect(), BleedingSourceEffect(), BloodSplatter::BloodSplatter(), EffBreathVapourHeavy::EffBreathVapourHeavy(), EffBreathVapourLight::EffBreathVapourLight(), EffBreathVapourMedium::EffBreathVapourMedium(), EffBulletImpactTest::EffBulletImpactTest(), EffGeneratorSmoke::EffGeneratorSmoke(), EffSwarmingFlies::EffSwarmingFlies(), EffVomit::EffVomit(), EffVomitBlood::EffVomitBlood(), LandmineExplosion::LandmineExplosion(), MenuCarEngineSmoke::MenuCarEngineSmoke(), MenuEvaporation::MenuEvaporation(), SetParticle(), EffVehicleSmoke::SetParticleState(), EffectBoatWaterBase::SetParticleState(), and EffWheelSmoke::SetParticleState().
|
inlineprivate |
Plays all elements this effect consists of.
References GetAttachedLocalOri(), GetLocalPosition(), GetOrientation(), GetParent(), GetPosition, IsParticleRotationRelativeToWorld(), m_ParentObject, m_ParticleID, ParticleManager(), and SetParticle().
Referenced by EOnPostSimulate(), SetParticle(), EffVehicleSmoke::SetParticleState(), EffectBoatWaterBase::SetParticleState(), EffWheelSmoke::SetParticleState(), and EffectBoatWaterBase::Update().
|
inlineprivate |
Stops all elements this effect consists of.
References GetParticle(), SetParticle(), and Particle::Stop().
Referenced by BoatScript::CleanupEffects(), BoatScript::ClearWaterEffects(), EOnPostSimulate(), SetParticle(), EffVehicleSmoke::SetParticleState(), EffectBoatWaterBase::SetParticleState(), EffWheelSmoke::SetParticleState(), EffWheelSmoke::SetSurface(), Update(), EffectBoatWaterBack::Update(), and ValidateStart().
|
inlineprivate |
Validation whether an effect truly started playing or if the Effect should stop as none is present.
References GetParticle(), and Stop().
|
private |
Orientation setting to be used by the effect when the Effect starts.
Referenced by ForceParticleRotationRelativeToWorld(), and IsParticleRotationRelativeToWorld().
|
private |
Referenced by SetDecalOwner().
|
private |
Orientation set by SetOrientation.
Referenced by GetOrientation(), and SetOrientation().
|
private |
The ID in the ParticleList to create Particle from.
Referenced by GetDebugName(), GetParticleID(), SetCurrentParticleID(), SetParticleID(), EffWheelSmoke::SetSurface(), and Start().
|
private |
The main Particle effect that this Effect wrapper manages.
Referenced by GetParticle(), and SetParticle().
|
private |