A line-shaped Particle whose length and direction depend on its velocity.  
 More...
#include <Confetti/StreakParticle.h>
 | 
| 
  | StreakParticle ()=default | 
|   | Constructor. 
  | 
|   | 
|   | StreakParticle (float lifetime, float age, glm::vec3 const &position, glm::vec3 const &velocity, glm::vec4 const &color) | 
|   | Constructor.  More...
  | 
|   | 
| 
virtual  | ~StreakParticle () override=default | 
|   | Destructor. 
  | 
|   | 
| void  | Initialize (float lifetime, float age, glm::vec3 const &position, glm::vec3 const &velocity, glm::vec4 const &color) | 
|   | Initializes a particle constructed with the default constructor.  More...
  | 
|   | 
| 
glm::vec3 const  &  | GetTailPosition () const | 
|   | Returns the position of the particle's tail. 
  | 
|   | 
 | 
| virtual bool  | update (float dt) override | 
|   | Updates the particle. Returns true if the particle was reborn.  More...
  | 
|   | 
| 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 line-shaped Particle whose length and direction depend on its velocity. 
 
◆ StreakParticle()
      
        
          | Confetti::StreakParticle::StreakParticle  | 
          ( | 
          float  | 
          lifetime,  | 
        
        
           | 
           | 
          float  | 
          age,  | 
        
        
           | 
           | 
          glm::vec3 const &  | 
          position,  | 
        
        
           | 
           | 
          glm::vec3 const &  | 
          velocity,  | 
        
        
           | 
           | 
          glm::vec4 const &  | 
          color  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor. 
- Parameters
 - 
  
    | pEmitter | The emitter that controls this particle  | 
    | lifetime | How long the particle lives.  | 
    | age | Initial age.  | 
    | position | Position at birth.  | 
    | velocity | Velocity at birth.  | 
    | color | Color at birth.  | 
  
   
 
 
◆ draw()
  
  
      
        
          | void Confetti::StreakParticle::draw  | 
          ( | 
          std::shared_ptr< Vkx::Device >  | 
          device | ) | 
           const | 
         
       
   | 
  
overridevirtual   | 
  
 
 
◆ Initialize()
      
        
          | void Confetti::StreakParticle::Initialize  | 
          ( | 
          float  | 
          lifetime,  | 
        
        
           | 
           | 
          float  | 
          age,  | 
        
        
           | 
           | 
          glm::vec3 const &  | 
          position,  | 
        
        
           | 
           | 
          glm::vec3 const &  | 
          velocity,  | 
        
        
           | 
           | 
          glm::vec4 const &  | 
          color  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
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.  | 
  
   
 
 
◆ update()
  
  
      
        
          | bool Confetti::StreakParticle::update  | 
          ( | 
          float  | 
          dt | ) | 
           | 
         
       
   | 
  
overridevirtual   | 
  
 
Updates the particle. Returns true if the particle was reborn. 
- Parameters
 - 
  
    | dt | The amount of time that has passed since the last update. | 
  
   
- Note
 - Methods overriding this method must call this first in order to determine the particle's age and if it has been reborn or not. 
 
Reimplemented from Confetti::Particle.