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

Point particle emitter. More...

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

Inheritance diagram for PointParticleEmitter:
Inheritance graph
Collaboration diagram for PointParticleEmitter:
Collaboration graph

Public Member Functions

 PointParticleEmitter (int32_t count, int64_t lifeTime, int64_t lifeTimeRnd, float mass, float massRnd, const Vector3 &position, const Vector3 &velocity, const Vector3 &velocityRnd, const Color4 &colorStart, const Color4 &colorEnd)
 Public constructor. 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
 
Vector3 position
 
Vector3 positionTransformed
 
Vector3 velocity
 
Vector3 velocityRnd
 
Vector3 zeroPosition
 
Color4 colorStart
 
Color4 colorEnd
 

Detailed Description

Point particle emitter.

Author
Andreas Drewke
Version
$Id$

Definition at line 24 of file PointParticleEmitter.h.

Constructor & Destructor Documentation

◆ PointParticleEmitter()

PointParticleEmitter ( int32_t  count,
int64_t  lifeTime,
int64_t  lifeTimeRnd,
float  mass,
float  massRnd,
const Vector3 position,
const Vector3 velocity,
const Vector3 velocityRnd,
const Color4 colorStart,
const Color4 colorEnd 
)

Public constructor.

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
positionposition to emit from
velocityvelocity in meter / seconds
velocityRndvelocity rnd in meter / seconds
colorStartstart color
colorEndend color

Definition at line 21 of file PointParticleEmitter.cpp.

Member Function Documentation

◆ emit()

void emit ( Particle particle)
overridevirtual

Emits particles.

Parameters
particleparticle

Implements ParticleEmitter.

Definition at line 36 of file PointParticleEmitter.cpp.

◆ fromTransformations()

void fromTransformations ( const Transformations transformations)
overridevirtual

Update transformation with given transformations.

Parameters
transformationstransformations

Implements ParticleEmitter.

Definition at line 59 of file PointParticleEmitter.cpp.

◆ getCenter()

const Vector3 & getCenter ( ) const
inlineoverridevirtual
Returns
center

Implements ParticleEmitter.

Definition at line 58 of file PointParticleEmitter.h.

◆ getColorEnd()

const Color4 & getColorEnd ( ) const
inlineoverridevirtual
Returns
color end

Implements ParticleEmitter.

Definition at line 82 of file PointParticleEmitter.h.

◆ getColorStart()

const Color4 & getColorStart ( ) const
inlineoverridevirtual
Returns
color start

Implements ParticleEmitter.

Definition at line 74 of file PointParticleEmitter.h.

◆ getCount()

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

Implements ParticleEmitter.

Definition at line 62 of file PointParticleEmitter.h.

◆ getVelocity()

const Vector3 & getVelocity ( ) const
inline

Definition at line 66 of file PointParticleEmitter.h.

◆ getVelocityRnd()

const Vector3 & getVelocityRnd ( ) const
inline

Definition at line 70 of file PointParticleEmitter.h.

◆ setColorEnd()

void setColorEnd ( const Color4 colorEnd)
inlineoverridevirtual

Set end color.

Parameters
colorEndcolor end

Implements ParticleEmitter.

Definition at line 86 of file PointParticleEmitter.h.

◆ setColorStart()

void setColorStart ( const Color4 colorStart)
inlineoverridevirtual

Set start color.

Parameters
colorStartcolor start

Implements ParticleEmitter.

Definition at line 78 of file PointParticleEmitter.h.

Member Data Documentation

◆ colorEnd

Color4 colorEnd
private

Definition at line 39 of file PointParticleEmitter.h.

◆ colorStart

Color4 colorStart
private

Definition at line 38 of file PointParticleEmitter.h.

◆ count

int32_t count
private

Definition at line 28 of file PointParticleEmitter.h.

◆ lifeTime

int64_t lifeTime
private

Definition at line 29 of file PointParticleEmitter.h.

◆ lifeTimeRnd

int64_t lifeTimeRnd
private

Definition at line 30 of file PointParticleEmitter.h.

◆ mass

float mass
private

Definition at line 31 of file PointParticleEmitter.h.

◆ massRnd

float massRnd
private

Definition at line 32 of file PointParticleEmitter.h.

◆ position

Vector3 position
private

Definition at line 33 of file PointParticleEmitter.h.

◆ positionTransformed

Vector3 positionTransformed
private

Definition at line 34 of file PointParticleEmitter.h.

◆ velocity

Vector3 velocity
private

Definition at line 35 of file PointParticleEmitter.h.

◆ velocityRnd

Vector3 velocityRnd
private

Definition at line 36 of file PointParticleEmitter.h.

◆ zeroPosition

Vector3 zeroPosition
private

Definition at line 37 of file PointParticleEmitter.h.


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