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

A zone that spawns particles along a sequence of connected line segments. More...

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

Inheritance diagram for Skylicht::Particle::CPolyLine:
Skylicht::Particle::CZone Skylicht::Particle::CParticleSerializable

Public Member Functions

 CPolyLine (const core::array< core::vector3df > &point)
virtual CObjectSerializablecreateSerializable ()
 Creates a serializable object for property editing or saving.
virtual void loadSerializable (CObjectSerializable *object)
 Loads properties from a serializable object.
void setLine (const core::array< core::vector3df > &point)
 Sets the path points and precalculates segments.
core::array< core::vector3df > & getPoints ()
 Gets path vertices.
u32 getNumPoint ()
 Gets vertex count.
void setNormal (const core::vector3df &normal)
 Sets constant normal for the polyline.
virtual void generatePosition (CParticle &particle, bool full, CGroup *group)
 Implementation: spawns at random position along the path.
virtual core::vector3df computeNormal (const core::vector3df &point, CGroup *group)
 Implementation: returns the constant normal.
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::array< core::vector3df > m_point
 List of vertices in the path.
core::array< float > m_segments
 Length of each segment.
core::array< float > m_ratios
 Ratio of each vertex position along the total length.
float m_length
 Total path length.
core::vector3df m_normal
 Default normal for the zone.
Protected Attributes inherited from Skylicht::Particle::CZone
EZone m_type
 Type of the zone.

Detailed Description

A zone that spawns particles along a sequence of connected line segments.

Member Function Documentation

◆ computeNormal()

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

Implementation: returns the constant normal.

Implements Skylicht::Particle::CZone.

◆ createSerializable()

virtual CObjectSerializable * Skylicht::Particle::CPolyLine::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::CPolyLine::generatePosition ( CParticle & particle,
bool full,
CGroup * group )
virtual

Implementation: spawns at random position along the path.

Implements Skylicht::Particle::CZone.

◆ loadSerializable()

virtual void Skylicht::Particle::CPolyLine::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: