Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
dcpp::scene::IParticleSystemSceneNode Class Referenceabstract
Inheritance diagram for dcpp::scene::IParticleSystemSceneNode:
Inheritance graph
Collaboration diagram for dcpp::scene::IParticleSystemSceneNode:
Collaboration graph

Public Member Functions

 IParticleSystemSceneNode (ISceneNode *parent, ISceneManager *mgr, dcpp::int32_kt id, const dcpp::nub::vector3df &position=dcpp::nub::vector3df(0, 0, 0), const dcpp::nub::vector3df &rotation=dcpp::nub::vector3df(0, 0, 0), const dcpp::nub::vector3df &scale=dcpp::nub::vector3df(1.0f, 1.0f, 1.0f))
 Constructor.
 
virtual void setParticleSize (const dcpp::nub::dimension2df &size=dcpp::nub::dimension2df(5.0f, 5.0f))=0
 Sets the size of all particles.
 
virtual void setParticlesAreGlobal (bool global=true)=0
 Sets if the particles should be global.
 
virtual void setParticleBehavior (dcpp::uint32_kt flags)
 Bitflags to change the particle behavior.
 
virtual dcpp::uint32_kt getParticleBehavior () const
 Gets how particles behave in different situations.
 
virtual void clearParticles ()=0
 Remove all currently visible particles.
 
virtual void doParticleSystem (dcpp::uint32_kt time)=0
 Do manually update the particles.
 
virtual IParticleEmittergetEmitter ()=0
 Gets the particle emitter, which creates the particles.
 
virtual void setEmitter (IParticleEmitter *emitter)=0
 Sets the particle emitter, which creates the particles.
 
virtual void addAffector (IParticleAffector *affector)=0
 Adds new particle effector to the particle system.
 
virtual const dcpp::nub::list< IParticleAffector * > & getAffectors () const =0
 Get a list of all particle affectors.
 
virtual void removeAllAffectors ()=0
 Removes all particle affectors in the particle system.
 
virtual IParticleAnimatedMeshSceneNodeEmittercreateAnimatedMeshSceneNodeEmitter (dcpp::scene::IAnimatedMeshSceneNode *node, bool useNormalDirection=true, const dcpp::nub::vector3df &direction=dcpp::nub::vector3df(0.0f, 0.03f, 0.0f), dcpp::float32_kt normalDirectionModifier=100.0f, dcpp::int32_kt mbNumber=-1, bool everyMeshVertex=false, dcpp::uint32_kt minParticlesPerSecond=5, dcpp::uint32_kt maxParticlesPerSecond=10, const dcpp::video::SColor &minStartColor=dcpp::video::SColor(255, 0, 0, 0), const dcpp::video::SColor &maxStartColor=dcpp::video::SColor(255, 255, 255, 255), dcpp::uint32_kt lifeTimeMin=2000, dcpp::uint32_kt lifeTimeMax=4000, dcpp::int32_kt maxAngleDegrees=0, const dcpp::nub::dimension2df &minStartSize=dcpp::nub::dimension2df(5.0f, 5.0f), const dcpp::nub::dimension2df &maxStartSize=dcpp::nub::dimension2df(5.0f, 5.0f))=0
 Creates a particle emitter for an animated mesh scene node.
 
virtual IParticleBoxEmittercreateBoxEmitter (const dcpp::nub::aabbox3df &box=dcpp::nub::aabbox3df(-10, 28,-10, 10, 30, 10), const dcpp::nub::vector3df &direction=dcpp::nub::vector3df(0.0f, 0.03f, 0.0f), dcpp::uint32_kt minParticlesPerSecond=5, dcpp::uint32_kt maxParticlesPerSecond=10, const dcpp::video::SColor &minStartColor=dcpp::video::SColor(255, 0, 0, 0), const dcpp::video::SColor &maxStartColor=dcpp::video::SColor(255, 255, 255, 255), dcpp::uint32_kt lifeTimeMin=2000, dcpp::uint32_kt lifeTimeMax=4000, dcpp::int32_kt maxAngleDegrees=0, const dcpp::nub::dimension2df &minStartSize=dcpp::nub::dimension2df(5.0f, 5.0f), const dcpp::nub::dimension2df &maxStartSize=dcpp::nub::dimension2df(5.0f, 5.0f))=0
 Creates a box particle emitter.
 
virtual IParticleCylinderEmittercreateCylinderEmitter (const dcpp::nub::vector3df &center, dcpp::float32_kt radius, const dcpp::nub::vector3df &normal, dcpp::float32_kt length, bool outlineOnly=false, const dcpp::nub::vector3df &direction=dcpp::nub::vector3df(0.0f, 0.03f, 0.0f), dcpp::uint32_kt minParticlesPerSecond=5, dcpp::uint32_kt maxParticlesPerSecond=10, const dcpp::video::SColor &minStartColor=dcpp::video::SColor(255, 0, 0, 0), const dcpp::video::SColor &maxStartColor=dcpp::video::SColor(255, 255, 255, 255), dcpp::uint32_kt lifeTimeMin=2000, dcpp::uint32_kt lifeTimeMax=4000, dcpp::int32_kt maxAngleDegrees=0, const dcpp::nub::dimension2df &minStartSize=dcpp::nub::dimension2df(5.0f, 5.0f), const dcpp::nub::dimension2df &maxStartSize=dcpp::nub::dimension2df(5.0f, 5.0f))=0
 Creates a particle emitter for emitting from a cylinder.
 
virtual IParticleMeshEmittercreateMeshEmitter (dcpp::scene::IMesh *mesh, bool useNormalDirection=true, const dcpp::nub::vector3df &direction=dcpp::nub::vector3df(0.0f, 0.03f, 0.0f), dcpp::float32_kt normalDirectionModifier=100.0f, dcpp::int32_kt mbNumber=-1, bool everyMeshVertex=false, dcpp::uint32_kt minParticlesPerSecond=5, dcpp::uint32_kt maxParticlesPerSecond=10, const dcpp::video::SColor &minStartColor=dcpp::video::SColor(255, 0, 0, 0), const dcpp::video::SColor &maxStartColor=dcpp::video::SColor(255, 255, 255, 255), dcpp::uint32_kt lifeTimeMin=2000, dcpp::uint32_kt lifeTimeMax=4000, dcpp::int32_kt maxAngleDegrees=0, const dcpp::nub::dimension2df &minStartSize=dcpp::nub::dimension2df(5.0f, 5.0f), const dcpp::nub::dimension2df &maxStartSize=dcpp::nub::dimension2df(5.0f, 5.0f))=0
 Creates a mesh particle emitter.
 
virtual IParticlePointEmittercreatePointEmitter (const dcpp::nub::vector3df &direction=dcpp::nub::vector3df(0.0f, 0.03f, 0.0f), dcpp::uint32_kt minParticlesPerSecond=5, dcpp::uint32_kt maxParticlesPerSecond=10, const dcpp::video::SColor &minStartColor=dcpp::video::SColor(255, 0, 0, 0), const dcpp::video::SColor &maxStartColor=dcpp::video::SColor(255, 255, 255, 255), dcpp::uint32_kt lifeTimeMin=2000, dcpp::uint32_kt lifeTimeMax=4000, dcpp::int32_kt maxAngleDegrees=0, const dcpp::nub::dimension2df &minStartSize=dcpp::nub::dimension2df(5.0f, 5.0f), const dcpp::nub::dimension2df &maxStartSize=dcpp::nub::dimension2df(5.0f, 5.0f))=0
 Creates a point particle emitter.
 
virtual IParticleRingEmittercreateRingEmitter (const dcpp::nub::vector3df &center, dcpp::float32_kt radius, dcpp::float32_kt ringThickness, const dcpp::nub::vector3df &direction=dcpp::nub::vector3df(0.0f, 0.03f, 0.0f), dcpp::uint32_kt minParticlesPerSecond=5, dcpp::uint32_kt maxParticlesPerSecond=10, const dcpp::video::SColor &minStartColor=dcpp::video::SColor(255, 0, 0, 0), const dcpp::video::SColor &maxStartColor=dcpp::video::SColor(255, 255, 255, 255), dcpp::uint32_kt lifeTimeMin=2000, dcpp::uint32_kt lifeTimeMax=4000, dcpp::int32_kt maxAngleDegrees=0, const dcpp::nub::dimension2df &minStartSize=dcpp::nub::dimension2df(5.0f, 5.0f), const dcpp::nub::dimension2df &maxStartSize=dcpp::nub::dimension2df(5.0f, 5.0f))=0
 Creates a ring particle emitter.
 
virtual IParticleSphereEmittercreateSphereEmitter (const dcpp::nub::vector3df &center, dcpp::float32_kt radius, const dcpp::nub::vector3df &direction=dcpp::nub::vector3df(0.0f, 0.03f, 0.0f), dcpp::uint32_kt minParticlesPerSecond=5, dcpp::uint32_kt maxParticlesPerSecond=10, const dcpp::video::SColor &minStartColor=dcpp::video::SColor(255, 0, 0, 0), const dcpp::video::SColor &maxStartColor=dcpp::video::SColor(255, 255, 255, 255), dcpp::uint32_kt lifeTimeMin=2000, dcpp::uint32_kt lifeTimeMax=4000, dcpp::int32_kt maxAngleDegrees=0, const dcpp::nub::dimension2df &minStartSize=dcpp::nub::dimension2df(5.0f, 5.0f), const dcpp::nub::dimension2df &maxStartSize=dcpp::nub::dimension2df(5.0f, 5.0f))=0
 Creates a sphere particle emitter.
 
virtual IParticleAttractionAffectorcreateAttractionAffector (const dcpp::nub::vector3df &point, dcpp::float32_kt speed=1.0f, bool attract=true, bool affectX=true, bool affectY=true, bool affectZ=true)=0
 Creates a point attraction affector.
 
virtual IParticleAffectorcreateScaleParticleAffector (const dcpp::nub::dimension2df &scaleTo=dcpp::nub::dimension2df(1.0f, 1.0f))=0
 Creates a scale particle affector.
 
virtual IParticleFadeOutAffectorcreateFadeOutParticleAffector (const dcpp::video::SColor &targetColor=dcpp::video::SColor(0, 0, 0, 0), dcpp::uint32_kt timeNeededToFadeOut=1000)=0
 Creates a fade out particle affector.
 
virtual IParticleGravityAffectorcreateGravityAffector (const dcpp::nub::vector3df &gravity=dcpp::nub::vector3df(0.0f,-0.03f, 0.0f), dcpp::uint32_kt timeForceLost=1000)=0
 Creates a gravity affector.
 
virtual IParticleRotationAffectorcreateRotationAffector (const dcpp::nub::vector3df &speed=dcpp::nub::vector3df(5.0f, 5.0f, 5.0f), const dcpp::nub::vector3df &pivotPoint=dcpp::nub::vector3df(0.0f, 0.0f, 0.0f))=0
 Creates a rotation affector.
 
virtual void serializeAttributes (dcpp::io::IAttributes *out, dcpp::io::SAttributeReadWriteOptions *options) const override
 Writes attributes of the scene node.
 
virtual void deserializeAttributes (dcpp::io::IAttributes *in, dcpp::io::SAttributeReadWriteOptions *options) override
 Reads attributes of the scene node.
 
- Public Member Functions inherited from dcpp::scene::ISceneNode
 ISceneNode (ISceneNode *parent, ISceneManager *mgr, dcpp::int32_kt id=-1, const dcpp::nub::vector3df &position=dcpp::nub::vector3df(0, 0, 0), const dcpp::nub::vector3df &rotation=dcpp::nub::vector3df(0, 0, 0), const dcpp::nub::vector3df &scale=dcpp::nub::vector3df(1.0f, 1.0f, 1.0f))
 Constructor.
 
virtual ~ISceneNode ()
 Destructor.
 
virtual void OnRegisterSceneNode ()
 This method is called just before the rendering process of the whole scene.
 
virtual void OnAnimate (dcpp::uint32_kt timeMs)
 OnAnimate() is called just before rendering the whole scene.
 
virtual void render ()=0
 Renders the node.
 
virtual const dcpp::char_ktgetName () const
 Returns the name of the node.
 
virtual void setName (const dcpp::char_kt *name)
 Sets the name of the node.
 
virtual void setName (const dcpp::nub::string &name)
 Sets the name of the node.
 
virtual const dcpp::nub::aabbox3dfgetBoundingBox () const =0
 Get the axis aligned, not transformed bounding box of this node.
 
virtual const dcpp::nub::aabbox3df getTransformedBoundingBox () const
 Get the axis aligned, transformed and animated absolute bounding box of this node.
 
virtual void getTransformedBoundingBoxEdges (dcpp::nub::array< dcpp::nub::vector3df > &edges) const
 
virtual const dcpp::nub::matrix4getAbsoluteTransformation () const
 Get the absolute transformation of the node. Is recalculated every OnAnimate()-call.
 
virtual dcpp::nub::matrix4 getRelativeTransformation () const
 Returns the relative transformation of the scene node.
 
virtual bool isVisible () const
 Returns whether the node should be visible (if all of its parents are visible).
 
virtual bool isTrulyVisible () const
 Check whether the node is truly visible, taking into accounts its parents' visibility.
 
virtual void setVisible (bool isVisible)
 Sets if the node should be visible or not.
 
virtual dcpp::int32_kt getID () const
 Get the id of the scene node.
 
virtual void setID (dcpp::int32_kt id)
 Sets the id of the scene node.
 
virtual void addChild (ISceneNode *child)
 Adds a child to this scene node.
 
virtual bool removeChild (ISceneNode *child)
 Removes a child from this scene node.
 
virtual void removeAll ()
 Removes all children of this scene node.
 
virtual void remove ()
 Removes this scene node from the scene.
 
virtual void addAnimator (ISceneNodeAnimator *animator)
 Adds an animator which should animate this node.
 
const dcpp::nub::list< ISceneNodeAnimator * > & getAnimators () const
 Get a list of all scene node animators.
 
virtual void removeAnimator (ISceneNodeAnimator *animator)
 Removes an animator from this scene node.
 
virtual void removeAnimators ()
 Removes all animators from this scene node.
 
virtual dcpp::video::SMaterialgetMaterial (dcpp::uint32_kt num)
 Returns the material based on the zero based index i.
 
virtual dcpp::uint32_kt getMaterialCount () const
 Get amount of materials used by this scene node.
 
void setMaterialFlag (dcpp::video::E_MATERIAL_FLAG flag, bool newvalue)
 Sets all material flags at once to a new value.
 
void setMaterialTexture (dcpp::uint32_kt textureLayer, dcpp::video::ITexture *texture)
 Sets the texture of the specified layer in all materials of this scene node to the new texture.
 
void setMaterialType (dcpp::video::E_MATERIAL_TYPE newType)
 Sets the material type of all materials in this scene node to a new material type.
 
virtual const dcpp::nub::vector3dfgetScale () const
 Gets the scale of the scene node relative to its parent.
 
virtual void setScale (const dcpp::nub::vector3df &scale)
 Sets the relative scale of the scene node.
 
virtual const dcpp::nub::vector3dfgetRotation () const
 Gets the rotation of the node relative to its parent.
 
virtual void setRotation (const dcpp::nub::vector3df &rotation)
 Sets the rotation of the node relative to its parent.
 
virtual const dcpp::nub::vector3dfgetPosition () const
 Gets the position of the node relative to its parent.
 
virtual void setPosition (const dcpp::nub::vector3df &newpos)
 Sets the position of the node relative to its parent.
 
virtual dcpp::nub::vector3df getAbsolutePosition () const
 Gets the absolute position of the node in world coordinates.
 
void setAutomaticCulling (dcpp::uint32_kt state)
 Set a culling style or disable culling completely.
 
dcpp::uint32_kt getAutomaticCulling () const
 Gets the automatic culling state.
 
void setUpdateAbsolutePosBehavior (ESCENE_NODE_UPDATE_ABS behavior)
 Set how updateAbsolutePosition calculates the absolute transformation matrix.
 
ESCENE_NODE_UPDATE_ABS getUpdateAbsolutePosBehavior () const
 Get how updateAbsolutePosition calculates the absolute transformation matrix.
 
virtual void setDebugDataVisible (dcpp::uint32_kt state)
 Sets if debug data like bounding boxes should be drawn.
 
dcpp::uint32_kt isDebugDataVisible () const
 Returns if debug data like bounding boxes are drawn.
 
void setIsDebugObject (bool debugObject)
 Sets if this scene node is a debug object.
 
bool isDebugObject () const
 Returns if this scene node is a debug object.
 
const dcpp::nub::list< ISceneNode * > & getChildren () const
 Returns a const reference to the list of all children.
 
virtual void setParent (ISceneNode *newParent)
 Changes the parent of the scene node.
 
virtual ITriangleSelectorgetTriangleSelector () const
 Returns the triangle selector attached to this scene node.
 
virtual void setTriangleSelector (ITriangleSelector *selector)
 Sets the triangle selector of the scene node.
 
virtual void updateAbsolutePosition ()
 Updates the absolute tranformation or position based on the relative and the parents transformation.
 
dcpp::scene::ISceneNodegetParent () const
 Returns the parent of this scene node.
 
virtual ESCENE_NODE_TYPE getType () const
 Returns type of the scene node.
 
virtual ISceneNodeclone (ISceneNode *newParent=0, ISceneManager *newManager=0)
 Creates a clone of this scene node and its children.
 
virtual ISceneManagergetSceneManager (void) const
 Retrieve the scene manager for this node.
 
- Public Member Functions inherited from dcpp::IReferenceCounted
 IReferenceCounted ()
 Constructor.
 
virtual ~IReferenceCounted ()
 Destructor.
 
void grab () const
 Grabs the object. Increments the reference counter by one.
 
bool drop () const
 Drops the object. Decrements the reference counter by one.
 
dcpp::int32_kt getReferenceCount () const
 Get the reference count.
 
const dcpp::char_ktgetDebugName () const
 Returns the debug name of the object.
 

Protected Attributes

dcpp::int32_kt ParticleBehavior
 
- Protected Attributes inherited from dcpp::scene::ISceneNode
dcpp::nub::string Name
 Name of the scene node.
 
dcpp::nub::matrix4 AbsoluteTransformation
 Absolute transformation of the node.
 
dcpp::nub::vector3df RelativeTranslation
 Relative translation of the scene node.
 
dcpp::nub::vector3df RelativeRotation
 Relative rotation of the scene node.
 
dcpp::nub::vector3df RelativeScale
 Relative scale of the scene node.
 
ISceneNodeParent
 Pointer to the parent.
 
dcpp::nub::list< ISceneNode * > Children
 List of all children of this node.
 
dcpp::nub::list< ISceneNodeAnimator * > Animators
 List of all animator nodes.
 
ISceneManagerSceneManager
 Pointer to the scene manager.
 
ITriangleSelectorTriangleSelector
 Pointer to the triangle selector.
 
dcpp::int32_kt ID
 ID of the node.
 
ESCENE_NODE_UPDATE_ABS UpdateAbsolutePosBehavior
 How updateAbsolutePosition calculates AbsoluteTransformation.
 
dcpp::uint32_kt AutomaticCullingState
 Automatic culling state.
 
dcpp::uint32_kt DebugDataVisible
 Flag if debug data should be drawn, such as Bounding Boxes.
 
bool IsVisible
 Is the node visible?
 
bool IsDebugObject
 Is debug object?
 

Additional Inherited Members

- Protected Member Functions inherited from dcpp::scene::ISceneNode
void cloneMembers (ISceneNode *toCopyFrom, ISceneManager *newManager)
 A clone function for the ISceneNode members.
 
void setSceneManager (ISceneManager *newManager)
 
- Protected Member Functions inherited from dcpp::IReferenceCounted
void setDebugName (const dcpp::char_kt *newName)
 Sets the debug name of the object.
 

Member Function Documentation

◆ addAffector()

virtual void dcpp::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:

p->drop();
bool drop() const
Drops the object. Decrements the reference counter by one.
Definition IReferenceCounted.hpp:126
A particle affector modifies particles.
Definition IParticleAffector.hpp:42
virtual IParticleFadeOutAffector * createFadeOutParticleAffector(const dcpp::video::SColor &targetColor=dcpp::video::SColor(0, 0, 0, 0), dcpp::uint32_kt timeNeededToFadeOut=1000)=0
Creates a fade out particle affector.
virtual void addAffector(IParticleAffector *affector)=0
Adds new particle effector to the particle system.

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

Parameters
affectorNew affector.

◆ createAnimatedMeshSceneNodeEmitter()

virtual IParticleAnimatedMeshSceneNodeEmitter * dcpp::scene::IParticleSystemSceneNode::createAnimatedMeshSceneNodeEmitter ( dcpp::scene::IAnimatedMeshSceneNode node,
bool  useNormalDirection = true,
const dcpp::nub::vector3df direction = dcpp::nub::vector3df(0.0f, 0.03f, 0.0f),
dcpp::float32_kt  normalDirectionModifier = 100.0f,
dcpp::int32_kt  mbNumber = -1,
bool  everyMeshVertex = false,
dcpp::uint32_kt  minParticlesPerSecond = 5,
dcpp::uint32_kt  maxParticlesPerSecond = 10,
const dcpp::video::SColor minStartColor = dcpp::video::SColor(255, 0, 0, 0),
const dcpp::video::SColor maxStartColor = dcpp::video::SColor(255, 255, 255, 255),
dcpp::uint32_kt  lifeTimeMin = 2000,
dcpp::uint32_kt  lifeTimeMax = 4000,
dcpp::int32_kt  maxAngleDegrees = 0,
const dcpp::nub::dimension2df minStartSize = dcpp::nub::dimension2df(5.0f, 5.0f),
const dcpp::nub::dimension2df maxStartSize = dcpp::nub::dimension2df(5.0f, 5.0f) 
)
pure virtual

Creates a particle emitter for an animated mesh scene node.

Parameters
nodePointer to the animated mesh scene node to emit particles from
useNormalDirectionIf 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.
directionDirection and speed of particle emission.
normalDirectionModifierIf the emitter is using the normal direction then the normal of the vertex that is being emitted from is divided by this number.
mbNumberThis 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.
everyMeshVertexIf 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.
minParticlesPerSecondMinimal amount of particles emitted per second.
maxParticlesPerSecondMaximal amount of particles emitted per second.
minStartColorMinimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColorMaximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMinMinimal lifetime of a particle, in milliseconds.
lifeTimeMaxMaximal lifetime of a particle, in milliseconds.
maxAngleDegreesMaximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSizeMinimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSizeMaximal 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 information.

◆ createAttractionAffector()

virtual IParticleAttractionAffector * dcpp::scene::IParticleSystemSceneNode::createAttractionAffector ( const dcpp::nub::vector3df point,
dcpp::float32_kt  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
pointPoint to attract particles to.
speedSpeed in units per second, to attract to the specified point.
attractWhether the particles attract or detract from this point.
affectXWhether or not this will affect the X position of the particle.
affectYWhether or not this will affect the Y position of the particle.
affectZWhether 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 information.

◆ createBoxEmitter()

virtual IParticleBoxEmitter * dcpp::scene::IParticleSystemSceneNode::createBoxEmitter ( const dcpp::nub::aabbox3df box = dcpp::nub::aabbox3df(-10, 28,-10, 10, 30, 10),
const dcpp::nub::vector3df direction = dcpp::nub::vector3df(0.0f, 0.03f, 0.0f),
dcpp::uint32_kt  minParticlesPerSecond = 5,
dcpp::uint32_kt  maxParticlesPerSecond = 10,
const dcpp::video::SColor minStartColor = dcpp::video::SColor(255, 0, 0, 0),
const dcpp::video::SColor maxStartColor = dcpp::video::SColor(255, 255, 255, 255),
dcpp::uint32_kt  lifeTimeMin = 2000,
dcpp::uint32_kt  lifeTimeMax = 4000,
dcpp::int32_kt  maxAngleDegrees = 0,
const dcpp::nub::dimension2df minStartSize = dcpp::nub::dimension2df(5.0f, 5.0f),
const dcpp::nub::dimension2df maxStartSize = dcpp::nub::dimension2df(5.0f, 5.0f) 
)
pure virtual

Creates a box particle emitter.

Parameters
boxThe box for the emitter.
directionDirection and speed of particle emission.
minParticlesPerSecondMinimal amount of particles emitted per second.
maxParticlesPerSecondMaximal amount of particles emitted per second.
minStartColorMinimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColorMaximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMinMinimal lifetime of a particle, in milliseconds.
lifeTimeMaxMaximal lifetime of a particle, in milliseconds.
maxAngleDegreesMaximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSizeMinimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSizeMaximal 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 information.

◆ createCylinderEmitter()

virtual IParticleCylinderEmitter * dcpp::scene::IParticleSystemSceneNode::createCylinderEmitter ( const dcpp::nub::vector3df center,
dcpp::float32_kt  radius,
const dcpp::nub::vector3df normal,
dcpp::float32_kt  length,
bool  outlineOnly = false,
const dcpp::nub::vector3df direction = dcpp::nub::vector3df(0.0f, 0.03f, 0.0f),
dcpp::uint32_kt  minParticlesPerSecond = 5,
dcpp::uint32_kt  maxParticlesPerSecond = 10,
const dcpp::video::SColor minStartColor = dcpp::video::SColor(255, 0, 0, 0),
const dcpp::video::SColor maxStartColor = dcpp::video::SColor(255, 255, 255, 255),
dcpp::uint32_kt  lifeTimeMin = 2000,
dcpp::uint32_kt  lifeTimeMax = 4000,
dcpp::int32_kt  maxAngleDegrees = 0,
const dcpp::nub::dimension2df minStartSize = dcpp::nub::dimension2df(5.0f, 5.0f),
const dcpp::nub::dimension2df maxStartSize = dcpp::nub::dimension2df(5.0f, 5.0f) 
)
pure virtual

Creates a particle emitter for emitting from a cylinder.

Parameters
centerThe center of the circle at the base of the cylinder
radiusThe thickness of the cylinder
normalDirection of the length of the cylinder
lengthThe length of the the cylinder
outlineOnlyWhether or not to put points inside the cylinder or on the outline only
directionDirection and speed of particle emission.
minParticlesPerSecondMinimal amount of particles emitted per second.
maxParticlesPerSecondMaximal amount of particles emitted per second.
minStartColorMinimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColorMaximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMinMinimal lifetime of a particle, in milliseconds.
lifeTimeMaxMaximal lifetime of a particle, in milliseconds.
maxAngleDegreesMaximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSizeMinimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSizeMaximal 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 information.

◆ createFadeOutParticleAffector()

virtual IParticleFadeOutAffector * dcpp::scene::IParticleSystemSceneNode::createFadeOutParticleAffector ( const dcpp::video::SColor targetColor = dcpp::video::SColor(0, 0, 0, 0),
dcpp::uint32_kt  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 dcpp::video::SColor(0,0,0,0): Particles are fading out into void with this setting.

Parameters
targetColorColor whereto the color of the particle is changed.
timeNeededToFadeOutHow much time in milliseconds 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 information.

◆ createGravityAffector()

virtual IParticleGravityAffector * dcpp::scene::IParticleSystemSceneNode::createGravityAffector ( const dcpp::nub::vector3df gravity = dcpp::nub::vector3df(0.0f,-0.03f, 0.0f),
dcpp::uint32_kt  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 caught by the gravity then. This affector is ideal for creating things like fountains.

Parameters
gravityDirection and force of gravity.
timeForceLostTime in milliseconds 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 information.

◆ createMeshEmitter()

virtual IParticleMeshEmitter * dcpp::scene::IParticleSystemSceneNode::createMeshEmitter ( dcpp::scene::IMesh mesh,
bool  useNormalDirection = true,
const dcpp::nub::vector3df direction = dcpp::nub::vector3df(0.0f, 0.03f, 0.0f),
dcpp::float32_kt  normalDirectionModifier = 100.0f,
dcpp::int32_kt  mbNumber = -1,
bool  everyMeshVertex = false,
dcpp::uint32_kt  minParticlesPerSecond = 5,
dcpp::uint32_kt  maxParticlesPerSecond = 10,
const dcpp::video::SColor minStartColor = dcpp::video::SColor(255, 0, 0, 0),
const dcpp::video::SColor maxStartColor = dcpp::video::SColor(255, 255, 255, 255),
dcpp::uint32_kt  lifeTimeMin = 2000,
dcpp::uint32_kt  lifeTimeMax = 4000,
dcpp::int32_kt  maxAngleDegrees = 0,
const dcpp::nub::dimension2df minStartSize = dcpp::nub::dimension2df(5.0f, 5.0f),
const dcpp::nub::dimension2df maxStartSize = dcpp::nub::dimension2df(5.0f, 5.0f) 
)
pure virtual

Creates a mesh particle emitter.

Parameters
meshPointer to mesh to emit particles from
useNormalDirectionIf 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.
directionDirection and speed of particle emission.
normalDirectionModifierIf the emitter is using the normal direction then the normal of the vertex that is being emitted from is divided by this number.
mbNumberThis 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.
everyMeshVertexIf 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.
minParticlesPerSecondMinimal amount of particles emitted per second.
maxParticlesPerSecondMaximal amount of particles emitted per second.
minStartColorMinimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColorMaximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMinMinimal lifetime of a particle, in milliseconds.
lifeTimeMaxMaximal lifetime of a particle, in milliseconds.
maxAngleDegreesMaximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSizeMinimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSizeMaximal 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 information.

◆ createPointEmitter()

virtual IParticlePointEmitter * dcpp::scene::IParticleSystemSceneNode::createPointEmitter ( const dcpp::nub::vector3df direction = dcpp::nub::vector3df(0.0f, 0.03f, 0.0f),
dcpp::uint32_kt  minParticlesPerSecond = 5,
dcpp::uint32_kt  maxParticlesPerSecond = 10,
const dcpp::video::SColor minStartColor = dcpp::video::SColor(255, 0, 0, 0),
const dcpp::video::SColor maxStartColor = dcpp::video::SColor(255, 255, 255, 255),
dcpp::uint32_kt  lifeTimeMin = 2000,
dcpp::uint32_kt  lifeTimeMax = 4000,
dcpp::int32_kt  maxAngleDegrees = 0,
const dcpp::nub::dimension2df minStartSize = dcpp::nub::dimension2df(5.0f, 5.0f),
const dcpp::nub::dimension2df maxStartSize = dcpp::nub::dimension2df(5.0f, 5.0f) 
)
pure virtual

Creates a point particle emitter.

Parameters
directionDirection and speed of particle emission.
minParticlesPerSecondMinimal amount of particles emitted per second.
maxParticlesPerSecondMaximal amount of particles emitted per second.
minStartColorMinimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColorMaximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMinMinimal lifetime of a particle, in milliseconds.
lifeTimeMaxMaximal lifetime of a particle, in milliseconds.
maxAngleDegreesMaximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSizeMinimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSizeMaximal 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 information.

◆ createRingEmitter()

virtual IParticleRingEmitter * dcpp::scene::IParticleSystemSceneNode::createRingEmitter ( const dcpp::nub::vector3df center,
dcpp::float32_kt  radius,
dcpp::float32_kt  ringThickness,
const dcpp::nub::vector3df direction = dcpp::nub::vector3df(0.0f, 0.03f, 0.0f),
dcpp::uint32_kt  minParticlesPerSecond = 5,
dcpp::uint32_kt  maxParticlesPerSecond = 10,
const dcpp::video::SColor minStartColor = dcpp::video::SColor(255, 0, 0, 0),
const dcpp::video::SColor maxStartColor = dcpp::video::SColor(255, 255, 255, 255),
dcpp::uint32_kt  lifeTimeMin = 2000,
dcpp::uint32_kt  lifeTimeMax = 4000,
dcpp::int32_kt  maxAngleDegrees = 0,
const dcpp::nub::dimension2df minStartSize = dcpp::nub::dimension2df(5.0f, 5.0f),
const dcpp::nub::dimension2df maxStartSize = dcpp::nub::dimension2df(5.0f, 5.0f) 
)
pure virtual

Creates a ring particle emitter.

Parameters
centerCenter of ring
radiusDistance 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
directionDirection and speed of particle emission.
minParticlesPerSecondMinimal amount of particles emitted per second.
maxParticlesPerSecondMaximal amount of particles emitted per second.
minStartColorMinimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColorMaximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMinMinimal lifetime of a particle, in milliseconds.
lifeTimeMaxMaximal lifetime of a particle, in milliseconds.
maxAngleDegreesMaximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSizeMinimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSizeMaximal 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 information.

◆ createRotationAffector()

virtual IParticleRotationAffector * dcpp::scene::IParticleSystemSceneNode::createRotationAffector ( const dcpp::nub::vector3df speed = dcpp::nub::vector3df(5.0f, 5.0f, 5.0f),
const dcpp::nub::vector3df pivotPoint = dcpp::nub::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
speedRotation in degrees per second
pivotPointPoint 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 information.

◆ createScaleParticleAffector()

virtual IParticleAffector * dcpp::scene::IParticleSystemSceneNode::createScaleParticleAffector ( const dcpp::nub::dimension2df scaleTo = dcpp::nub::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
scaleTomultiple 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 * dcpp::scene::IParticleSystemSceneNode::createSphereEmitter ( const dcpp::nub::vector3df center,
dcpp::float32_kt  radius,
const dcpp::nub::vector3df direction = dcpp::nub::vector3df(0.0f, 0.03f, 0.0f),
dcpp::uint32_kt  minParticlesPerSecond = 5,
dcpp::uint32_kt  maxParticlesPerSecond = 10,
const dcpp::video::SColor minStartColor = dcpp::video::SColor(255, 0, 0, 0),
const dcpp::video::SColor maxStartColor = dcpp::video::SColor(255, 255, 255, 255),
dcpp::uint32_kt  lifeTimeMin = 2000,
dcpp::uint32_kt  lifeTimeMax = 4000,
dcpp::int32_kt  maxAngleDegrees = 0,
const dcpp::nub::dimension2df minStartSize = dcpp::nub::dimension2df(5.0f, 5.0f),
const dcpp::nub::dimension2df maxStartSize = dcpp::nub::dimension2df(5.0f, 5.0f) 
)
pure virtual

Creates a sphere particle emitter.

Parameters
centerCenter of sphere
radiusRadius of sphere
directionDirection and speed of particle emission.
minParticlesPerSecondMinimal amount of particles emitted per second.
maxParticlesPerSecondMaximal amount of particles emitted per second.
minStartColorMinimal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
maxStartColorMaximal initial start color of a particle. The real color of every particle is calculated as random interpolation between minStartColor and maxStartColor.
lifeTimeMinMinimal lifetime of a particle, in milliseconds.
lifeTimeMaxMaximal lifetime of a particle, in milliseconds.
maxAngleDegreesMaximal angle in degrees, the emitting direction of the particle will differ from the original direction.
minStartSizeMinimal initial start size of a particle. The real size of every particle is calculated as random interpolation between minStartSize and maxStartSize.
maxStartSizeMaximal 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 information.

◆ deserializeAttributes()

virtual void dcpp::scene::IParticleSystemSceneNode::deserializeAttributes ( dcpp::io::IAttributes in,
dcpp::io::SAttributeReadWriteOptions options 
)
inlineoverridevirtual

Reads attributes of the scene node.

Reimplemented from dcpp::scene::ISceneNode.

◆ doParticleSystem()

virtual void dcpp::scene::IParticleSystemSceneNode::doParticleSystem ( dcpp::uint32_kt  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 dcpp::nub::list< IParticleAffector * > & dcpp::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 * dcpp::scene::IParticleSystemSceneNode::getEmitter ( )
pure virtual

Gets the particle emitter, which creates the particles.

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

◆ getParticleBehavior()

virtual dcpp::uint32_kt dcpp::scene::IParticleSystemSceneNode::getParticleBehavior ( ) const
inlinevirtual

Gets how particles behave in different situations.

Returns
A combination of EParticleBehavior flags

◆ serializeAttributes()

virtual void dcpp::scene::IParticleSystemSceneNode::serializeAttributes ( dcpp::io::IAttributes out,
dcpp::io::SAttributeReadWriteOptions options 
) const
inlineoverridevirtual

Writes attributes of the scene node.

Reimplemented from dcpp::scene::ISceneNode.

◆ setEmitter()

virtual void dcpp::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
emitterSets the particle emitter. You can set this to 0 for removing the current emitter and stopping the particle system emitting new particles.

◆ setParticleBehavior()

virtual void dcpp::scene::IParticleSystemSceneNode::setParticleBehavior ( dcpp::uint32_kt  flags)
inlinevirtual

Bitflags to change the particle behavior.

Parameters
flagsA combination of EParticleBehavior bit-flags. Default is 0.

◆ setParticlesAreGlobal()

virtual void dcpp::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.


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

Duckcpp    @cppfx.xyz