0.44.0
|
#include <iParticleEmitter.h>
Public Member Functions | |
iParticleEmitter () | |
virtual | ~iParticleEmitter ()=default |
void | setWorldMatrix (const iaMatrixd &matrix) |
const iaMatrixd & | getWorldMatrix () 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 |
basically a structure that delivers start positions and velocities for any kind of objects
mainly used for particles
igor::iParticleEmitter::iParticleEmitter | ( | ) |
does nothing
|
virtualdefault |
does nothing
void igor::iParticleEmitter::addTriangle | ( | const iEmitterTriangle & | triangle | ) |
adds triangle to mesh emitter
triangle | the triangle to add |
void igor::iParticleEmitter::calcRandomStart | ( | iaVector3d & | position, |
iaVector3d & | velocity | ||
) |
calculates a random start position and velocity from emitter
[out] | position | random position on emitter in world coordinates |
[out] | velocity | velocity depending on position |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void igor::iParticleEmitter::clearTriangles | ( | ) |
removes all emitter triangles from mesh
float32 igor::iParticleEmitter::getSize | ( | ) | const |
iEmitterType igor::iParticleEmitter::getType | ( | ) | const |
const iaMatrixd & igor::iParticleEmitter::getWorldMatrix | ( | ) | const |
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
size | size of emitter |
void igor::iParticleEmitter::setType | ( | iEmitterType | emitterType | ) |
sets type of emitter
emitterType | emitter type |
void igor::iParticleEmitter::setWorldMatrix | ( | const iaMatrixd & | matrix | ) |
sets world matrix of emitter
matrix | the matrix to be set |
|
protected |
mesh used as emitter
|
protected |
random number generator
|
protected |
size of emitter
|
protected |
type of emitter
|
protected |
world matrix of emitter