Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
EffectParticle Class Reference

Wrapper class for managing particles through SEffectManager. More...

Inheritance diagram for EffectParticle:
BleedingSourceEffect BloodSplatter EffBreathVapourHeavy EffBreathVapourLight EffBreathVapourMedium EffBulletImpactBase EffBulletImpactTest EffGeneratorSmoke EffSwarmingFlies EffVehicleSmoke EffVomit EffVomitBlood EffWheelSmoke EffectBoatWaterBase LandmineExplosion MenuCarEngineSmoke MenuEvaporation

Protected 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.
 
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.
 

Protected Attributes

Particle m_ParticleObj
 The main Particle effect that this Effect wrapper manages.
 
Generic data

Generic data for the particle

int m_ParticleID
 The ID in the ParticleList to create Particle from.
 
vector m_Orientation
 Orientation set by SetOrientation.
 
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

vector m_ParticleOrientation
 
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)
 

Detailed Description

Wrapper class for managing particles through SEffectManager.

Definition at line 4 of file effectparticle.c.

Constructor & Destructor Documentation

◆ EffectParticle()

void EffectParticle::EffectParticle ( )
protected

ctor

Definition at line 34 of file effectparticle.c.

◆ ~EffectParticle()

void EffectParticle::~EffectParticle ( )
protected

dtor

Definition at line 42 of file effectparticle.c.

Member Function Documentation

◆ AddAsChild()

void EffectParticle::AddAsChild ( Object obj,
vector local_pos,
vector local_ori,
bool force_rotation_to_world )
protected

Helper method to attach to parent.

Definition at line 251 of file effectparticle.c.

◆ AttachTo()

void EffectParticle::AttachTo ( Object obj,
vector local_pos = "0 0 0",
vector local_ori = "0 0 0",
bool force_rotation_to_world = false )
protected

Read Particle.AddAsChild.

Definition at line 227 of file effectparticle.c.

◆ CheckLifeSpan()

void EffectParticle::CheckLifeSpan ( )
protected

Was never called and probably should never be called.

Warning
Emptied the functionality as it is relatively unsafe...

Definition at line 550 of file effectparticle.c.

◆ Event_OnPlayStart()

void EffectParticle::Event_OnPlayStart ( )
protected

Event which just simply exists (DEPRECATED)

Warning
Never called or used
Note
Use Event_OnStarted instead

Definition at line 274 of file effectparticle.c.

◆ Event_OnPlayStarted()

void EffectParticle::Event_OnPlayStarted ( )
protected

Event which just simply exists (DEPRECATED)

Warning
Never called or used
Note
Use Event_OnStarted instead

Definition at line 284 of file effectparticle.c.

◆ ForceParticleRotationRelativeToWorld()

void EffectParticle::ForceParticleRotationRelativeToWorld ( bool state)
protected

Set orientation setting to be used by the effect when the Effect starts.

Warning
Only caches it into a variable to be used by Start, does not live update when called afterwards
Note
There is no way to update this immediately
Parameters
statebool Whether to keep WS orientation when attaching it to parent

Definition at line 503 of file effectparticle.c.

◆ GetCurrentLocalPosition()

override vector EffectParticle::GetCurrentLocalPosition ( )
protected

Get the current local position of the managed Particle.

Returns
vector The current local position of the managed Particle

Definition at line 431 of file effectparticle.c.

◆ GetCurrentOrientation()

vector EffectParticle::GetCurrentOrientation ( )
protected

Get the current orientation of the managed Particle.

Returns
vector The current orientation of the managed Particle

Definition at line 487 of file effectparticle.c.

◆ GetCurrentParent()

override Object EffectParticle::GetCurrentParent ( )
protected

Get the current parent of the managed Particle.

Returns
Object The currrent parent of the Particle

Definition at line 367 of file effectparticle.c.

◆ GetCurrentParticleID()

int EffectParticle::GetCurrentParticleID ( )
protected

Gets the current id of the managed Particle.

Returns
int Particle ID registered in ParticleList

Definition at line 338 of file effectparticle.c.

◆ GetCurrentPosition()

override vector EffectParticle::GetCurrentPosition ( )
protected

Get the current world position of the managed Particle.

Returns
vector The current world position of the managed Particle

Definition at line 396 of file effectparticle.c.

◆ GetDebugName()

override string EffectParticle::GetDebugName ( )
protected

Override when getting debug information.

Definition at line 67 of file effectparticle.c.

◆ GetEffectType()

override EffectType EffectParticle::GetEffectType ( )
protected

Get what type of effect the Effect is.

Returns
EffectType What type of effect the Effect is

Definition at line 107 of file effectparticle.c.

◆ GetOrientation()

vector EffectParticle::GetOrientation ( )
protected

Get the orientation of the EffectParticle.

Warning
Only gets the cached variable, for immediate effect use GetCurrent variant
Returns
vector The orientation of EffectParticle

Definition at line 463 of file effectparticle.c.

◆ GetParticle()

Particle EffectParticle::GetParticle ( )
protected

Gets the main particle which this Effect is managing.

Returns
Particle Main particle which this Effect is managing

Definition at line 162 of file effectparticle.c.

◆ GetParticleID()

int EffectParticle::GetParticleID ( )
protected

Gets the id of the particle to be used.

Warning
Only gets the cached variable, for immediate effect use GetCurrent variant
Returns
int Particle ID registered in ParticleList

Definition at line 313 of file effectparticle.c.

◆ InitEffect()

override void EffectParticle::InitEffect ( )
protected

init

Definition at line 50 of file effectparticle.c.

◆ IsParticle()

override bool EffectParticle::IsParticle ( )
protected

Check whether the Effect is EffectParticle without casting.

Returns
bool Whether the Effect is EffectParticle

Definition at line 116 of file effectparticle.c.

◆ IsParticleCurrentRotationRelativeToWorld()

bool EffectParticle::IsParticleCurrentRotationRelativeToWorld ( )
protected

Get the current orientation setting to be used by the managed Particle.

Returns
bool Whether the managed Particle is only updating position from parent

Definition at line 527 of file effectparticle.c.

◆ IsParticleRotationRelativeToWorld()

bool EffectParticle::IsParticleRotationRelativeToWorld ( )
protected

Get the orientation setting to be used by the effect when the Effect starts.

Warning
Only gets the cached variable, for immediate effect use IsParticleCurrentRotationRelativeToWorld
Returns
bool Whether to keep WS orientation when attaching it to parent

Definition at line 513 of file effectparticle.c.

◆ ReAttach()

void EffectParticle::ReAttach ( )
protected

Helper method to attach to parent using stored settings.

Definition at line 242 of file effectparticle.c.

◆ SetCurrentLocalPosition()

override void EffectParticle::SetCurrentLocalPosition ( vector pos,
bool updateCached = true )
protected

Set the current local position of the managed Particle.

Parameters
posvector The current local position for the managed Particle
updateCachedbool Whether to update the cached variable

Definition at line 411 of file effectparticle.c.

◆ SetCurrentOrientation()

void EffectParticle::SetCurrentOrientation ( vector ori,
bool updateCached = true )
protected

Set the current orientation of the managed Particle.

Parameters
orivector Orientation in degrees (yaw, pitch, roll)

Definition at line 472 of file effectparticle.c.

◆ SetCurrentParent()

override void EffectParticle::SetCurrentParent ( Object parent_obj,
bool updateCached = true )
protected

Set current parent of the managed Particle.

Parameters
parent_objObject The parent for the Particle
updateCachedbool Whether to update the cached variable

Definition at line 356 of file effectparticle.c.

◆ SetCurrentParticleID()

void EffectParticle::SetCurrentParticleID ( int id)
protected

Sets the id of the particle to be used.

Note
Particle will not update immediately, but ParticleSource will
Parameters
idint Particle ID registered in ParticleList

Definition at line 323 of file effectparticle.c.

◆ SetCurrentPosition()

override void EffectParticle::SetCurrentPosition ( vector pos,
bool updateCached = true )
protected

Set the current world position of the managed Particle.

Parameters
posvector The current world position for the Particle
updateCachedbool Whether to update the cached variable

Definition at line 382 of file effectparticle.c.

◆ SetDecalOwner()

void EffectParticle::SetDecalOwner ( Object o)
protected

Definition at line 562 of file effectparticle.c.

◆ SetOrientation()

void EffectParticle::SetOrientation ( vector ori)
protected

Set orientation of the EffectParticle.

Warning
Only sets the cached variable, for immediate effect use SetCurrent variant
Parameters
orivector Orientation in degrees (yaw, pitch, roll)

Definition at line 453 of file effectparticle.c.

◆ SetParticle()

void EffectParticle::SetParticle ( Particle p)
protected

Sets the main particle which this Effect will manage.

Parameters
pParticle Main particle which this Effect will manage

Definition at line 134 of file effectparticle.c.

◆ SetParticleID()

void EffectParticle::SetParticleID ( int id)
protected

Sets the id of the particle to be used.

Note
Only changes the cached variable, for immediate, use SetCurrentParticleID
Parameters
idint Particle ID registered in ParticleList

Definition at line 303 of file effectparticle.c.

◆ Start()

override void EffectParticle::Start ( )
protected

Plays all elements this effect consists of.

Note
Is called by SEffectManager.Play methods

Definition at line 181 of file effectparticle.c.

◆ Stop()

override void EffectParticle::Stop ( )
protected

Stops all elements this effect consists of.

Note
Alternatively use SEffectManager.Stop( effect_id )

Definition at line 204 of file effectparticle.c.

◆ ValidateStart()

override void EffectParticle::ValidateStart ( )
protected

Validation whether an effect truly started playing or if the Effect should stop as none is present.

Note
Override this when inheriting to create own validation check
Is called from Event_OnStarted invoker after Event_OnStarted has been performed

Definition at line 87 of file effectparticle.c.

Member Data Documentation

◆ m_ForceRotationRelativeToWorld

bool EffectParticle::m_ForceRotationRelativeToWorld
protected

Orientation setting to be used by the effect when the Effect starts.

Definition at line 18 of file effectparticle.c.

◆ m_Object

Object EffectParticle::m_Object
protected

Definition at line 26 of file effectparticle.c.

◆ m_Orientation

vector EffectParticle::m_Orientation
protected

Orientation set by SetOrientation.

Definition at line 16 of file effectparticle.c.

◆ m_ParticleID

int EffectParticle::m_ParticleID
protected

The ID in the ParticleList to create Particle from.

Definition at line 14 of file effectparticle.c.

◆ m_ParticleObj

Particle EffectParticle::m_ParticleObj
protected

The main Particle effect that this Effect wrapper manages.

Definition at line 7 of file effectparticle.c.

◆ m_ParticleOrientation

vector EffectParticle::m_ParticleOrientation
protected

Definition at line 25 of file effectparticle.c.


The documentation for this class was generated from the following file: