igor::iParticleEmitter Class Reference

#include <iParticleEmitter.h>

Public Member Functions

 iParticleEmitter ()
 
virtual ~iParticleEmitter ()=default
 
void setWorldMatrix (const iaMatrixd &matrix)
 
const iaMatrixdgetWorldMatrix () const
 
void setSize (float32 size)
 
float32 getSize () const
 
void setType (iEmitterType emitterType)
 
iEmitterType getType () const
 
void addTriangle (const iEmitterTriangle &triangle)
 
void clearTriangles ()
 
void calcRandomStart (iaVector3d &position, iaVector3d &velocity)
 

Protected Member Functions

void calcRandomStartFromCube (iaVector3d &position, iaVector3d &velocity)
 
void calcRandomStartFromSquare (iaVector3d &position, iaVector3d &velocity)
 
void calcRandomStartFromSphere (iaVector3d &position, iaVector3d &velocity)
 
void calcRandomStartFromDisc (iaVector3d &position, iaVector3d &velocity)
 
void calcRandomStartFromCircle (iaVector3d &position, iaVector3d &velocity)
 
void calcRandomStartFromPoint (iaVector3d &position, iaVector3d &velocity)
 
void calcRandomStartFromMesh (iaVector3d &position, iaVector3d &velocity)
 

Protected Attributes

iEmitterType _type = iEmitterType::Point
 
float32 _size = 1.0
 
std::vector< iEmitterTriangle_emitterTriangles
 
iaMatrixd _worldMatrix
 
iaRandomNumberGenerator _rand
 

Detailed Description

basically a structure that delivers start positions and velocities for any kind of objects

mainly used for particles

Constructor & Destructor Documentation

◆ iParticleEmitter()

igor::iParticleEmitter::iParticleEmitter ( )

does nothing

◆ ~iParticleEmitter()

virtual igor::iParticleEmitter::~iParticleEmitter ( )
virtualdefault

does nothing

Member Function Documentation

◆ addTriangle()

void igor::iParticleEmitter::addTriangle ( const iEmitterTriangle triangle)

adds triangle to mesh emitter

Parameters
trianglethe triangle to add

◆ calcRandomStart()

void igor::iParticleEmitter::calcRandomStart ( iaVector3d position,
iaVector3d velocity 
)

calculates a random start position and velocity from emitter

Parameters
[out]positionrandom position on emitter in world coordinates
[out]velocityvelocity depending on position

◆ calcRandomStartFromCircle()

void igor::iParticleEmitter::calcRandomStartFromCircle ( iaVector3d position,
iaVector3d velocity 
)
protected

◆ calcRandomStartFromCube()

void igor::iParticleEmitter::calcRandomStartFromCube ( iaVector3d position,
iaVector3d velocity 
)
protected

◆ calcRandomStartFromDisc()

void igor::iParticleEmitter::calcRandomStartFromDisc ( iaVector3d position,
iaVector3d velocity 
)
protected

◆ calcRandomStartFromMesh()

void igor::iParticleEmitter::calcRandomStartFromMesh ( iaVector3d position,
iaVector3d velocity 
)
protected

◆ calcRandomStartFromPoint()

void igor::iParticleEmitter::calcRandomStartFromPoint ( iaVector3d position,
iaVector3d velocity 
)
protected

◆ calcRandomStartFromSphere()

void igor::iParticleEmitter::calcRandomStartFromSphere ( iaVector3d position,
iaVector3d velocity 
)
protected

◆ calcRandomStartFromSquare()

void igor::iParticleEmitter::calcRandomStartFromSquare ( iaVector3d position,
iaVector3d velocity 
)
protected

◆ clearTriangles()

void igor::iParticleEmitter::clearTriangles ( )

removes all emitter triangles from mesh

◆ getSize()

float32 igor::iParticleEmitter::getSize ( ) const
Returns
size of emitter

◆ getType()

iEmitterType igor::iParticleEmitter::getType ( ) const
Returns
type of emitter

◆ getWorldMatrix()

const iaMatrixd & igor::iParticleEmitter::getWorldMatrix ( ) const
Returns
world matrix of emitter

◆ setSize()

void igor::iParticleEmitter::setSize ( float32  size)

sets size of emitter

how it's interpreted depends on type of emitter Mesh -> none Point -> none Disc -> radius Circle -> radius Sphere -> radius Square -> half edge length Cube -> half edge length

Parameters
sizesize of emitter

◆ setType()

void igor::iParticleEmitter::setType ( iEmitterType  emitterType)

sets type of emitter

Parameters
emitterTypeemitter type

◆ setWorldMatrix()

void igor::iParticleEmitter::setWorldMatrix ( const iaMatrixd matrix)

sets world matrix of emitter

Parameters
matrixthe matrix to be set

Member Data Documentation

◆ _emitterTriangles

std::vector<iEmitterTriangle> igor::iParticleEmitter::_emitterTriangles
protected

mesh used as emitter

◆ _rand

iaRandomNumberGenerator igor::iParticleEmitter::_rand
protected

random number generator

◆ _size

float32 igor::iParticleEmitter::_size = 1.0
protected

size of emitter

◆ _type

iEmitterType igor::iParticleEmitter::_type = iEmitterType::Point
protected

type of emitter

◆ _worldMatrix

iaMatrixd igor::iParticleEmitter::_worldMatrix
protected

world matrix of emitter


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