igor::iParticleSystem Class Reference

#include <iParticleSystem.h>

Public Member Functions

 iParticleSystem ()
 
virtual ~iParticleSystem ()
 
void reset ()
 
void start ()
 
void stop ()
 
bool isRunning ()
 
bool isFinished () const
 
void setLoop (bool loop=true)
 
bool isLooped () const
 
void setVortexTorque (float32 min, float32 max)
 
float32 getVortexTorqueMin ()
 
float32 getVortexTorqueMax ()
 
void setVortexRange (float32 min, float32 max)
 
float32 getVortexRangeMin ()
 
float32 getVortexRangeMax ()
 
void setVortexCheckRange (uint8 particles)
 
uint8 getVortexCheckRange ()
 
void setMaxParticleCount (uint16 max)
 
uint16 getMaxParticleCount () const
 
void setTextureTiling (uint8 columns, uint8 rows)
 
uint8 getTextureColumns () const
 
uint8 getTextureRows () const
 
void setSecondTextureRotation (float32 angle)
 
float32 getSecondTextureRotation ()
 
void setThirdTextureRotation (float32 angle)
 
float32 getThirdTextureRotation ()
 
void setParticleSystemMatrix (const iaMatrixd &worldInvMatrix)
 
void setVortexToParticleRate (float32 rate)
 
float32 getVortexToParticleRate () const
 
void onUpdate (iParticleEmitter &emitter)
 
void setVorticityConfinement (float32 vorticityConfinement)
 
float32 getVorticityConfinement ()
 
void setColorGradient (const iaKeyFrameGraphColor4f &colorGradient)
 
void getColorGradient (iaKeyFrameGraphColor4f &colorGradient) const
 
const iaKeyFrameGraphColor4fgetColorGradient () const
 
void setEmissionGradient (const iaKeyFrameGraphf &emissionGradient)
 
void getEmissionGradient (iaKeyFrameGraphf &emissionGradient) const
 
void setStartAgeGradient (const iaKeyFrameGraphVector2f &ageGradient)
 
void getStartAgeGradient (iaKeyFrameGraphVector2f &ageGradient) const
 
void setSizeScaleGradient (const iaKeyFrameGraphf &sizeScaleGradient)
 
void getSizeScaleGradient (iaKeyFrameGraphf &sizeScaleGradient) const
 
void setStartSizeGradient (const iaKeyFrameGraphVector2f &sizeGradient)
 
void getStartSizeGradient (iaKeyFrameGraphVector2f &sizeGradient) const
 
void setStartVelocityGradient (const iaKeyFrameGraphVector2f &velocityGradient)
 
void getStartVelocityGradient (iaKeyFrameGraphVector2f &velocityGradient) const
 
void setStartLiftGradient (const iaKeyFrameGraphVector2f &liftGradient)
 
void getStartLiftGradient (iaKeyFrameGraphVector2f &liftGradient) const
 
void setStartOrientationGradient (const iaKeyFrameGraphVector2f &orientationGradient)
 
void getStartOrientationGradient (iaKeyFrameGraphVector2f &orientationGradient) const
 
void setStartOrientationRateGradient (const iaKeyFrameGraphVector2f &orientationRateGradient)
 
void getStartOrientationRateGradient (iaKeyFrameGraphVector2f &orientationRateGradient) const
 
void setVelocityOriented (bool velocityOriented=true)
 
bool getVelocityOriented () const
 
void setTileIncrement (float32 tileIncrement)
 
float32 getTileIncrement () const
 
void setAirDrag (float32 airDrag)
 
float32 getAirDrag () const
 
void setPeriodTime (float32 periodTime)
 
float32 getPeriodTime () const
 
const iaSpheredgetBoundingSphere () const
 
const iAABoxdgetBoundingBox () const
 
iVertexArrayPtr getVertexArray () const
 

Static Public Member Functions

static float32 getSimulationRate ()
 

Detailed Description

simulation of 3d particle systems

Constructor & Destructor Documentation

◆ iParticleSystem()

igor::iParticleSystem::iParticleSystem ( )

init default values

◆ ~iParticleSystem()

igor::iParticleSystem::~iParticleSystem ( )
virtual

clean up

Member Function Documentation

◆ getAirDrag()

float32 igor::iParticleSystem::getAirDrag ( ) const
Returns
air drag factor

◆ getBoundingBox()

const iAABoxd & igor::iParticleSystem::getBoundingBox ( ) const
Returns
approximated bounding box

◆ getBoundingSphere()

const iaSphered & igor::iParticleSystem::getBoundingSphere ( ) const
Returns
approximated bounding sphere

◆ getColorGradient() [1/2]

const iaKeyFrameGraphColor4f & igor::iParticleSystem::getColorGradient ( ) const
Returns
reference to color gradient

◆ getColorGradient() [2/2]

void igor::iParticleSystem::getColorGradient ( iaKeyFrameGraphColor4f colorGradient) const

returns the color gradient

the gradient contains colors at given time in seconds

Parameters
[out]colorGradientout value for the color gradient

◆ getEmissionGradient()

void igor::iParticleSystem::getEmissionGradient ( iaKeyFrameGraphf emissionGradient) const

returns the emission gradient

Parameters
[out]emissionGradientout value for the emission gradient

◆ getMaxParticleCount()

uint16 igor::iParticleSystem::getMaxParticleCount ( ) const
Returns
the maximum particle count used

◆ getPeriodTime()

float32 igor::iParticleSystem::getPeriodTime ( ) const
Returns
period time of this particle system in seconds

◆ getSecondTextureRotation()

float32 igor::iParticleSystem::getSecondTextureRotation ( )
Returns
rotation speed of second texture in rad per frame

◆ getSimulationRate()

float32 igor::iParticleSystem::getSimulationRate ( )
static
Returns
simulation rate in frames per scond or Hz

◆ getSizeScaleGradient()

void igor::iParticleSystem::getSizeScaleGradient ( iaKeyFrameGraphf sizeScaleGradient) const

returns the size scale gradient

Parameters
[out]sizeScaleGradientout value for the size gradient

◆ getStartAgeGradient()

void igor::iParticleSystem::getStartAgeGradient ( iaKeyFrameGraphVector2f ageGradient) const

returns the emission gradient

Parameters
[out]ageGradientout value for the max age gradient

◆ getStartLiftGradient()

void igor::iParticleSystem::getStartLiftGradient ( iaKeyFrameGraphVector2f liftGradient) const

returns the min max start lift gradient for particles at birth

Parameters
[out]liftGradientout value for the start lift gradient

◆ getStartOrientationGradient()

void igor::iParticleSystem::getStartOrientationGradient ( iaKeyFrameGraphVector2f orientationGradient) const

returns the min max start lift gradient for particles at birth

Parameters
[out]orientationGradientout value for the start orientation gradient

◆ getStartOrientationRateGradient()

void igor::iParticleSystem::getStartOrientationRateGradient ( iaKeyFrameGraphVector2f orientationRateGradient) const

returns the start min max orientation offset gradient for particles during visuble time

Parameters
[out]orientationRateGradientout value for the orientation rate gradient

◆ getStartSizeGradient()

void igor::iParticleSystem::getStartSizeGradient ( iaKeyFrameGraphVector2f sizeGradient) const

returns the min max start size gradient for particles at birth

Parameters
[out]sizeGradientout value for the start size gradient

◆ getStartVelocityGradient()

void igor::iParticleSystem::getStartVelocityGradient ( iaKeyFrameGraphVector2f velocityGradient) const

returns the min max start velocity gradient for particles at birth

Parameters
[out]velocityGradientout value for the start velocity gradient

◆ getTextureColumns()

uint8 igor::iParticleSystem::getTextureColumns ( ) const
Returns
the horizontal tiling resolution of the first texture layer

◆ getTextureRows()

uint8 igor::iParticleSystem::getTextureRows ( ) const
Returns
the vertical tiling resolution of the first texture layer

◆ getThirdTextureRotation()

float32 igor::iParticleSystem::getThirdTextureRotation ( )
Returns
rotation speed of third texture in rad per frame

◆ getTileIncrement()

float32 igor::iParticleSystem::getTileIncrement ( ) const
Returns
tile increment

◆ getVelocityOriented()

bool igor::iParticleSystem::getVelocityOriented ( ) const
Returns
velocity oriented flag

◆ getVertexArray()

iVertexArrayPtr igor::iParticleSystem::getVertexArray ( ) const
Returns
the vertex array for rendering

◆ getVortexCheckRange()

uint8 igor::iParticleSystem::getVortexCheckRange ( )
Returns
vortex check rangein indexes from vortex particle

◆ getVortexRangeMax()

float32 igor::iParticleSystem::getVortexRangeMax ( )
Returns
maximum range of vortexes

◆ getVortexRangeMin()

float32 igor::iParticleSystem::getVortexRangeMin ( )
Returns
minimum range of vortexes

◆ getVortexToParticleRate()

float32 igor::iParticleSystem::getVortexToParticleRate ( ) const
Returns
likeliness of vortex particle to appear

◆ getVortexTorqueMax()

float32 igor::iParticleSystem::getVortexTorqueMax ( )
Returns
maximum vortex torque

◆ getVortexTorqueMin()

float32 igor::iParticleSystem::getVortexTorqueMin ( )
Returns
minimum vortex torque

◆ getVorticityConfinement()

float32 igor::iParticleSystem::getVorticityConfinement ( )
Returns
vorticity confinement force

◆ isFinished()

bool igor::iParticleSystem::isFinished ( ) const
Returns
true if particle system is finished

◆ isLooped()

bool igor::iParticleSystem::isLooped ( ) const
Returns
true if particle system runs in loop

◆ isRunning()

bool igor::iParticleSystem::isRunning ( )
Returns
true if particle system is currently running

◆ onUpdate()

void igor::iParticleSystem::onUpdate ( iParticleEmitter emitter)

calculates next frame

Parameters
emitterthe emitter to emitt particles from

◆ reset()

void igor::iParticleSystem::reset ( )

clears all particles

◆ setAirDrag()

void igor::iParticleSystem::setAirDrag ( float32  airDrag)

sets the air drag

0.0-1.0 1.0 means basically no air drag 0.0 is a full stop and about 0.99 is a usefull value for simulating air drag

Parameters
airDragthe air drag factor (0.0 - 1.0)

◆ setColorGradient()

void igor::iParticleSystem::setColorGradient ( const iaKeyFrameGraphColor4f colorGradient)

sets color gradient

for time values from 0.0 - 1.0

where 1.0 is the time at which the particle spawns and 0.0 is where the particle dies

the gradient must contain colors at given time in seconds

Parameters
colorGradientthe color gradient

◆ setEmissionGradient()

void igor::iParticleSystem::setEmissionGradient ( const iaKeyFrameGraphf emissionGradient)

sets emission gradient for particles per frame

Parameters
emissionGradientthe emission gradient

◆ setLoop()

void igor::iParticleSystem::setLoop ( bool  loop = true)

sets if the particle system runs in a loop

Parameters
loopif true particle system runs in loop

◆ setMaxParticleCount()

void igor::iParticleSystem::setMaxParticleCount ( uint16  max)

sets the maximum particle count

set to zero if you don't want a limit of created particles

Parameters
maxthe maximum count of particles used

◆ setParticleSystemMatrix()

void igor::iParticleSystem::setParticleSystemMatrix ( const iaMatrixd worldInvMatrix)

set's the inverse matrix of the particle system coordinate system

Parameters
worldInvMatrixthe inverse of the particle system

◆ setPeriodTime()

void igor::iParticleSystem::setPeriodTime ( float32  periodTime)

sets period time of this particle system

if loop is true. the particle system will be restarted after this time if loop is false. the particle system simulation will be stopped

Parameters
periodTimethe period time in seconds

◆ setSecondTextureRotation()

void igor::iParticleSystem::setSecondTextureRotation ( float32  angle)

sets the rotation per frame of the second texture

Parameters
anglerotation in rad per frame

◆ setSizeScaleGradient()

void igor::iParticleSystem::setSizeScaleGradient ( const iaKeyFrameGraphf sizeScaleGradient)

sets size scale gradient for particles per frame

Parameters
sizeScaleGradientthe size gradient

◆ setStartAgeGradient()

void igor::iParticleSystem::setStartAgeGradient ( const iaKeyFrameGraphVector2f ageGradient)

sets min max age gradient for particles depending on their spawn time

Parameters
ageGradientthe max age gradient

◆ setStartLiftGradient()

void igor::iParticleSystem::setStartLiftGradient ( const iaKeyFrameGraphVector2f liftGradient)

sets min max start lift gradient for particles at birth

negative values are basically extra weight on a particle

Parameters
liftGradientthe min max start lift gradient

◆ setStartOrientationGradient()

void igor::iParticleSystem::setStartOrientationGradient ( const iaKeyFrameGraphVector2f orientationGradient)

sets min max start orientation gradient for particles at birth

Parameters
orientationGradientthe min max start orientation gradient

◆ setStartOrientationRateGradient()

void igor::iParticleSystem::setStartOrientationRateGradient ( const iaKeyFrameGraphVector2f orientationRateGradient)

sets start min max orientation rate gradient for particles during visible time

Parameters
orientationRateGradientthe min max orientation rate gradient

◆ setStartSizeGradient()

void igor::iParticleSystem::setStartSizeGradient ( const iaKeyFrameGraphVector2f sizeGradient)

sets min max start size gradient for particles at birth

Parameters
sizeGradientthe min max start size gradient

◆ setStartVelocityGradient()

void igor::iParticleSystem::setStartVelocityGradient ( const iaKeyFrameGraphVector2f velocityGradient)

sets min max start velocity gradient for particles at birth

Parameters
velocityGradientthe min max start velocity gradient

◆ setTextureTiling()

void igor::iParticleSystem::setTextureTiling ( uint8  columns,
uint8  rows 
)

sets the tiling resolution of the first texture layer

Parameters
columnscolumn count (<= 1)
rowsrow count (<= 1)

◆ setThirdTextureRotation()

void igor::iParticleSystem::setThirdTextureRotation ( float32  angle)

sets the rotation per frame of the third texture

Parameters
anglerotation in rad per frame

◆ setTileIncrement()

void igor::iParticleSystem::setTileIncrement ( float32  tileIncrement)

sets the increment the tile index is progressing per frame (default = 0.0)

franctional values are allowed

Parameters
tileIncrementthe tile increment to use

◆ setVelocityOriented()

void igor::iParticleSystem::setVelocityOriented ( bool  velocityOriented = true)

sets the velocity oriented flag particles will be rendered oriented by thair velocity and screen

default id off

Parameters
velocityOrientedif true particles get rendered velocity oriented

◆ setVortexCheckRange()

void igor::iParticleSystem::setVortexCheckRange ( uint8  particles)

sets vortex check range

Parameters
particlesdistance in indexes from vortex particle

◆ setVortexRange()

void igor::iParticleSystem::setVortexRange ( float32  min,
float32  max 
)

sets minimum and maximum range of vortexes

Parameters
minminimum range of vortex
maxmaximum range of vortex

◆ setVortexToParticleRate()

void igor::iParticleSystem::setVortexToParticleRate ( float32  rate)

sets the vortex to particle ratio

Parameters
ratethe rate of vortex particles to particles. default 0.01 = 1%

◆ setVortexTorque()

void igor::iParticleSystem::setVortexTorque ( float32  min,
float32  max 
)

sets the range of vortex torque

Parameters
minminimum vortex torque
maxmaximum vortex torque

◆ setVorticityConfinement()

void igor::iParticleSystem::setVorticityConfinement ( float32  vorticityConfinement)

sets vorticity confinement force

Parameters
vorticityConfinementthe vorticity confinement force

◆ start()

void igor::iParticleSystem::start ( )

starts or resumes particle system

◆ stop()

void igor::iParticleSystem::stop ( )

stops or pauses the particle system


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