|
Brunot
|
Struct for passing around all the data a particle has, before a particle is added to a Particle Block. More...
#include <Particle.h>
Public Attributes | |
| Vector4D | position = {0.f, 0.f, 0.f, 1.f} |
| Vector4D | velocity = {0.f, 0.f, 0.f, 0.f} |
| Vector4D | velocityBegin = {0.f, 0.f, 0.f, 0.f} |
| Vector4D | velocityEnd = {0.f, 0.f, 0.f, 0.f} |
| Vector4D | scale = {1.f, 1.f, 0.f, 0.f} |
| Vector4D | scaleBegin = {1.f, 1.f, 0.f, 0.f} |
| Vector4D | scaleEnd = {1.f, 1.f, 0.f, 0.f} |
| float | rotation = 0.f |
| float | rotationalVelocity = 0.f |
| float | rotationalAcceleration = 0.f |
| Vector4D | color = {1.f, 1.f, 1.f, 1.f} |
| Vector4D | colorBegin = {1.f, 1.f, 1.f, 1.f} |
| Vector4D | colorEnd = {1.f, 1.f, 1.f, 1.f} |
| unsigned | frame = 0u |
| the frame the particle is currently on | |
| float | frameCountdown = 0.f |
| how many seconds until the next frame starts | |
| float | lifetime = 1.f |
| how long the particle will live for | |
| float | timeLeft = -1.f |
| how long the particle has before death, if 0 or less, particle is inactive | |
| float | fps = 0.f |
| how many frames per second the animation on a particle should be. | |
| bool | velocityChanges = false |
| whether the velocity should change for the particle. | |
| th::Bezier | velocityCurve |
| if velocityChanges, then velocityCurve dictates how the particle should interpolate between the start and end velocity. | |
| bool | colorChanges = false |
| whether the color should change for the particle. | |
| th::Bezier | colorCurve |
| if colorChanges, then colorCurve dictates how the particle should interpolate between the start and end color. | |
| bool | scaleChanges = false |
| whether the color should change for the particle. | |
| th::Bezier | scaleCurve |
| if scaleChanges, then scaleCurve dictates how the particle should interpolate between the start and end scale. | |
| bool | loopingSprite = true |
| whether the sprite loops or not. | |
| gfx::Texture * | texture = nullptr |
| Texture for the particle. | |
| gfx::Shader * | shader = nullptr |
| Shader for the particle. | |
| gfx::Mesh * | mesh = nullptr |
| Mesh for the particle. | |
Friends | |
| auto | to_json (json &j, const Particle &n) -> void |
| auto | from_json (const json &j, Particle &n) -> void |
Struct for passing around all the data a particle has, before a particle is added to a Particle Block.
If this struct is updated, there's a couple places you'll need to update
| Vector4D Particle::color = {1.f, 1.f, 1.f, 1.f} |
| Vector4D Particle::colorBegin = {1.f, 1.f, 1.f, 1.f} |
| bool Particle::colorChanges = false |
whether the color should change for the particle.
this value is consistent for every particle in a block
| th::Bezier Particle::colorCurve |
if colorChanges, then colorCurve dictates how the particle should interpolate between the start and end color.
this value is consistent for every particle in a block
| Vector4D Particle::colorEnd = {1.f, 1.f, 1.f, 1.f} |
| float Particle::fps = 0.f |
how many frames per second the animation on a particle should be.
0 means no animation. this value is consistent for every particle in a block
| unsigned Particle::frame = 0u |
the frame the particle is currently on
| float Particle::frameCountdown = 0.f |
how many seconds until the next frame starts
| float Particle::lifetime = 1.f |
how long the particle will live for
| bool Particle::loopingSprite = true |
whether the sprite loops or not.
this value is consistent for every particle in a block
| gfx::Mesh* Particle::mesh = nullptr |
Mesh for the particle.
this value is consistent for every particle in a block
| Vector4D Particle::position = {0.f, 0.f, 0.f, 1.f} |
| float Particle::rotation = 0.f |
| float Particle::rotationalAcceleration = 0.f |
| float Particle::rotationalVelocity = 0.f |
| Vector4D Particle::scale = {1.f, 1.f, 0.f, 0.f} |
| Vector4D Particle::scaleBegin = {1.f, 1.f, 0.f, 0.f} |
| bool Particle::scaleChanges = false |
whether the color should change for the particle.
this value is consistent for every particle in a block
| th::Bezier Particle::scaleCurve |
if scaleChanges, then scaleCurve dictates how the particle should interpolate between the start and end scale.
this value is consistent for every particle in a block
| Vector4D Particle::scaleEnd = {1.f, 1.f, 0.f, 0.f} |
| gfx::Shader* Particle::shader = nullptr |
Shader for the particle.
this value is consistent for every particle in a block
| gfx::Texture* Particle::texture = nullptr |
Texture for the particle.
this value is consistent for every particle in a block.
| float Particle::timeLeft = -1.f |
how long the particle has before death, if 0 or less, particle is inactive
| Vector4D Particle::velocity = {0.f, 0.f, 0.f, 0.f} |
| Vector4D Particle::velocityBegin = {0.f, 0.f, 0.f, 0.f} |
| bool Particle::velocityChanges = false |
whether the velocity should change for the particle.
this value is consistent for every particle in a block.
| th::Bezier Particle::velocityCurve |
if velocityChanges, then velocityCurve dictates how the particle should interpolate between the start and end velocity.
this value is consistent for every particle in a block.
| Vector4D Particle::velocityEnd = {0.f, 0.f, 0.f, 0.f} |