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

Sphere particle emitter. More...

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

Inheritance diagram for SphereParticleEmitter:
Inheritance graph
Collaboration diagram for SphereParticleEmitter:
Collaboration graph

Public Member Functions

 SphereParticleEmitter (int32_t count, int64_t lifeTime, int64_t lifeTimeRnd, float mass, float massRnd, Sphere *sphere, const Vector3 &velocity, const Vector3 &velocityRnd, const Color4 &colorStart, const Color4 &colorEnd)
 
virtual ~SphereParticleEmitter ()
 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
 
Spheresphere { nullptr }
 
SpheresphereTransformed { nullptr }
 
Vector3 velocity
 
Vector3 velocityRnd
 
Color4 colorStart
 
Color4 colorEnd
 

Detailed Description

Sphere particle emitter.

Author
Andreas Drewke
Version
$Id$

Definition at line 26 of file SphereParticleEmitter.h.

Constructor & Destructor Documentation

◆ SphereParticleEmitter()

SphereParticleEmitter ( int32_t  count,
int64_t  lifeTime,
int64_t  lifeTimeRnd,
float  mass,
float  massRnd,
Sphere sphere,
const Vector3 velocity,
const Vector3 velocityRnd,
const Color4 colorStart,
const Color4 colorEnd 
)
Parameters
countnumber of particles to emit in one second
lifeTimelife time in milli seconds
lifeTimeRndlife time rnd in milli seconds
massmass in kg
massRndmass rnd in kg
spheresphere
velocityvelocity in meter / seconds
velocityRndvelocity rnd in meter / seconds
colorStartcolor start
colorEndcolor end

Definition at line 23 of file SphereParticleEmitter.cpp.

◆ ~SphereParticleEmitter()

~SphereParticleEmitter ( )
virtual

Destructor.

Definition at line 38 of file SphereParticleEmitter.cpp.

Member Function Documentation

◆ emit()

void emit ( Particle particle)
overridevirtual

Emits particles.

Parameters
particleparticle

Implements ParticleEmitter.

Definition at line 43 of file SphereParticleEmitter.cpp.

◆ fromTransformations()

void fromTransformations ( const Transformations transformations)
overridevirtual

Update transformation with given transformations.

Parameters
transformationstransformations

Implements ParticleEmitter.

Definition at line 70 of file SphereParticleEmitter.cpp.

◆ getCenter()

const Vector3 & getCenter ( ) const
inlineoverridevirtual
Returns
center

Implements ParticleEmitter.

Definition at line 63 of file SphereParticleEmitter.h.

◆ getColorEnd()

const Color4 & getColorEnd ( ) const
inlineoverridevirtual
Returns
color end

Implements ParticleEmitter.

Definition at line 87 of file SphereParticleEmitter.h.

◆ getColorStart()

const Color4 & getColorStart ( ) const
inlineoverridevirtual
Returns
color start

Implements ParticleEmitter.

Definition at line 79 of file SphereParticleEmitter.h.

◆ getCount()

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

Implements ParticleEmitter.

Definition at line 67 of file SphereParticleEmitter.h.

◆ getVelocity()

const Vector3 & getVelocity ( ) const
inline

Definition at line 71 of file SphereParticleEmitter.h.

◆ getVelocityRnd()

const Vector3 & getVelocityRnd ( ) const
inline

Definition at line 75 of file SphereParticleEmitter.h.

◆ setColorEnd()

void setColorEnd ( const Color4 colorEnd)
inlineoverridevirtual

Set end color.

Parameters
colorEndcolor end

Implements ParticleEmitter.

Definition at line 91 of file SphereParticleEmitter.h.

◆ setColorStart()

void setColorStart ( const Color4 colorStart)
inlineoverridevirtual

Set start color.

Parameters
colorStartcolor start

Implements ParticleEmitter.

Definition at line 83 of file SphereParticleEmitter.h.

Member Data Documentation

◆ colorEnd

Color4 colorEnd
private

Definition at line 40 of file SphereParticleEmitter.h.

◆ colorStart

Color4 colorStart
private

Definition at line 39 of file SphereParticleEmitter.h.

◆ count

int32_t count
private

Definition at line 30 of file SphereParticleEmitter.h.

◆ lifeTime

int64_t lifeTime
private

Definition at line 31 of file SphereParticleEmitter.h.

◆ lifeTimeRnd

int64_t lifeTimeRnd
private

Definition at line 32 of file SphereParticleEmitter.h.

◆ mass

float mass
private

Definition at line 33 of file SphereParticleEmitter.h.

◆ massRnd

float massRnd
private

Definition at line 34 of file SphereParticleEmitter.h.

◆ sphere

Sphere* sphere { nullptr }
private

Definition at line 35 of file SphereParticleEmitter.h.

◆ sphereTransformed

Sphere* sphereTransformed { nullptr }
private

Definition at line 36 of file SphereParticleEmitter.h.

◆ velocity

Vector3 velocity
private

Definition at line 37 of file SphereParticleEmitter.h.

◆ velocityRnd

Vector3 velocityRnd
private

Definition at line 38 of file SphereParticleEmitter.h.


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