Drag[en]gine Game Engine
1.21
|
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 } |
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 } |
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 | |
deSkin * | GetSkin () const |
Skin. More... | |
void | SetSkin (deSkin *skin) |
Set skin. More... | |
deModel * | GetModel () const |
Model used for casting or NULL. More... | |
void | SetModel (deModel *model) |
Set model used for casting or NULL. More... | |
deSkin * | GetModelSkin () 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... | |
deParticleEmitter * | GetTrailEmitter () 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... | |
deParticleEmitter * | GetCollisionEmitter () 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... | |
deParticleEmitterParameter & | GetParameter (eParameters parameter) |
Parameter. More... | |
const deParticleEmitterParameter & | GetParameter (eParameters parameter) const |
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.
Particle parameters.
deParticleEmitterType::deParticleEmitterType | ( | ) |
Create particle emitter type.
deParticleEmitterType::~deParticleEmitterType | ( | ) |
Clean up particle emitter type.
|
inline |
What part of the model to cast particles from.
|
inline |
Particle emitter for colliding particles or NULL.
|
inline |
Collision response.
int deParticleEmitterType::GetEmitController | ( | eEmitControllers | controller | ) | const |
Emit controller index or -1 if not set.
|
inline |
Minimum impulse required for colliding particles to emit instances.
|
inline |
Interval parameter is used as distance not time.
|
inline |
Maximum angular velocity for mapping as requested by the graphic module.
|
inline |
Maximum linear velocity for mapping as requested by the graphic module.
|
inline |
Model used for casting or NULL.
|
inline |
Skin for the model used for casting or NULL.
deParticleEmitterParameter& deParticleEmitterType::GetParameter | ( | eParameters | parameter | ) |
Parameter.
const deParticleEmitterParameter& deParticleEmitterType::GetParameter | ( | eParameters | parameter | ) | const |
|
inline |
Physics size.
|
inline |
Simulation type.
|
inline |
Skin.
|
inline |
Velocities have to be squared as requested by the graphic module.
int deParticleEmitterType::GetTrailController | ( | eEmitControllers | controller | ) | const |
Trail controller index or -1 if not set.
|
inline |
Particle emitter for trails behind particles or NULL.
void deParticleEmitterType::SetCastFrom | ( | eCastFrom | castFrom | ) |
Set what part of the model to cast particles from.
void deParticleEmitterType::SetCollisionEmitter | ( | deParticleEmitter * | emitter | ) |
Set particle emitter for colliding particles or NULL.
void deParticleEmitterType::SetCollisionResponse | ( | eCollisionResponses | response | ) |
Set collision response.
void deParticleEmitterType::SetEmitController | ( | eEmitControllers | controller, |
int | targetController | ||
) |
Set emit controller index or -1 if not set.
void deParticleEmitterType::SetEmitMinImpulse | ( | float | impulse | ) |
Set minimum impulse required for colliding particles to emit instances.
void deParticleEmitterType::SetIntervalAsDistance | ( | bool | intervalAsDistance | ) |
Set if interval parameter is used as distance not time.
void deParticleEmitterType::SetMaxAngularVelocity | ( | float | maxAngularVelocity | ) |
Set maximum angular velocity for mapping as requested by the graphic module.
void deParticleEmitterType::SetMaxLinearVelocity | ( | float | maxLinearVelocity | ) |
Set maximum linear velocity for mapping as requested by the graphic module.
void deParticleEmitterType::SetModel | ( | deModel * | model | ) |
Set model used for casting or NULL.
void deParticleEmitterType::SetModelSkin | ( | deSkin * | skin | ) |
Set skin for the model used for casting or NULL.
void deParticleEmitterType::SetPhysicsSize | ( | float | size | ) |
Set physics size.
void deParticleEmitterType::SetSimulationType | ( | eSimulationTypes | simulationType | ) |
Set simulation type.
void deParticleEmitterType::SetSkin | ( | deSkin * | skin | ) |
Set skin.
void deParticleEmitterType::SetSquareVelocities | ( | bool | squareVelocities | ) |
Set if velocities have to be squared as requested by the graphic module.
void deParticleEmitterType::SetTrailController | ( | eEmitControllers | controller, |
int | targetController | ||
) |
Set trail controller index or -1 if not set.
void deParticleEmitterType::SetTrailEmitter | ( | deParticleEmitter * | emitter | ) |
Set particle emitter for trails behind particles or NULL.