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

A zone that spawns particles along a line segment. More...

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

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

Public Member Functions

 CLine (const core::vector3df &p1, const core::vector3df &p2)
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::vector3df &p1, const core::vector3df &p2)
 Updates the line segment coordinates.
void setLine (const core::line3df &line)
 Updates the line segment using an Irrlicht line.
core::line3df getLine ()
 Gets the segment as an Irrlicht line.
virtual void generatePosition (CParticle &particle, bool full, CGroup *group)
 Implementation: spawns at a random point along the segment.
virtual core::vector3df computeNormal (const core::vector3df &point, CGroup *group)
 Implementation: computes normal relative to the nearest point on segment.
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_p1
 Starting point of the segment.
core::vector3df m_p2
 Ending point of the segment.
Protected Attributes inherited from Skylicht::Particle::CZone
EZone m_type
 Type of the zone.

Detailed Description

A zone that spawns particles along a line segment.

Member Function Documentation

◆ computeNormal()

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

Implementation: computes normal relative to the nearest point on segment.

Implements Skylicht::Particle::CZone.

◆ createSerializable()

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

Implementation: spawns at a random point along the segment.

Implements Skylicht::Particle::CZone.

◆ loadSerializable()

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