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

A zone that spawns particles within a 2D ring (annulus) in 3D space. More...

#include <ParticleSystem/Particles/Zones/CRing.h>

Inheritance diagram for Skylicht::Particle::CRing:
Skylicht::Particle::CPositionZone Skylicht::Particle::CZone Skylicht::Particle::CParticleSerializable

Public Member Functions

 CRing (const core::vector3df &position, const core::vector3df &normal, float minRadius, float maxRadius)
virtual CObjectSerializablecreateSerializable ()
 Creates a serializable object for property editing or saving.
virtual void loadSerializable (CObjectSerializable *object)
 Loads properties from a serializable object.
void setNormal (const core::vector3df &d)
 Sets plane orientation normal.
core::vector3df & getNormal ()
 Gets plane orientation normal.
void setRadius (float min, float max)
 Sets inner and outer radius range.
float getMinRadius ()
 Gets inner radius.
float getMaxRadius ()
 Gets outer radius.
virtual void generatePosition (CParticle &particle, bool full, CGroup *group)
 Implementation: spawns randomly between min and max radius on the plane.
virtual core::vector3df computeNormal (const core::vector3df &point, CGroup *group)
 Implementation: normal is the plane normal.
Public Member Functions inherited from Skylicht::Particle::CPositionZone
 CPositionZone (EZone type)
void setPosition (const core::vector3df &pos)
 Sets relative position.
const core::vector3df & getPosition ()
 Gets relative position.
Public Member Functions inherited from Skylicht::Particle::CZone
 CZone (EZone type)
const wchar_t * getName ()
 Gets display name.
EZone getType ()
 Gets zone type.
void normalizeOrRandomize (core::vector3df &v)
 Normalizes a vector or randomizes it if it is zero.

Protected Attributes

core::vector3df m_normal
 Normal vector defining the ring plane.
float m_minRadius
 Inner radius.
float m_maxRadius
 Outer radius.
Protected Attributes inherited from Skylicht::Particle::CPositionZone
core::vector3df m_position
 Relative position of the zone.
Protected Attributes inherited from Skylicht::Particle::CZone
EZone m_type
 Type of the zone.

Detailed Description

A zone that spawns particles within a 2D ring (annulus) in 3D space.

Member Function Documentation

◆ computeNormal()

virtual core::vector3df Skylicht::Particle::CRing::computeNormal ( const core::vector3df & point,
CGroup * group )
virtual

Implementation: normal is the plane normal.

Implements Skylicht::Particle::CZone.

◆ createSerializable()

virtual CObjectSerializable * Skylicht::Particle::CRing::createSerializable ( )
virtual

Creates a serializable object for property editing or saving.

Returns
Pointer to a new CObjectSerializable instance.

Reimplemented from Skylicht::Particle::CZone.

◆ generatePosition()

virtual void Skylicht::Particle::CRing::generatePosition ( CParticle & particle,
bool full,
CGroup * group )
virtual

Implementation: spawns randomly between min and max radius on the plane.

Implements Skylicht::Particle::CZone.

◆ loadSerializable()

virtual void Skylicht::Particle::CRing::loadSerializable ( CObjectSerializable * object)
virtual

Loads properties from a serializable object.

Parameters
objectThe serializable data to load.

Reimplemented from Skylicht::Particle::CZone.


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