TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
BoundingBoxParticleEmitter Class Referencefinal

Bounding box particle emitter. More...

#include <tdme/engine/subsystems/particlesystem/BoundingBoxParticleEmitter.h>

Inheritance diagram for BoundingBoxParticleEmitter:
Inheritance graph
Collaboration diagram for BoundingBoxParticleEmitter:
Collaboration graph

Public Member Functions

 BoundingBoxParticleEmitter (int32_t count, int64_t lifeTime, int64_t lifeTimeRnd, float mass, float massRnd, OrientedBoundingBox *obb, const Vector3 &velocity, const Vector3 &velocityRnd, const Color4 &colorStart, const Color4 &colorEnd)
 Public constructor. More...
 
virtual ~BoundingBoxParticleEmitter ()
 Destructor. More...
 
const Vector3getCenter () const override
 
int32_t getCount () const override
 
const Vector3getVelocity () const
 
const Vector3getVelocityRnd () const
 
const Color4getColorStart () const override
 
void setColorStart (const Color4 &colorStart) override
 Set start color. More...
 
const Color4getColorEnd () const override
 
void setColorEnd (const Color4 &colorEnd) override
 Set end color. More...
 
void emit (Particle *particle) override
 Emits particles. More...
 
void fromTransformations (const Transformations &transformations) override
 Update transformation with given transformations. More...
 
- Public Member Functions inherited from ParticleEmitter
virtual const Vector3getCenter () const =0
 
virtual int32_t getCount () const =0
 
virtual const Color4getColorStart () const =0
 
virtual void setColorStart (const Color4 &colorStart)=0
 Set start color. More...
 
virtual const Color4getColorEnd () const =0
 
virtual void setColorEnd (const Color4 &colorEnd)=0
 Set end color. More...
 
virtual void emit (Particle *particle)=0
 Emits particles. More...
 
virtual void fromTransformations (const Transformations &transformations)=0
 Update transformation with given transformations. More...
 
virtual ~ParticleEmitter ()
 Destructor. More...
 

Private Attributes

int32_t count
 
int64_t lifeTime
 
int64_t lifeTimeRnd
 
float mass
 
float massRnd
 
OrientedBoundingBoxobb { nullptr }
 
OrientedBoundingBoxobbTransformed { nullptr }
 
Vector3 velocity
 
Vector3 velocityRnd
 
Color4 colorStart
 
Color4 colorEnd
 

Detailed Description

Bounding box particle emitter.

Author
Andreas Drewke
Version
$Id$

Definition at line 25 of file BoundingBoxParticleEmitter.h.

Constructor & Destructor Documentation

◆ BoundingBoxParticleEmitter()

BoundingBoxParticleEmitter ( int32_t  count,
int64_t  lifeTime,
int64_t  lifeTimeRnd,
float  mass,
float  massRnd,
OrientedBoundingBox obb,
const Vector3 velocity,
const Vector3 velocityRnd,
const Color4 colorStart,
const Color4 colorEnd 
)

Public constructor.

Parameters
countparticles to emit in one second
lifeTimelife time in milli seconds
lifeTimeRndlife time rnd in milli seconds
massmass in kg
massRndmass rnd in kg
obboriented bounding box
velocityvelocity in meter / seconds
velocityRndvelocity rnd in meter / seconds
colorStartcolor start
colorEndcolor end

Definition at line 23 of file BoundingBoxParticleEmitter.cpp.

◆ ~BoundingBoxParticleEmitter()

Destructor.

Definition at line 38 of file BoundingBoxParticleEmitter.cpp.

Member Function Documentation

◆ emit()

void emit ( Particle particle)
overridevirtual

Emits particles.

Parameters
particleparticle

Implements ParticleEmitter.

Definition at line 43 of file BoundingBoxParticleEmitter.cpp.

◆ fromTransformations()

void fromTransformations ( const Transformations transformations)
overridevirtual

Update transformation with given transformations.

Parameters
transformationstransformations

Implements ParticleEmitter.

Definition at line 76 of file BoundingBoxParticleEmitter.cpp.

◆ getCenter()

const Vector3 & getCenter ( ) const
inlineoverridevirtual
Returns
center

Implements ParticleEmitter.

Definition at line 62 of file BoundingBoxParticleEmitter.h.

◆ getColorEnd()

const Color4 & getColorEnd ( ) const
inlineoverridevirtual
Returns
color end

Implements ParticleEmitter.

Definition at line 86 of file BoundingBoxParticleEmitter.h.

◆ getColorStart()

const Color4 & getColorStart ( ) const
inlineoverridevirtual
Returns
color start

Implements ParticleEmitter.

Definition at line 78 of file BoundingBoxParticleEmitter.h.

◆ getCount()

int32_t getCount ( ) const
inlineoverridevirtual
Returns
number of particles to emit in one second

Implements ParticleEmitter.

Definition at line 66 of file BoundingBoxParticleEmitter.h.

◆ getVelocity()

const Vector3 & getVelocity ( ) const
inline

Definition at line 70 of file BoundingBoxParticleEmitter.h.

◆ getVelocityRnd()

const Vector3 & getVelocityRnd ( ) const
inline

Definition at line 74 of file BoundingBoxParticleEmitter.h.

◆ setColorEnd()

void setColorEnd ( const Color4 colorEnd)
inlineoverridevirtual

Set end color.

Parameters
colorEndcolor end

Implements ParticleEmitter.

Definition at line 90 of file BoundingBoxParticleEmitter.h.

◆ setColorStart()

void setColorStart ( const Color4 colorStart)
inlineoverridevirtual

Set start color.

Parameters
colorStartcolor start

Implements ParticleEmitter.

Definition at line 82 of file BoundingBoxParticleEmitter.h.

Member Data Documentation

◆ colorEnd

Color4 colorEnd
private

Definition at line 39 of file BoundingBoxParticleEmitter.h.

◆ colorStart

Color4 colorStart
private

Definition at line 38 of file BoundingBoxParticleEmitter.h.

◆ count

int32_t count
private

Definition at line 29 of file BoundingBoxParticleEmitter.h.

◆ lifeTime

int64_t lifeTime
private

Definition at line 30 of file BoundingBoxParticleEmitter.h.

◆ lifeTimeRnd

int64_t lifeTimeRnd
private

Definition at line 31 of file BoundingBoxParticleEmitter.h.

◆ mass

float mass
private

Definition at line 32 of file BoundingBoxParticleEmitter.h.

◆ massRnd

float massRnd
private

Definition at line 33 of file BoundingBoxParticleEmitter.h.

◆ obb

OrientedBoundingBox* obb { nullptr }
private

Definition at line 34 of file BoundingBoxParticleEmitter.h.

◆ obbTransformed

OrientedBoundingBox* obbTransformed { nullptr }
private

Definition at line 35 of file BoundingBoxParticleEmitter.h.

◆ velocity

Vector3 velocity
private

Definition at line 36 of file BoundingBoxParticleEmitter.h.

◆ velocityRnd

Vector3 velocityRnd
private

Definition at line 37 of file BoundingBoxParticleEmitter.h.


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