Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::Particle::CVortexSystem Class Reference

Custom system that applies a vortex (swirl) effect to particles. More...

#include <ParticleSystem/Particles/Systems/CVortexSystem.h>

Inheritance diagram for Skylicht::Particle::CVortexSystem:
Skylicht::Particle::ISystem

Public Member Functions

 CVortexSystem (const core::vector3df &position, const core::vector3df &direction, float rotationSpeed=1.0f, float attractionSpeed=0.0f)
virtual void update (CParticle *particles, int num, CGroup *group, float dt)
 Implementation: applies vortex forces to particles.
core::vector3df getPosition ()
 Gets center position.
core::vector3df getDirection ()
 Gets rotation axis.
void setPosition (const core::vector3df &p)
 Sets center position.
void setDirection (const core::vector3df &d)
 Sets rotation axis.
float getRotateSpeed ()
 Gets rotation speed.
float getAttractionSpeed ()
 Gets radial attraction speed.
float getEyeRadius ()
 Gets core radius.
void setRotateSpeed (float f)
 Sets rotation speed.
void setAttractionSpeed (float f)
 Sets radial attraction speed.
void setEyeRadius (float f)
 Sets core radius.
void setEyeAttractionSpeed (float f)
 Sets axial attraction speed.
float getEyeAttractionSpeed ()
 Gets axial attraction speed.
bool isKillingParticle ()
 Checks if killing at core is enabled.
void enableKillingParticle (bool b)
 Enables/disables killing particles at the core.
Public Member Functions inherited from Skylicht::Particle::ISystem
void setEnable (bool b)
 Enables or disables the system.
bool isEnable ()
 Checks if the system is enabled.

Protected Attributes

core::vector3df m_position
 Center of the vortex.
core::vector3df m_direction
 Axis of rotation.
float m_rotationSpeed
 Speed of rotation around the axis.
float m_attractionSpeed
 Speed at which particles are pulled toward the axis.
float m_eyeAttractionSpeed
 Speed at which particles move along the axis.
float m_eyeRadius
 Radius of the vortex core.
bool m_killingParticleEnabled
 Whether to kill particles that reach the core.
Protected Attributes inherited from Skylicht::Particle::ISystem
bool m_enable
 Whether the system is active.

Detailed Description

Custom system that applies a vortex (swirl) effect to particles.

Example

Particle::CVortexSystem *vortex = new Particle::CVortexSystem(core::vector3df(0, 1, 0), core::vector3df(0, 1, 0), 0.5f, 0.2f);
vortex->setEyeAttractionSpeed(0.01f);
vortex->enableKillingParticle(true);
group->addSystem(vortex);
Custom system that applies a vortex (swirl) effect to particles.
Definition CVortexSystem.h:47
void enableKillingParticle(bool b)
Enables/disables killing particles at the core.
Definition CVortexSystem.h:151
void setEyeAttractionSpeed(float f)
Sets axial attraction speed.
Definition CVortexSystem.h:133

Member Function Documentation

◆ update()

virtual void Skylicht::Particle::CVortexSystem::update ( CParticle * particles,
int num,
CGroup * group,
float dt )
virtual

Implementation: applies vortex forces to particles.

Implements Skylicht::Particle::ISystem.


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