A square camera-facing Particle with a texture, radius, and 2D rotation.  
 More...
#include <Confetti/TexturedParticle.h>
 | 
| 
  | TexturedParticle ()=default | 
|   | Constructor. 
  | 
|   | 
|   | TexturedParticle (float lifetime, float age, glm::vec3 const &position, glm::vec3 const &velocity, glm::vec4 const &color, float radius, float rotation) | 
|   | Constructor.  More...
  | 
|   | 
| 
virtual  | ~TexturedParticle () override=default | 
|   | Destructor. 
  | 
|   | 
| void  | Initialize (float lifetime, float age, glm::vec3 const &position, glm::vec3 const &velocity, glm::vec4 const &color, float radius, float rotation=0) | 
|   | Initializes a particle constructed with the default constructor.  More...
  | 
|   | 
| 
float  | radius () const | 
|   | Returns the particle's current radius. 
  | 
|   | 
| 
float  | rotation () const | 
|   | Returns the particle's current rotation. 
  | 
|   | 
 | 
| 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 square camera-facing Particle with a texture, radius, and 2D rotation. 
 
◆ TexturedParticle()
      
        
          | Confetti::TexturedParticle::TexturedParticle  | 
          ( | 
          float  | 
          lifetime,  | 
        
        
           | 
           | 
          float  | 
          age,  | 
        
        
           | 
           | 
          glm::vec3 const &  | 
          position,  | 
        
        
           | 
           | 
          glm::vec3 const &  | 
          velocity,  | 
        
        
           | 
           | 
          glm::vec4 const &  | 
          color,  | 
        
        
           | 
           | 
          float  | 
          radius,  | 
        
        
           | 
           | 
          float  | 
          rotation  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor. 
- Parameters
 - 
  
    | lifetime | How long the particle lives.  | 
    | age | Initial age.  | 
    | position | Position at birth.  | 
    | velocity | Velocity at birth.  | 
    | color | Color at birth.  | 
    | radius | Radius at birth.  | 
    | rotation | Rotation at birth.  | 
  
   
 
 
◆ draw()
  
  
      
        
          | void Confetti::TexturedParticle::draw  | 
          ( | 
          std::shared_ptr< Vkx::Device >  | 
          device | ) | 
           const | 
         
       
   | 
  
overridevirtual   | 
  
 
 
◆ Initialize()
      
        
          | void Confetti::TexturedParticle::Initialize  | 
          ( | 
          float  | 
          lifetime,  | 
        
        
           | 
           | 
          float  | 
          age,  | 
        
        
           | 
           | 
          glm::vec3 const &  | 
          position,  | 
        
        
           | 
           | 
          glm::vec3 const &  | 
          velocity,  | 
        
        
           | 
           | 
          glm::vec4 const &  | 
          color,  | 
        
        
           | 
           | 
          float  | 
          radius,  | 
        
        
           | 
           | 
          float  | 
          rotation = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Initializes a particle constructed with the default constructor. 
- Parameters
 - 
  
    | lifetime | How long the particle lives.  | 
    | age | Initial age.  | 
    | position | Position at birth.  | 
    | velocity | Velocity at birth.  | 
    | color | Color at birth.  | 
    | radius | Radius at birth.  | 
    | rotation | Rotation at birth.  | 
  
   
 
 
◆ update()
  
  
      
        
          | bool Confetti::TexturedParticle::update  | 
          ( | 
          float  | 
          dt | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
- Parameters
 - 
  
    | dt | The amount of time that has passed since the last update  | 
  
   
Reimplemented from Confetti::Particle.