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

Data model for animating a particle parameter (EParticleParams) over its lifetime. More...

#include <ParticleSystem/Particles/CModel.h>

Inheritance diagram for Skylicht::Particle::CModel:
Skylicht::Particle::CParticleSerializable

Public Member Functions

 CModel (CGroup *group, EParticleParams type)
virtual CObjectSerializablecreateSerializable ()
 Creates a serializable object for property editing or saving.
virtual void loadSerializable (CObjectSerializable *object)
 Loads properties from a serializable object.
const wchar_t * getName ()
 Gets the display name of the model.
EParticleParams getType ()
 Gets the parameter type.
CGroupgetGroup ()
 Gets parent group.
CModel * setStart (float f)
 Sets fixed start value.
CModel * setStart (float f1, float f2)
 Sets random start range.
CModel * setEnd (float f)
 Sets fixed end value.
CModel * setEnd (float f1, float f2)
 Sets random end range.
bool isEnableEndValue ()
 Checks if end value is enabled.
void enableEndValue (bool b)
 Enables or disables interpolation to end value.
bool isRandomStart ()
 Checks if start is random.
bool isRandomEnd ()
 Checks if end is random.
float getStartValue1 ()
void setStartValue1 (float f)
float getStartValue2 ()
void setStartValue2 (float f)
float getEndValue1 ()
void setEndValue1 (float f)
float getEndValue2 ()
void setEndValue2 (float f)
float getRandomStart ()
 Generates a random start value from range.
float getRandomEnd ()
 Generates a random end value from range.
void setInterpolator (CInterpolator *interpolate)
 Sets a custom curve for parameter animation.
CInterpolatorgetInterpolator ()
 Gets current interpolator.
virtual const char * getTypeName ()

Protected Attributes

EParticleParams m_type
 The parameter type being animated.
bool m_randomStart
 If true, picks a random start value between start1 and start2.
float m_start1
float m_start2
bool m_enableEndValue
 Whether to interpolate towards an end value.
bool m_randomEnd
 If true, picks a random end value between end1 and end2.
float m_end1
float m_end2
CGroupm_group
 Parent group.
CInterpolatorm_interpolator
 Optional custom curve for interpolation.
std::string m_typeName

Detailed Description

Data model for animating a particle parameter (EParticleParams) over its lifetime.

Supports linear interpolation between start/end values or custom curves via CInterpolator.

Member Function Documentation

◆ createSerializable()

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

Creates a serializable object for property editing or saving.

Returns
Pointer to a new CObjectSerializable instance.

Reimplemented from Skylicht::Particle::CParticleSerializable.

◆ loadSerializable()

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

Loads properties from a serializable object.

Parameters
objectThe serializable data to load.

Reimplemented from Skylicht::Particle::CParticleSerializable.


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