A sphere-shaped lit Particle with a radius.
More...
#include <Confetti/SphereParticle.h>
|
|
| SphereParticle ()=default |
| | Constructor.
|
| |
| | SphereParticle (float lifetime, float age, glm::vec3 const &position, glm::vec3 const &velocity, glm::vec4 const &color, float radius) |
| | Constructor. More...
|
| |
|
virtual | ~SphereParticle () override=default |
| | Destructor.
|
| |
|
float | GetRadius () const |
| | Returns the particle's radius.
|
| |
|
| void | Initialize (float lifetime, float age, glm::vec3 const &position, glm::vec3 const &velocity, glm::vec4 const &color, float radius) |
| |
| virtual bool | update (float dt) override |
| |
| virtual void | draw (std::shared_ptr< Vkx::Device > device) const override |
| | Draws the particle. More...
|
| |
Public Member Functions inherited from Confetti::Particle |
|
| Particle ()=default |
| | Constructor.
|
| |
| | Particle (float lifetime, float age, glm::vec3 const &position, glm::vec3 const &velocity, glm::vec4 const &color) |
| | Constructor. More...
|
| |
|
virtual | ~Particle ()=default |
| | Destructor.
|
| |
|
void | bind (BasicEmitter *pEmitter) |
| | Binds to an emitter.
|
| |
|
float | age () const |
| | Returns the age of the particle.
|
| |
|
glm::vec3 | position () const |
| | Returns the particle's current position.
|
| |
|
glm::vec3 | velocity () const |
| | Returns the particle's current velocity.
|
| |
|
glm::vec4 | color () const |
| | Returns the particle's current velocity.
|
| |
A sphere-shaped lit Particle with a radius.
◆ SphereParticle()
| Confetti::SphereParticle::SphereParticle |
( |
float |
lifetime, |
|
|
float |
age, |
|
|
glm::vec3 const & |
position, |
|
|
glm::vec3 const & |
velocity, |
|
|
glm::vec4 const & |
color, |
|
|
float |
radius |
|
) |
| |
Constructor.
- Parameters
-
| lifetime | How long the particle lives. |
| age | Initial age. |
| color | Color at birth. |
| position | Position at birth. |
| velocity | Velocity at birth. |
| radius | Radius at birth. |
◆ draw()
| void Confetti::SphereParticle::draw |
( |
std::shared_ptr< Vkx::Device > |
device | ) |
const |
|
overridevirtual |
◆ Initialize()
| void Confetti::SphereParticle::Initialize |
( |
float |
lifetime, |
|
|
float |
age, |
|
|
glm::vec3 const & |
position, |
|
|
glm::vec3 const & |
velocity, |
|
|
glm::vec4 const & |
color, |
|
|
float |
radius |
|
) |
| |
- Parameters
-
| lifetime | How long the particle lives. |
| age | Initial age. |
| color | Color at birth. |
| position | Position at birth. |
| velocity | Velocity at birth. |
| radius | Radius at birth. |
◆ update()
| bool Confetti::SphereParticle::update |
( |
float |
dt | ) |
|
|
overridevirtual |
- Parameters
-
| dt | The amount of time that has passed since the last update |
Reimplemented from Confetti::Particle.