Drag[en]gine Game Engine  1.0
deParticleEmitterType Class Reference

Particle emitter type. More...

#include <deParticleEmitterType.h>

Public Types

enum  eCastFrom { ecfVertex, ecfFace, ecfVolume }
 What model element to cast particles from. More...
 
enum  eCollisionResponses { ecrDestroy, ecrPhysical, ecrCustom }
 Collision response. More...
 
enum  eEmitControllers {
  eecLifetime, eecMass, eecLinearVelocity, eecAngularVelocity,
  EEC_COUNT
}
 Emit controllers. More...
 
enum  eParameters {
  epTimeToLive, epInterval, epParticleCount, epCastAngleX,
  epCastAngleY, epSize, epRed, epGreen,
  epBlue, epTransparency, epEmissivity, epMass,
  epRotation, epLinearVelocity, epAngularVelocity, epBrownMotion,
  epDamping, epDrag, epGravityX, epGravityY,
  epGravityZ, epLocalGravity, epForceFieldDirect, epForceFieldSurface,
  epForceFieldMass, epForceFieldSpeed, epElasticity, epRoughness,
  epEmitDirection, epBeamStart, epBeamEnd, EP_COUNT
}
 Particle parameters. More...
 
enum  eSimulationTypes { estParticle, estRibbon, estBeam }
 Simulation type. More...
 

Public Member Functions

Constructors and Destructors
 deParticleEmitterType ()
 Create particle emitter type. More...
 
 ~deParticleEmitterType ()
 Clean up particle emitter type. More...
 
Management
deSkinGetSkin () const
 Skin. More...
 
void SetSkin (deSkin *skin)
 Set skin. More...
 
deModelGetModel () const
 Model used for casting or NULL. More...
 
void SetModel (deModel *model)
 Set model used for casting or NULL. More...
 
deSkinGetModelSkin () const
 Skin for the model used for casting or NULL. More...
 
void SetModelSkin (deSkin *skin)
 Set skin for the model used for casting or NULL. More...
 
eCastFrom GetCastFrom () const
 What part of the model to cast particles from. More...
 
void SetCastFrom (eCastFrom castFrom)
 Set what part of the model to cast particles from. More...
 
eSimulationTypes GetSimulationType () const
 Simulation type. More...
 
void SetSimulationType (eSimulationTypes simulationType)
 Set simulation type. More...
 
bool GetIntervalAsDistance () const
 Interval parameter is used as distance not time. More...
 
void SetIntervalAsDistance (bool intervalAsDistance)
 Set if interval parameter is used as distance not time. More...
 
deParticleEmitterGetTrailEmitter () const
 Particle emitter for trails behind particles or NULL. More...
 
void SetTrailEmitter (deParticleEmitter *emitter)
 Set particle emitter for trails behind particles or NULL. More...
 
int GetTrailController (eEmitControllers controller) const
 Trail controller index or -1 if not set. More...
 
void SetTrailController (eEmitControllers controller, int targetController)
 Set trail controller index or -1 if not set. More...
 
float GetPhysicsSize () const
 Physics size. More...
 
void SetPhysicsSize (float size)
 Set physics size. More...
 
eCollisionResponses GetCollisionResponse () const
 Collision response. More...
 
void SetCollisionResponse (eCollisionResponses response)
 Set collision response. More...
 
deParticleEmitterGetCollisionEmitter () const
 Particle emitter for colliding particles or NULL. More...
 
void SetCollisionEmitter (deParticleEmitter *emitter)
 Set particle emitter for colliding particles or NULL. More...
 
float GetEmitMinImpulse () const
 Minimum impulse required for colliding particles to emit instances. More...
 
void SetEmitMinImpulse (float impulse)
 Set minimum impulse required for colliding particles to emit instances. More...
 
int GetEmitController (eEmitControllers controller) const
 Emit controller index or -1 if not set. More...
 
void SetEmitController (eEmitControllers controller, int targetController)
 Set emit controller index or -1 if not set. More...
 
float GetMaxLinearVelocity () const
 Maximum linear velocity for mapping as requested by the graphic module. More...
 
void SetMaxLinearVelocity (float maxLinearVelocity)
 Set maximum linear velocity for mapping as requested by the graphic module. More...
 
float GetMaxAngularVelocity () const
 Maximum angular velocity for mapping as requested by the graphic module. More...
 
void SetMaxAngularVelocity (float maxAngularVelocity)
 Set maximum angular velocity for mapping as requested by the graphic module. More...
 
bool GetSquareVelocities () const
 Velocities have to be squared as requested by the graphic module. More...
 
void SetSquareVelocities (bool squareVelocities)
 Set if velocities have to be squared as requested by the graphic module. More...
 
deParticleEmitterParameterGetParameter (eParameters parameter)
 Parameter. More...
 
const deParticleEmitterParameterGetParameter (eParameters parameter) const
 

Detailed Description

Particle emitter type.

Defines the properties and behavior of particles of the same type. Each particle type has its own collision behavior. If the destroy on collision parameter is set particles are destroyed hitting solid surfaces. Otherwise they bounce of solid surfaces according to physical laws. If a collision particle emitter is set new instances of this particle emitter are created whenever particles collide with solid surfaces no matter if they are destroyed or bounce. To avoid spamming instances in the case particles are not destroyed upon colliding a minimal collision impulse is required for instances to be created. Furthermore for the impact some parameters can be assigned controllers. Upon creating an instance the specified controllers will be set to the values of the colliding particle. The emission direction is controlled using a blending factor. At 0 the emission direction matches the collision normal. At 1 the emission direction matches the deflection direction. The deflection direction is the direction the particle bounces off the surface if it is not set to be destroyed. Values in between blend linear between these two directions. The default value is 0 hence along the collision normal.

Member Enumeration Documentation

◆ eCastFrom

What model element to cast particles from.

Enumerator
ecfVertex 

Cast from model vertices.

ecfFace 

Cast from model faces.

ecfVolume 

Cast from model volumes.

◆ eCollisionResponses

Collision response.

Enumerator
ecrDestroy 

Destroy on collision.

ecrPhysical 

Physical collision response.

ecrCustom 

Custom collision response.

◆ eEmitControllers

Emit controllers.

Enumerator
eecLifetime 
eecMass 
eecLinearVelocity 
eecAngularVelocity 
EEC_COUNT 

◆ eParameters

Particle parameters.

Enumerator
epTimeToLive 
epInterval 
epParticleCount 
epCastAngleX 
epCastAngleY 
epSize 
epRed 
epGreen 
epBlue 
epTransparency 
epEmissivity 
epMass 
epRotation 
epLinearVelocity 
epAngularVelocity 
epBrownMotion 
epDamping 
epDrag 
epGravityX 
epGravityY 
epGravityZ 
epLocalGravity 
epForceFieldDirect 
epForceFieldSurface 
epForceFieldMass 
epForceFieldSpeed 
epElasticity 
epRoughness 
epEmitDirection 
epBeamStart 
epBeamEnd 
EP_COUNT 

◆ eSimulationTypes

Simulation type.

Enumerator
estParticle 

Particle simulation.

estRibbon 

Ribbon simulation.

estBeam 

Beam simulation.

Constructor & Destructor Documentation

◆ deParticleEmitterType()

deParticleEmitterType::deParticleEmitterType ( )

Create particle emitter type.

◆ ~deParticleEmitterType()

deParticleEmitterType::~deParticleEmitterType ( )

Clean up particle emitter type.

Member Function Documentation

◆ GetCastFrom()

eCastFrom deParticleEmitterType::GetCastFrom ( ) const
inline

What part of the model to cast particles from.

References SetCastFrom().

◆ GetCollisionEmitter()

deParticleEmitter* deParticleEmitterType::GetCollisionEmitter ( ) const
inline

Particle emitter for colliding particles or NULL.

References SetCollisionEmitter().

◆ GetCollisionResponse()

eCollisionResponses deParticleEmitterType::GetCollisionResponse ( ) const
inline

Collision response.

References SetCollisionResponse().

◆ GetEmitController()

int deParticleEmitterType::GetEmitController ( eEmitControllers  controller) const

Emit controller index or -1 if not set.

Referenced by GetEmitMinImpulse().

◆ GetEmitMinImpulse()

float deParticleEmitterType::GetEmitMinImpulse ( ) const
inline

Minimum impulse required for colliding particles to emit instances.

References GetEmitController(), SetEmitController(), and SetEmitMinImpulse().

◆ GetIntervalAsDistance()

bool deParticleEmitterType::GetIntervalAsDistance ( ) const
inline

Interval parameter is used as distance not time.

References SetIntervalAsDistance().

◆ GetMaxAngularVelocity()

float deParticleEmitterType::GetMaxAngularVelocity ( ) const
inline

Maximum angular velocity for mapping as requested by the graphic module.

References SetMaxAngularVelocity().

◆ GetMaxLinearVelocity()

float deParticleEmitterType::GetMaxLinearVelocity ( ) const
inline

Maximum linear velocity for mapping as requested by the graphic module.

References SetMaxLinearVelocity().

◆ GetModel()

deModel* deParticleEmitterType::GetModel ( ) const
inline

Model used for casting or NULL.

References SetModel().

◆ GetModelSkin()

deSkin* deParticleEmitterType::GetModelSkin ( ) const
inline

Skin for the model used for casting or NULL.

References SetModelSkin().

◆ GetParameter() [1/2]

deParticleEmitterParameter& deParticleEmitterType::GetParameter ( eParameters  parameter)

Parameter.

Referenced by GetSquareVelocities().

◆ GetParameter() [2/2]

const deParticleEmitterParameter& deParticleEmitterType::GetParameter ( eParameters  parameter) const

◆ GetPhysicsSize()

float deParticleEmitterType::GetPhysicsSize ( ) const
inline

Physics size.

References SetPhysicsSize().

◆ GetSimulationType()

eSimulationTypes deParticleEmitterType::GetSimulationType ( ) const
inline

Simulation type.

References SetSimulationType().

◆ GetSkin()

deSkin* deParticleEmitterType::GetSkin ( ) const
inline

Skin.

References SetSkin().

◆ GetSquareVelocities()

bool deParticleEmitterType::GetSquareVelocities ( ) const
inline

Velocities have to be squared as requested by the graphic module.

References GetParameter(), and SetSquareVelocities().

◆ GetTrailController()

int deParticleEmitterType::GetTrailController ( eEmitControllers  controller) const

Trail controller index or -1 if not set.

Referenced by GetTrailEmitter().

◆ GetTrailEmitter()

deParticleEmitter* deParticleEmitterType::GetTrailEmitter ( ) const
inline

Particle emitter for trails behind particles or NULL.

References GetTrailController(), SetTrailController(), and SetTrailEmitter().

◆ SetCastFrom()

void deParticleEmitterType::SetCastFrom ( eCastFrom  castFrom)

Set what part of the model to cast particles from.

Referenced by GetCastFrom().

◆ SetCollisionEmitter()

void deParticleEmitterType::SetCollisionEmitter ( deParticleEmitter emitter)

Set particle emitter for colliding particles or NULL.

Referenced by GetCollisionEmitter().

◆ SetCollisionResponse()

void deParticleEmitterType::SetCollisionResponse ( eCollisionResponses  response)

Set collision response.

Referenced by GetCollisionResponse().

◆ SetEmitController()

void deParticleEmitterType::SetEmitController ( eEmitControllers  controller,
int  targetController 
)

Set emit controller index or -1 if not set.

Referenced by GetEmitMinImpulse().

◆ SetEmitMinImpulse()

void deParticleEmitterType::SetEmitMinImpulse ( float  impulse)

Set minimum impulse required for colliding particles to emit instances.

Referenced by GetEmitMinImpulse().

◆ SetIntervalAsDistance()

void deParticleEmitterType::SetIntervalAsDistance ( bool  intervalAsDistance)

Set if interval parameter is used as distance not time.

Referenced by GetIntervalAsDistance().

◆ SetMaxAngularVelocity()

void deParticleEmitterType::SetMaxAngularVelocity ( float  maxAngularVelocity)

Set maximum angular velocity for mapping as requested by the graphic module.

Referenced by GetMaxAngularVelocity().

◆ SetMaxLinearVelocity()

void deParticleEmitterType::SetMaxLinearVelocity ( float  maxLinearVelocity)

Set maximum linear velocity for mapping as requested by the graphic module.

Referenced by GetMaxLinearVelocity().

◆ SetModel()

void deParticleEmitterType::SetModel ( deModel model)

Set model used for casting or NULL.

Referenced by GetModel().

◆ SetModelSkin()

void deParticleEmitterType::SetModelSkin ( deSkin skin)

Set skin for the model used for casting or NULL.

Referenced by GetModelSkin().

◆ SetPhysicsSize()

void deParticleEmitterType::SetPhysicsSize ( float  size)

Set physics size.

Referenced by GetPhysicsSize().

◆ SetSimulationType()

void deParticleEmitterType::SetSimulationType ( eSimulationTypes  simulationType)

Set simulation type.

Referenced by GetSimulationType().

◆ SetSkin()

void deParticleEmitterType::SetSkin ( deSkin skin)

Set skin.

Referenced by GetSkin().

◆ SetSquareVelocities()

void deParticleEmitterType::SetSquareVelocities ( bool  squareVelocities)

Set if velocities have to be squared as requested by the graphic module.

Referenced by GetSquareVelocities().

◆ SetTrailController()

void deParticleEmitterType::SetTrailController ( eEmitControllers  controller,
int  targetController 
)

Set trail controller index or -1 if not set.

Referenced by GetTrailEmitter().

◆ SetTrailEmitter()

void deParticleEmitterType::SetTrailEmitter ( deParticleEmitter emitter)

Set particle emitter for trails behind particles or NULL.

Referenced by GetTrailEmitter().


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