Loading...
Searching...
No Matches
irr::scene::IParticleSystemSceneNode Class Referenceabstract

A particle system scene node for creating snow, fire, exlosions, smoke... More...

`#include <IParticleSystemSceneNode.h>`

Inheritance diagram for irr::scene::IParticleSystemSceneNode:

## Public Member Functions

| IParticleSystemSceneNode (ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))
| Constructor.
virtual void | addAffector (IParticleAffector *affector)=0
| Adds new particle effector to the particle system.
virtual void | clearParticles ()=0
| Remove all currently visible particles.

virtual IParticleAnimatedMeshSceneNodeEmitter *

createAnimatedMeshSceneNodeEmitter (scene::IAnimatedMeshSceneNode *node, bool useNormalDirection=true, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), f32 normalDirectionModifier=100.0f, s32 mbNumber=-1, bool everyMeshVertex=false, u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0

| Creates a particle emitter for an animated mesh scene node.
virtual IParticleAttractionAffector * | createAttractionAffector (const core::vector3df &point, f32 speed=1.0f, bool attract=true, bool affectX=true, bool affectY=true, bool affectZ=true)=0
| Creates a point attraction affector.

virtual IParticleBoxEmitter *

createBoxEmitter (const core::aabbox3df &box=core::aabbox3df(-10, 28,-10, 10, 30, 10), const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0

| Creates a box particle emitter.

virtual IParticleCylinderEmitter *

createCylinderEmitter (const core::vector3df &center, f32 radius, const core::vector3df &normal, f32 length, bool outlineOnly=false, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0

| Creates a particle emitter for emitting from a cylinder.
virtual IParticleFadeOutAffector * | createFadeOutParticleAffector (const video::SColor &targetColor=video::SColor(0, 0, 0, 0), u32 timeNeededToFadeOut=1000)=0
| Creates a fade out particle affector.
virtual IParticleGravityAffector * | createGravityAffector (const core::vector3df &gravity=core::vector3df(0.0f,-0.03f, 0.0f), u32 timeForceLost=1000)=0
| Creates a gravity affector.

virtual IParticleMeshEmitter *

createMeshEmitter (scene::IMesh *mesh, bool useNormalDirection=true, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), f32 normalDirectionModifier=100.0f, s32 mbNumber=-1, bool everyMeshVertex=false, u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0

| Creates a mesh particle emitter.

virtual IParticlePointEmitter *

createPointEmitter (const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0

| Creates a point particle emitter.

virtual IParticleRingEmitter *

createRingEmitter (const core::vector3df &center, f32 radius, f32 ringThickness, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0

| Creates a ring particle emitter.
virtual IParticleRotationAffector * | createRotationAffector (const core::vector3df &speed=core::vector3df(5.0f, 5.0f, 5.0f), const core::vector3df &pivotPoint=core::vector3df(0.0f, 0.0f, 0.0f))=0
| Creates a rotation affector.
virtual IParticleAffector * | createScaleParticleAffector (const core::dimension2df &scaleTo=core::dimension2df(1.0f, 1.0f))=0
| Creates a scale particle affector.

virtual IParticleSphereEmitter *

createSphereEmitter (const core::vector3df &center, f32 radius, const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0

| Creates a sphere particle emitter.
virtual void | doParticleSystem (u32 time)=0
virtual const core::list< IParticleAffector * > & | getAffectors () const =0
| Get a list of all particle affectors.
virtual IParticleEmitter * | getEmitter ()=0
| Gets the particle emitter, which creates the particles.
virtual void | removeAllAffectors ()=0
| Removes all particle affectors in the particle system.
virtual void | setEmitter (IParticleEmitter *emitter)=0
| Sets the particle emitter, which creates the particles.
virtual void | setParticlesAreGlobal (bool global=true)=0
| Sets if the particles should be global.
virtual void | setParticleSize (const core::dimension2d< f32 > &size=core::dimension2d< f32 >(5.0f, 5.0f))=0
| Sets the size of all particles.
Public Member Functions inherited from irr::scene::ISceneNode
| ISceneNode (ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))
| Constructor.
virtual | ~ISceneNode ()
| Destructor.
virtual void | addAnimator (ISceneNodeAnimator *animator)
| Adds an animator which should animate this node.
virtual void | addChild (ISceneNode *child)
| Adds a child to this scene node.
virtual ISceneNode * | clone (ISceneNode *newParent=0, ISceneManager *newManager=0)
| Creates a clone of this scene node and its children.
virtual void | deserializeAttributes (io::IAttributes *in, io::SAttributeReadWriteOptions *options=0)
| Reads attributes of the scene node.
virtual core::vector3df | getAbsolutePosition () const
| Gets the absolute position of the node in world coordinates.
virtual const core::matrix4 & | getAbsoluteTransformation () const
| Get the absolute transformation of the node. Is recalculated every OnAnimate()-call.
const core::list< ISceneNodeAnimator * > & | getAnimators () const
| Get a list of all scene node animators.
u32 | getAutomaticCulling () const
| Gets the automatic culling state.
virtual const core::aabbox3d< f32 > & | getBoundingBox () const =0
| Get the axis aligned, not transformed bounding box of this node.
const core::list< ISceneNode * > & | getChildren () const
| Returns a const reference to the list of all children.
virtual s32 | getID () const
| Get the id of the scene node.
virtual video::SMaterial & | getMaterial (u32 num)
| Returns the material based on the zero based index i.
virtual u32 | getMaterialCount () const
| Get amount of materials used by this scene node.
virtual const c8 * | getName () const
| Returns the name of the node.
scene::ISceneNode * | getParent () const
| Returns the parent of this scene node.
virtual const core::vector3df & | getPosition () const
| Gets the position of the node relative to its parent.
virtual core::matrix4 | getRelativeTransformation () const
| Returns the relative transformation of the scene node.
virtual const core::vector3df & | getRotation () const
| Gets the rotation of the node relative to its parent.
virtual const core::vector3df & | getScale () const
| Gets the scale of the scene node relative to its parent.
virtual ISceneManager * | getSceneManager (void) const
| Retrieve the scene manager for this node.
virtual const core::aabbox3d< f32 > | getTransformedBoundingBox () const
| Get the axis aligned, transformed and animated absolute bounding box of this node.
virtual ITriangleSelector * | getTriangleSelector () const
| Returns the triangle selector attached to this scene node.
virtual ESCENE_NODE_TYPE | getType () const
| Returns type of the scene node.
u32 | isDebugDataVisible () const
| Returns if debug data like bounding boxes are drawn.
bool | isDebugObject () const
| Returns if this scene node is a debug object.
virtual bool | isTrulyVisible () const
| Check whether the node is truly visible, taking into accounts its parents' visibility.
virtual bool | isVisible () const
| Returns whether the node should be visible (if all of its parents are visible).
virtual void | OnAnimate (u32 timeMs)
| OnAnimate() is called just before rendering the whole scene.
virtual void | OnRegisterSceneNode ()
| This method is called just before the rendering process of the whole scene.
virtual void | remove ()
| Removes this scene node from the scene.
virtual void | removeAll ()
| Removes all children of this scene node.
virtual void | removeAnimator (ISceneNodeAnimator *animator)
| Removes an animator from this scene node.
virtual void | removeAnimators ()
| Removes all animators from this scene node.
virtual bool | removeChild (ISceneNode *child)
| Removes a child from this scene node.
virtual void | render ()=0
| Renders the node.
virtual void | serializeAttributes (io::IAttributes *out, io::SAttributeReadWriteOptions *options=0) const
| Writes attributes of the scene node.
void | setAutomaticCulling (u32 state)
| Enables or disables automatic culling based on the bounding box.
virtual void | setDebugDataVisible (u32 state)
| Sets if debug data like bounding boxes should be drawn.
virtual void | setID (s32 id)
| Sets the id of the scene node.
void | setIsDebugObject (bool debugObject)
| Sets if this scene node is a debug object.
void | setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue)
| Sets all material flags at once to a new value.
void | setMaterialTexture (u32 textureLayer, video::ITexture *texture)
| Sets the texture of the specified layer in all materials of this scene node to the new texture.
void | setMaterialType (video::E_MATERIAL_TYPE newType)
| Sets the material type of all materials in this scene node to a new material type.
virtual void | setName (const c8 *name)
| Sets the name of the node.
virtual void | setName (const core::stringc &name)
| Sets the name of the node.
virtual void | setParent (ISceneNode *newParent)
| Changes the parent of the scene node.
virtual void | setPosition (const core::vector3df &newpos)
| Sets the position of the node relative to its parent.
virtual void | setRotation (const core::vector3df &rotation)
| Sets the rotation of the node relative to its parent.
virtual void | setScale (const core::vector3df &scale)
| Sets the relative scale of the scene node.
virtual void | setTriangleSelector (ITriangleSelector *selector)
| Sets the triangle selector of the scene node.
virtual void | setVisible (bool isVisible)
| Sets if the node should be visible or not.
virtual void | updateAbsolutePosition ()
| Updates the absolute position based on the relative and the parents position.
Public Member Functions inherited from irr::IReferenceCounted
| IReferenceCounted ()
| Constructor.
virtual | ~IReferenceCounted ()
| Destructor.
bool | drop () const
| Drops the object. Decrements the reference counter by one.
const c8 * | getDebugName () const
| Returns the debug name of the object.
s32 | getReferenceCount () const
| Get the reference count.
void | grab () const
| Grabs the object. Increments the reference counter by one.

## Additional Inherited Members

Protected Member Functions inherited from irr::scene::ISceneNode
void | cloneMembers (ISceneNode *toCopyFrom, ISceneManager *newManager)
| A clone function for the ISceneNode members.
void | setSceneManager (ISceneManager *newManager)
Protected Member Functions inherited from irr::IReferenceCounted
void | setDebugName (const c8 *newName)
| Sets the debug name of the object.
Protected Attributes inherited from irr::scene::ISceneNode
core::matrix4 | AbsoluteTransformation
| Absolute transformation of the node.
core::list< ISceneNodeAnimator * > | Animators
| List of all animator nodes.
u32 | AutomaticCullingState
| Automatic culling state.
core::list< ISceneNode * > | Children
| List of all children of this node.
u32 | DebugDataVisible
| Flag if debug data should be drawn, such as Bounding Boxes.
s32 | ID
| ID of the node.
bool | IsDebugObject
| Is debug object?
bool | IsVisible
| Is the node visible?
core::stringc | Name
| Name of the scene node.
ISceneNode * | Parent
| Pointer to the parent.
core::vector3df | RelativeRotation
| Relative rotation of the scene node.
core::vector3df | RelativeScale
| Relative scale of the scene node.
core::vector3df | RelativeTranslation
| Relative translation of the scene node.
ISceneManager * | SceneManager
| Pointer to the scene manager.
ITriangleSelector * | TriangleSelector
| Pointer to the triangle selector.

## Detailed Description

A particle system scene node for creating snow, fire, exlosions, smoke...

A scene node controlling a particle System. The behavior of the particles can be controlled by setting the right particle emitters and affectors. You can for example easily create a campfire by doing this:

scene::IParticleSystemSceneNode* p = scenemgr->addParticleSystemSceneNode();
p->setParticleSize(core::dimension2d<f32>(20.0f, 10.0f));
scene::IParticleEmitter* em = p->createBoxEmitter(
core::aabbox3d<f32>(-5,0,-5,5,1,5),
core::vector3df(0.0f,0.03f,0.0f),
40,80, video::SColor(0,255,255,255),video::SColor(0,255,255,255), 1100,2000);
p->setEmitter(em);
em->drop();
scene::IParticleAffector* paf = p->createFadeOutParticleAffector();
p->addAffector(paf);
paf->drop();
irr::IReferenceCounted::drop
bool drop() const
Drops the object. Decrements the reference counter by one.
Definition IReferenceCounted.h:116
irr::core::aabbox3d
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.h:22
irr::core::dimension2d
Specifies a 2 dimensional size.
Definition dimension2d.h:21
irr::scene::IParticleAffector
A particle affector modifies particles.
Definition IParticleAffector.h:42
irr::scene::IParticleEmitter
A particle emitter for using with particle systems.
Definition IParticleEmitter.h:46
irr::scene::IParticleSystemSceneNode
A particle system scene node for creating snow, fire, exlosions, smoke...
Definition IParticleSystemSceneNode.h:47
irr::scene::IParticleSystemSceneNode::createFadeOutParticleAffector
virtual IParticleFadeOutAffector * createFadeOutParticleAffector(const video::SColor &targetColor=video::SColor(0, 0, 0, 0), u32 timeNeededToFadeOut=1000)=0
Creates a fade out particle affector.
irr::scene::IParticleSystemSceneNode::setParticleSize
virtual void setParticleSize(const core::dimension2d< f32 > &size=core::dimension2d< f32 >(5.0f, 5.0f))=0
Sets the size of all particles.
irr::scene::IParticleSystemSceneNode::addAffector
virtual void addAffector(IParticleAffector *affector)=0
Adds new particle effector to the particle system.
irr::scene::IParticleSystemSceneNode::createBoxEmitter
virtual IParticleBoxEmitter * createBoxEmitter(const core::aabbox3df &box=core::aabbox3df(-10, 28,-10, 10, 30, 10), const core::vector3df &direction=core::vector3df(0.0f, 0.03f, 0.0f), u32 minParticlesPerSecond=5, u32 maxParticlesPerSecond=10, const video::SColor &minStartColor=video::SColor(255, 0, 0, 0), const video::SColor &maxStartColor=video::SColor(255, 255, 255, 255), u32 lifeTimeMin=2000, u32 lifeTimeMax=4000, s32 maxAngleDegrees=0, const core::dimension2df &minStartSize=core::dimension2df(5.0f, 5.0f), const core::dimension2df &maxStartSize=core::dimension2df(5.0f, 5.0f))=0
Creates a box particle emitter.
irr::scene::IParticleSystemSceneNode::setEmitter
virtual void setEmitter(IParticleEmitter *emitter)=0
Sets the particle emitter, which creates the particles.
irr::video::SColor
Class representing a 32 bit ARGB color.
Definition SColor.h:202
irr::core::vector3df
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445

Definition at line 46 of file IParticleSystemSceneNode.h.

## Constructor & Destructor Documentation

## IParticleSystemSceneNode()

irr::scene::IParticleSystemSceneNode::IParticleSystemSceneNode | ( | ISceneNode * | parent,
|  | ISceneManager * | mgr,
|  | s32 | id,
|  | const core::vector3df & | position = core::vector3df(0,0,0),
|  | const core::vector3df & | rotation = core::vector3df(0,0,0),
|  | const core::vector3df & | scale = core::vector3df(1.0f, 1.0f, 1.0f) )

inline

Constructor.

Definition at line 51 of file IParticleSystemSceneNode.h.

References irr::scene::ISceneNode::ISceneNode().

## Member Function Documentation

## addAffector()

virtual void irr::scene::IParticleSystemSceneNode::addAffector | ( | IParticleAffector * | affector | ) |

pure virtual

Adds new particle effector to the particle system.

A particle affector modifies the particles. For example, the FadeOut affector lets all particles fade out after some time. It is created and used in this way:

IParticleAffector* p = createFadeOutParticleAffector();
addAffector(p);
p->drop();

Please note that an affector is not necessary for the particle system to work.

Parameters

  affector | New affector.

## clearParticles()

virtual void irr::scene::IParticleSystemSceneNode::clearParticles | ( |  | ) |

pure virtual

Remove all currently visible particles.

## createAnimatedMeshSceneNodeEmitter()

virtual IParticleAnimatedMeshSceneNodeEmitter * irr::scene::IParticleSystemSceneNode::createAnimatedMeshSceneNodeEmitter | ( | scene::IAnimatedMeshSceneNode * | node,
|  | bool | useNormalDirection = true,
|  | const core::vector3df & | direction = core::vector3df(0.0f, 0.03f, 0.0f),
|  | f32 | normalDirectionModifier = 100.0f,
|  | s32 | mbNumber = -1,
|  | bool | everyMeshVertex = false,
|  | u32 | minParticlesPerSecond = 5,
|  | u32 | maxParticlesPerSecond = 10,
|  | const video::SColor & | minStartColor = video::SColor(255, 0, 0, 0),
|  | const video::SColor & | maxStartColor = video::SColor(255, 255, 255, 255),
|  | u32 | lifeTimeMin = 2000,
|  | u32 | lifeTimeMax = 4000,
|  | s32 | maxAngleDegrees = 0,
|  | const core::dimension2df & | minStartSize = core::dimension2df(5.0f, 5.0f),
|  | const core::dimension2df & | maxStartSize = core::dimension2df(5.0f, 5.0f) )

pure virtual

Creates a particle emitter for an animated mesh scene node.

Parameters

  node | Pointer to the animated mesh scene node to emit particles from
  useNormalDirection | If true, the direction of each particle created will be the normal of the vertex that it's emitting from. The normal is divided by the normalDirectionModifier parameter, which defaults to 100.0f.
  direction | Direction and speed of particle emission.
  normalDirectionModifier | If the emitter is using the normal direction then the normal of the vertex that is being emitted from is divided by this number.
  mbNumber | This allows you to specify a specific meshBuffer for the IMesh* to emit particles from. The default value is -1, which means a random meshBuffer picked from all of the meshes meshBuffers will be selected to pick a random vertex from. If the value is 0 or greater, it will only pick random vertices from the meshBuffer specified by this value.
  everyMeshVertex | If true, the emitter will emit between min/max particles every second, for every vertex in the mesh, if false, it will emit between min/max particles from random vertices in the mesh.
  minParticlesPerSecond | Minimal amount of particles emitted per second.
  maxParticlesPerSecond | Maximal amount of particles emitted per second.
  minStartColor | Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  maxStartColor | Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  lifeTimeMin | Minimal lifetime of a particle, in milliseconds.
  lifeTimeMax | Maximal lifetime of a particle, in milliseconds.
  maxAngleDegrees | Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
  minStartSize | Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
  maxStartSize | Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.

Returns
  Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createAttractionAffector()

virtual IParticleAttractionAffector * irr::scene::IParticleSystemSceneNode::createAttractionAffector | ( | const core::vector3df & | point,
|  | f32 | speed = 1.0f,
|  | bool | attract = true,
|  | bool | affectX = true,
|  | bool | affectY = true,
|  | bool | affectZ = true )

pure virtual

Creates a point attraction affector.

This affector modifies the positions of the particles and attracts them to a specified point at a specified speed per second.

Parameters

  point | Point to attract particles to.
  speed | Speed in units per second, to attract to the specified point.
  attract | Whether the particles attract or detract from this point.
  affectX | Whether or not this will affect the X position of the particle.
  affectY | Whether or not this will affect the Y position of the particle.
  affectZ | Whether or not this will affect the Z position of the particle.

Returns
  Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createBoxEmitter()

virtual IParticleBoxEmitter * irr::scene::IParticleSystemSceneNode::createBoxEmitter | ( | const core::aabbox3df & | box = core::aabbox3df(-10, 28,-10, 10, 30, 10),
|  | const core::vector3df & | direction = core::vector3df(0.0f, 0.03f, 0.0f),
|  | u32 | minParticlesPerSecond = 5,
|  | u32 | maxParticlesPerSecond = 10,
|  | const video::SColor & | minStartColor = video::SColor(255, 0, 0, 0),
|  | const video::SColor & | maxStartColor = video::SColor(255, 255, 255, 255),
|  | u32 | lifeTimeMin = 2000,
|  | u32 | lifeTimeMax = 4000,
|  | s32 | maxAngleDegrees = 0,
|  | const core::dimension2df & | minStartSize = core::dimension2df(5.0f, 5.0f),
|  | const core::dimension2df & | maxStartSize = core::dimension2df(5.0f, 5.0f) )

pure virtual

Creates a box particle emitter.

Parameters

  box | The box for the emitter.
  direction | Direction and speed of particle emission.
  minParticlesPerSecond | Minimal amount of particles emitted per second.
  maxParticlesPerSecond | Maximal amount of particles emitted per second.
  minStartColor | Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  maxStartColor | Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  lifeTimeMin | Minimal lifetime of a particle, in milliseconds.
  lifeTimeMax | Maximal lifetime of a particle, in milliseconds.
  maxAngleDegrees | Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
  minStartSize | Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
  maxStartSize | Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.

Returns
  Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createCylinderEmitter()

virtual IParticleCylinderEmitter * irr::scene::IParticleSystemSceneNode::createCylinderEmitter | ( | const core::vector3df & | center,
|  | f32 | radius,
|  | const core::vector3df & | normal,
|  | f32 | length,
|  | bool | outlineOnly = false,
|  | const core::vector3df & | direction = core::vector3df(0.0f, 0.03f, 0.0f),
|  | u32 | minParticlesPerSecond = 5,
|  | u32 | maxParticlesPerSecond = 10,
|  | const video::SColor & | minStartColor = video::SColor(255, 0, 0, 0),
|  | const video::SColor & | maxStartColor = video::SColor(255, 255, 255, 255),
|  | u32 | lifeTimeMin = 2000,
|  | u32 | lifeTimeMax = 4000,
|  | s32 | maxAngleDegrees = 0,
|  | const core::dimension2df & | minStartSize = core::dimension2df(5.0f, 5.0f),
|  | const core::dimension2df & | maxStartSize = core::dimension2df(5.0f, 5.0f) )

pure virtual

Creates a particle emitter for emitting from a cylinder.

Parameters

  center | The center of the circle at the base of the cylinder
  radius | The thickness of the cylinder
  normal | Direction of the length of the cylinder
  length | The length of the the cylinder
  outlineOnly | Whether or not to put points inside the cylinder or on the outline only
  direction | Direction and speed of particle emission.
  minParticlesPerSecond | Minimal amount of particles emitted per second.
  maxParticlesPerSecond | Maximal amount of particles emitted per second.
  minStartColor | Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  maxStartColor | Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  lifeTimeMin | Minimal lifetime of a particle, in milliseconds.
  lifeTimeMax | Maximal lifetime of a particle, in milliseconds.
  maxAngleDegrees | Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
  minStartSize | Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
  maxStartSize | Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.

Returns
  Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createFadeOutParticleAffector()

virtual IParticleFadeOutAffector * irr::scene::IParticleSystemSceneNode::createFadeOutParticleAffector | ( | const video::SColor & | targetColor = video::SColor(0, 0, 0, 0),
|  | u32 | timeNeededToFadeOut = 1000 )

pure virtual

Creates a fade out particle affector.

This affector modifies the color of every particle and and reaches the final color when the particle dies. This affector looks really good, if the EMT_TRANSPARENT_ADD_COLOR material is used and the targetColor is video::SColor(0,0,0,0): Particles are fading out into void with this setting.

Parameters

  targetColor | Color whereto the color of the particle is changed.
  timeNeededToFadeOut | How much time in milli seconds should the affector need to change the color to the targetColor.

Returns
  Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createGravityAffector()

virtual IParticleGravityAffector * irr::scene::IParticleSystemSceneNode::createGravityAffector | ( | const core::vector3df & | gravity = core::vector3df(0.0f,-0.03f, 0.0f),
|  | u32 | timeForceLost = 1000 )

pure virtual

Creates a gravity affector.

This affector modifies the direction of the particle. It assumes that the particle is fired out of the emitter with huge force, but is loosing this after some time and is catched by the gravity then. This affector is ideal for creating things like fountains.

Parameters

  gravity | Direction and force of gravity.
  timeForceLost | Time in milli seconds when the force of the emitter is totally lost and the particle does not move any more. This is the time where gravity fully affects the particle.

Returns
  Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createMeshEmitter()

virtual IParticleMeshEmitter * irr::scene::IParticleSystemSceneNode::createMeshEmitter | ( | scene::IMesh * | mesh,
|  | bool | useNormalDirection = true,
|  | const core::vector3df & | direction = core::vector3df(0.0f, 0.03f, 0.0f),
|  | f32 | normalDirectionModifier = 100.0f,
|  | s32 | mbNumber = -1,
|  | bool | everyMeshVertex = false,
|  | u32 | minParticlesPerSecond = 5,
|  | u32 | maxParticlesPerSecond = 10,
|  | const video::SColor & | minStartColor = video::SColor(255, 0, 0, 0),
|  | const video::SColor & | maxStartColor = video::SColor(255, 255, 255, 255),
|  | u32 | lifeTimeMin = 2000,
|  | u32 | lifeTimeMax = 4000,
|  | s32 | maxAngleDegrees = 0,
|  | const core::dimension2df & | minStartSize = core::dimension2df(5.0f, 5.0f),
|  | const core::dimension2df & | maxStartSize = core::dimension2df(5.0f, 5.0f) )

pure virtual

Creates a mesh particle emitter.

Parameters

  mesh | Pointer to mesh to emit particles from
  useNormalDirection | If true, the direction of each particle created will be the normal of the vertex that it's emitting from. The normal is divided by the normalDirectionModifier parameter, which defaults to 100.0f.
  direction | Direction and speed of particle emission.
  normalDirectionModifier | If the emitter is using the normal direction then the normal of the vertex that is being emitted from is divided by this number.
  mbNumber | This allows you to specify a specific meshBuffer for the IMesh* to emit particles from. The default value is -1, which means a random meshBuffer picked from all of the meshes meshBuffers will be selected to pick a random vertex from. If the value is 0 or greater, it will only pick random vertices from the meshBuffer specified by this value.
  everyMeshVertex | If true, the emitter will emit between min/max particles every second, for every vertex in the mesh, if false, it will emit between min/max particles from random vertices in the mesh.
  minParticlesPerSecond | Minimal amount of particles emitted per second.
  maxParticlesPerSecond | Maximal amount of particles emitted per second.
  minStartColor | Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  maxStartColor | Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  lifeTimeMin | Minimal lifetime of a particle, in milliseconds.
  lifeTimeMax | Maximal lifetime of a particle, in milliseconds.
  maxAngleDegrees | Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
  minStartSize | Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
  maxStartSize | Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.

Returns
  Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createPointEmitter()

virtual IParticlePointEmitter * irr::scene::IParticleSystemSceneNode::createPointEmitter | ( | const core::vector3df & | direction = core::vector3df(0.0f, 0.03f, 0.0f),
|  | u32 | minParticlesPerSecond = 5,
|  | u32 | maxParticlesPerSecond = 10,
|  | const video::SColor & | minStartColor = video::SColor(255, 0, 0, 0),
|  | const video::SColor & | maxStartColor = video::SColor(255, 255, 255, 255),
|  | u32 | lifeTimeMin = 2000,
|  | u32 | lifeTimeMax = 4000,
|  | s32 | maxAngleDegrees = 0,
|  | const core::dimension2df & | minStartSize = core::dimension2df(5.0f, 5.0f),
|  | const core::dimension2df & | maxStartSize = core::dimension2df(5.0f, 5.0f) )

pure virtual

Creates a point particle emitter.

Parameters

  direction | Direction and speed of particle emission.
  minParticlesPerSecond | Minimal amount of particles emitted per second.
  maxParticlesPerSecond | Maximal amount of particles emitted per second.
  minStartColor | Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  maxStartColor | Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  lifeTimeMin | Minimal lifetime of a particle, in milliseconds.
  lifeTimeMax | Maximal lifetime of a particle, in milliseconds.
  maxAngleDegrees | Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
  minStartSize | Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
  maxStartSize | Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.

Returns
  Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createRingEmitter()

virtual IParticleRingEmitter * irr::scene::IParticleSystemSceneNode::createRingEmitter | ( | const core::vector3df & | center,
|  | f32 | radius,
|  | f32 | ringThickness,
|  | const core::vector3df & | direction = core::vector3df(0.0f, 0.03f, 0.0f),
|  | u32 | minParticlesPerSecond = 5,
|  | u32 | maxParticlesPerSecond = 10,
|  | const video::SColor & | minStartColor = video::SColor(255, 0, 0, 0),
|  | const video::SColor & | maxStartColor = video::SColor(255, 255, 255, 255),
|  | u32 | lifeTimeMin = 2000,
|  | u32 | lifeTimeMax = 4000,
|  | s32 | maxAngleDegrees = 0,
|  | const core::dimension2df & | minStartSize = core::dimension2df(5.0f, 5.0f),
|  | const core::dimension2df & | maxStartSize = core::dimension2df(5.0f, 5.0f) )

pure virtual

Creates a ring particle emitter.

Parameters

  center | Center of ring
  radius | Distance of points from center, points will be rotated around the Y axis at a random 360 degrees and will then be shifted by the provided ringThickness values in each axis.
  ringThickness | : thickness of the ring or how wide the ring is
  direction | Direction and speed of particle emission.
  minParticlesPerSecond | Minimal amount of particles emitted per second.
  maxParticlesPerSecond | Maximal amount of particles emitted per second.
  minStartColor | Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  maxStartColor | Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  lifeTimeMin | Minimal lifetime of a particle, in milliseconds.
  lifeTimeMax | Maximal lifetime of a particle, in milliseconds.
  maxAngleDegrees | Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
  minStartSize | Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
  maxStartSize | Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.

Returns
  Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createRotationAffector()

virtual IParticleRotationAffector * irr::scene::IParticleSystemSceneNode::createRotationAffector | ( | const core::vector3df & | speed = core::vector3df(5.0f, 5.0f, 5.0f),
|  | const core::vector3df & | pivotPoint = core::vector3df(0.0f, 0.0f, 0.0f) )

pure virtual

Creates a rotation affector.

This affector modifies the positions of the particles and attracts them to a specified point at a specified speed per second.

Parameters

  speed | Rotation in degrees per second
  pivotPoint | Point to rotate the particles around

Returns
  Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## createScaleParticleAffector()

virtual IParticleAffector * irr::scene::IParticleSystemSceneNode::createScaleParticleAffector | ( | const core::dimension2df & | scaleTo = core::dimension2df(1.0f, 1.0f) | ) |

pure virtual

Creates a scale particle affector.

This affector scales the particle to the a multiple of its size defined by the scaleTo variable.

Parameters

  scaleTo | multiple of the size which the particle will be scaled to until deletion

Returns
  Pointer to the created particle affector. To add this affector as new affector of this particle system, just call addAffector(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more information.

## createSphereEmitter()

virtual IParticleSphereEmitter * irr::scene::IParticleSystemSceneNode::createSphereEmitter | ( | const core::vector3df & | center,
|  | f32 | radius,
|  | const core::vector3df & | direction = core::vector3df(0.0f, 0.03f, 0.0f),
|  | u32 | minParticlesPerSecond = 5,
|  | u32 | maxParticlesPerSecond = 10,
|  | const video::SColor & | minStartColor = video::SColor(255, 0, 0, 0),
|  | const video::SColor & | maxStartColor = video::SColor(255, 255, 255, 255),
|  | u32 | lifeTimeMin = 2000,
|  | u32 | lifeTimeMax = 4000,
|  | s32 | maxAngleDegrees = 0,
|  | const core::dimension2df & | minStartSize = core::dimension2df(5.0f, 5.0f),
|  | const core::dimension2df & | maxStartSize = core::dimension2df(5.0f, 5.0f) )

pure virtual

Creates a sphere particle emitter.

Parameters

  center | Center of sphere
  radius | Radius of sphere
  direction | Direction and speed of particle emission.
  minParticlesPerSecond | Minimal amount of particles emitted per second.
  maxParticlesPerSecond | Maximal amount of particles emitted per second.
  minStartColor | Minimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  maxStartColor | Maximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
  lifeTimeMin | Minimal lifetime of a particle, in milliseconds.
  lifeTimeMax | Maximal lifetime of a particle, in milliseconds.
  maxAngleDegrees | Maximal angle in degrees, the emitting direction of the particle will differ from the original direction.
  minStartSize | Minimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
  maxStartSize | Maximal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.

Returns
  Pointer to the created particle emitter. To set this emitter as new emitter of this particle system, just call setEmitter(). Note that you'll have to drop() the returned pointer, after you don't need it any more, see IReferenceCounted::drop() for more informations.

## doParticleSystem()

virtual void irr::scene::IParticleSystemSceneNode::doParticleSystem | ( | u32 | time | ) |

pure virtual

Do manually update the particles. This should only be called when you want to render the node outside the scenegraph, as the node will care about this otherwise automatically.

## getAffectors()

virtual const core::list< IParticleAffector * > & irr::scene::IParticleSystemSceneNode::getAffectors | ( |  | ) | const

pure virtual

Get a list of all particle affectors.

Returns
  The list of particle affectors attached to this node.

## getEmitter()

virtual IParticleEmitter * irr::scene::IParticleSystemSceneNode::getEmitter | ( |  | ) |

pure virtual

Gets the particle emitter, which creates the particles.

Returns
  The particle emitter. Can be 0 if none is set.

## removeAllAffectors()

virtual void irr::scene::IParticleSystemSceneNode::removeAllAffectors | ( |  | ) |

pure virtual

Removes all particle affectors in the particle system.

## setEmitter()

virtual void irr::scene::IParticleSystemSceneNode::setEmitter | ( | IParticleEmitter * | emitter | ) |

pure virtual

Sets the particle emitter, which creates the particles.

A particle emitter can be created using one of the createEmitter methods. For example to create and use a simple PointEmitter, call IParticleEmitter* p = createPointEmitter(); setEmitter(p); p->drop();

Parameters

  emitter | Sets the particle emitter. You can set this to 0 for removing the current emitter and stopping the particle system emitting new particles.

## setParticlesAreGlobal()

virtual void irr::scene::IParticleSystemSceneNode::setParticlesAreGlobal | ( | bool | global = true | ) |

pure virtual

Sets if the particles should be global.

If they are, the particles are affected by the movement of the particle system scene node too, otherwise they completely ignore it. Default is true.

## setParticleSize()

virtual void irr::scene::IParticleSystemSceneNode::setParticleSize | ( | const core::dimension2d< f32 > & | size = core::dimension2d< f32 >(5.0f, 5.0f) | ) |

pure virtual

Sets the size of all particles.

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

- IParticleSystemSceneNode.h

- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0