Otclient  14/8/2020
Particle Class Reference

#include <particle.h>

Inheritance diagram for Particle:
Collaboration diagram for Particle:

Public Member Functions

 Particle (const Point &pos, const Size &startSize, const Size &finalSize, const PointF &velocity, const PointF &acceleration, float duration, float ignorePhysicsAfter, const std::vector< Color > &colors, const std::vector< float > &colorsStops, Painter::CompositionMode compositionMode=Painter::CompositionMode_Normal, TexturePtr texture=nullptr)
 
void render ()
 
void update (float elapsedTime)
 
bool hasFinished ()
 
PointF getPosition ()
 
PointF getVelocity ()
 
void setPosition (const PointF &position)
 
void setVelocity (const PointF &velocity)
 
- Public Member Functions inherited from stdext::shared_object
 shared_object ()
 
virtual ~shared_object ()
 
void add_ref ()
 
void dec_ref ()
 
refcount_t ref_count ()
 
template<typename T >
stdext::shared_object_ptr< T > static_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > dynamic_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > const_self_cast ()
 

Detailed Description

Definition at line 29 of file particle.h.

Constructor & Destructor Documentation

◆ Particle()

Particle::Particle ( const Point pos,
const Size startSize,
const Size finalSize,
const PointF velocity,
const PointF acceleration,
float  duration,
float  ignorePhysicsAfter,
const std::vector< Color > &  colors,
const std::vector< float > &  colorsStops,
Painter::CompositionMode  compositionMode = Painter::CompositionMode_Normal,
TexturePtr  texture = nullptr 
)

Definition at line 27 of file particle.cpp.

Member Function Documentation

◆ getPosition()

PointF Particle::getPosition ( )
inline

Definition at line 39 of file particle.h.

◆ getVelocity()

PointF Particle::getVelocity ( )
inline

Definition at line 40 of file particle.h.

◆ hasFinished()

bool Particle::hasFinished ( )
inline

Definition at line 37 of file particle.h.

◆ render()

void Particle::render ( )

Definition at line 46 of file particle.cpp.

Here is the call graph for this function:

◆ setPosition()

void Particle::setPosition ( const PointF position)
inline

Definition at line 42 of file particle.h.

◆ setVelocity()

void Particle::setVelocity ( const PointF velocity)
inline

Definition at line 43 of file particle.h.

◆ update()

void Particle::update ( float  elapsedTime)

Definition at line 58 of file particle.cpp.


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