5#ifndef JPP_I_PARTICLE_SYSTEM_SCENE_NODE_HPP_INCLUDED
6#define JPP_I_PARTICLE_SYSTEM_SCENE_NODE_HPP_INCLUDED
8#include <jimcpp/core/engine/ISceneNode.hpp>
9#include <jimcpp/core/engine/IParticleAnimatedMeshSceneNodeEmitter.hpp>
10#include <jimcpp/core/engine/IParticleBoxEmitter.hpp>
11#include <jimcpp/core/engine/IParticleCylinderEmitter.hpp>
12#include <jimcpp/core/engine/IParticleMeshEmitter.hpp>
13#include <jimcpp/core/engine/IParticleRingEmitter.hpp>
14#include <jimcpp/core/engine/IParticleSphereEmitter.hpp>
15#include <jimcpp/core/engine/IParticleAttractionAffector.hpp>
16#include <jimcpp/core/engine/IParticleFadeOutAffector.hpp>
17#include <jimcpp/core/engine/IParticleGravityAffector.hpp>
18#include <jimcpp/core/engine/IParticleRotationAffector.hpp>
19#include <jimcpp/core/engine/dimension2d.hpp>
80 :
ISceneNode(parent, mgr, id, position, rotation, scale)
101 ParticleBehavior = flags;
110 return ParticleBehavior;
203 f32 normalDirectionModifier = 100.0f,
s32 mbNumber = -1,
204 bool everyMeshVertex =
false,
205 u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
208 u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
209 s32 maxAngleDegrees = 0,
243 u32 minParticlesPerSecond = 5,
244 u32 maxParticlesPerSecond = 10,
247 u32 lifeTimeMin=2000,
u32 lifeTimeMax=4000,
248 s32 maxAngleDegrees=0,
287 bool outlineOnly =
false,
289 u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
292 u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
293 s32 maxAngleDegrees = 0,
343 f32 normalDirectionModifier = 100.0f,
s32 mbNumber = -1,
344 bool everyMeshVertex =
false,
345 u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10,
348 u32 lifeTimeMin = 2000,
u32 lifeTimeMax = 4000,
349 s32 maxAngleDegrees = 0,
381 u32 minParticlesPerSecond = 5,
382 u32 maxParticlesPerSecond = 10,
385 u32 lifeTimeMin=2000,
u32 lifeTimeMax=4000,
386 s32 maxAngleDegrees=0,
424 u32 minParticlesPerSecond = 5,
425 u32 maxParticlesPerSecond = 10,
428 u32 lifeTimeMin=2000,
u32 lifeTimeMax=4000,
429 s32 maxAngleDegrees=0,
464 u32 minParticlesPerSecond = 5,
465 u32 maxParticlesPerSecond = 10,
468 u32 lifeTimeMin=2000,
u32 lifeTimeMax=4000,
469 s32 maxAngleDegrees=0,
493 bool affectX =
true,
bool affectY =
true,
bool affectZ =
true) = 0;
521 u32 timeNeededToFadeOut = 1000) = 0;
538 u32 timeForceLost = 1000) = 0;
556 out->
addInt(
"ParticleBehavior", ParticleBehavior);
566 s32 ParticleBehavior;
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Provides a generic interface for attributes and their values and the possibility to serialize them.
Definition IAttributes.hpp:42
virtual s32 getAttributeAsInt(const c8 *attributeName, jpp::s32 defaultNotFound=0) const =0
virtual void addInt(const c8 *attributeName, s32 value)=0
Adds an attribute as integer.
class holding data describing options
Definition IAttributeExchangingObject.hpp:35
Scene node capable of displaying an animated mesh.
Definition IAnimatedMeshSceneNode.hpp:52
Class which holds the geometry of an object.
Definition IMesh.hpp:72
A particle affector modifies particles.
Definition IParticleAffector.hpp:42
A particle emitter which emits particles from mesh vertices.
Definition IParticleAnimatedMeshSceneNodeEmitter.hpp:18
A particle affector which attracts or detracts particles.
Definition IParticleAttractionAffector.hpp:17
A particle emitter which emits particles from a box shaped space.
Definition IParticleBoxEmitter.hpp:18
A particle emitter which emits from a cylindrically shaped space.
Definition IParticleCylinderEmitter.hpp:17
A particle emitter for using with particle systems.
Definition IParticleEmitter.hpp:46
A particle affector which fades out the particles.
Definition IParticleFadeOutAffector.hpp:17
A particle affector which applies gravity to particles.
Definition IParticleGravityAffector.hpp:17
A particle emitter which emits from vertices of a mesh.
Definition IParticleMeshEmitter.hpp:18
A particle emitter which emits particles along a ring shaped area.
Definition IParticleRingEmitter.hpp:17
A particle affector which rotates the particle system.
Definition IParticleRotationAffector.hpp:17
A particle emitter which emits from a spherical space.
Definition IParticleSphereEmitter.hpp:17
Definition IParticleSystemSceneNode.hpp:72
virtual void setParticleBehavior(jpp::u32 flags)
Bitflags to change the particle behavior.
Definition IParticleSystemSceneNode.hpp:99
virtual void clearParticles()=0
Remove all currently visible particles.
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 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 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 IParticleRingEmitter * createRingEmitter(const core::vector3df ¢er, 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 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 IParticleGravityAffector * createGravityAffector(const core::vector3df &gravity=core::vector3df(0.0f,-0.03f, 0.0f), u32 timeForceLost=1000)=0
Creates a gravity affector.
virtual const core::list< IParticleAffector * > & getAffectors() const =0
Get a list of all particle affectors.
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 void deserializeAttributes(io::IAttributes *in, io::SAttributeReadWriteOptions *options) override
Reads attributes of the scene node.
Definition IParticleSystemSceneNode.hpp:560
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 IParticleAffector * createScaleParticleAffector(const core::dimension2df &scaleTo=core::dimension2df(1.0f, 1.0f))=0
Creates a scale particle affector.
virtual IParticleEmitter * getEmitter()=0
Gets the particle emitter, which creates the particles.
virtual void addAffector(IParticleAffector *affector)=0
Adds new particle effector to the particle system.
virtual void setEmitter(IParticleEmitter *emitter)=0
Sets the particle emitter, which creates the particles.
virtual void removeAllAffectors()=0
Removes all particle affectors in the particle system.
virtual jpp::u32 getParticleBehavior() const
Gets how particles behave in different situations.
Definition IParticleSystemSceneNode.hpp:108
virtual IParticleFadeOutAffector * createFadeOutParticleAffector(const video::SColor &targetColor=video::SColor(0, 0, 0, 0), u32 timeNeededToFadeOut=1000)=0
Creates a fade out particle affector.
virtual void doParticleSystem(u32 time)=0
Do manually update the particles.
virtual IParticleSphereEmitter * createSphereEmitter(const core::vector3df ¢er, 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 serializeAttributes(io::IAttributes *out, io::SAttributeReadWriteOptions *options) const override
Writes attributes of the scene node.
Definition IParticleSystemSceneNode.hpp:554
virtual void setParticlesAreGlobal(bool global=true)=0
Sets if the particles should be global.
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.
Definition IParticleSystemSceneNode.hpp:76
virtual void setParticleSize(const core::dimension2d< f32 > &size=core::dimension2d< f32 >(5.0f, 5.0f))=0
Sets the size of all particles.
virtual IParticleCylinderEmitter * createCylinderEmitter(const core::vector3df ¢er, 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.
The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
Definition ISceneManager.hpp:160
Scene node interface.
Definition ISceneNode.hpp:43
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
EParticleBehavior
A particle system scene node for creating snow, fire, explosions, smoke...
Definition IParticleSystemSceneNode.hpp:48
@ EPB_EMITTER_FRAME_INTERPOLATION
Definition IParticleSystemSceneNode.hpp:68
@ EPB_EMITTER_VECTOR_IGNORE_ROTATION
Definition IParticleSystemSceneNode.hpp:63
@ EPB_INVISIBLE_ANIMATING
Continue updating particle positions or deleting them even when the node is invisible.
Definition IParticleSystemSceneNode.hpp:56
@ EPB_CLEAR_ON_INVISIBLE
Clear all particles when node gets invisible.
Definition IParticleSystemSceneNode.hpp:59
@ EPB_INVISIBLE_AFFECTING
Continue affecting particles even when the node is invisible.
Definition IParticleSystemSceneNode.hpp:53
@ EPB_INVISIBLE_EMITTING
Continue emitting new particles even when the node is invisible.
Definition IParticleSystemSceneNode.hpp:50
As of Jimcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110