![]()  | 
  
    CUGL 3.0
    
   Cornell University Game Library 
   | 
 
#include <CUParticleBatch.h>
  
Public Member Functions | |
| ParticleBatch () | |
| ~ParticleBatch () | |
| void | dispose () override | 
| bool | init () | 
| bool | init (Uint32 key, Uint32 priority) override | 
| void | append (const std::shared_ptr< SceneNode > &node, const Mat4 &transform) override | 
| void | flush (const std::shared_ptr< Camera > &camera) override | 
| void | clear () override | 
  Public Member Functions inherited from cugl::scene3::Scene3Batch | |
| Scene3Batch () | |
| virtual void | dispose () | 
| virtual bool | init (Uint32 key, Uint32 priority) | 
| Uint32 | getBatchKey () const | 
| Uint32 | getPriority () const | 
| virtual void | append (const std::shared_ptr< SceneNode > &node, const Mat4 &transform)=0 | 
| virtual void | flush (const std::shared_ptr< Camera > &camera)=0 | 
| virtual void | clear ()=0 | 
Static Public Member Functions | |
| static std::shared_ptr< ParticleBatch > | alloc () | 
| static std::shared_ptr< ParticleBatch > | alloc (Uint32 key, Uint32 priority) | 
Static Public Attributes | |
| static const Uint32 | BATCH_KEY = 3 | 
Additional Inherited Members | |
  Protected Attributes inherited from cugl::scene3::Scene3Batch | |
| Uint32 | _batchkey | 
| Uint32 | _priority | 
This class is a batch for drawing ParticleNode objects.
This class is only designed for ParticleNode objects. Attempts to apply it to any other SceneNode will be ignored. Objects are sorted by z-order (relative to the camera) before they are drawn. 
      
  | 
  inline | 
Creates a new degenerate batch on the stack.
The batch has no shader, and therefore cannot draw anything.
NEVER USE A CONSTRUCTOR WITH NEW. If you want to allocate an object on the heap, use one of the static constructors instead.
      
  | 
  inline | 
Deletes this batch, disposing all resources
      
  | 
  inlinestatic | 
Returns a newly allocated particle batch with the default key and priority.
This method can fail is the shader fails to compile.
      
  | 
  inlinestatic | 
Returns a newly allocated particle batch with the given key and priority.
This method can fail is the shader fails to compile.
| key | The batch key | 
| priority | The batch priority | 
      
  | 
  overridevirtual | 
Appends a scene node to this batch for drawing.
The scene node will be ignored if is not an instance of ParticleNode. Nodes will be sorted by relative z-order before they are drawn.
| node | The node to draw | 
| transform | The global transform | 
Implements cugl::scene3::Scene3Batch.
      
  | 
  inlineoverridevirtual | 
Removes all appended nodes without drawing them.
Calling flush after this method will draw nothing. 
Implements cugl::scene3::Scene3Batch.
      
  | 
  inlineoverridevirtual | 
Disposes all of the resources used by this batch.
A disposed batch can be safely reinitialized. Any shader owned by this batch will be released. It will be deleted if no other object owns it.
Reimplemented from cugl::scene3::Scene3Batch.
      
  | 
  overridevirtual | 
Draws all appended nodes.
Nodes will be sorted by relative z-order before they are drawn.
| camera | The camera to draw with | 
Implements cugl::scene3::Scene3Batch.
      
  | 
  inline | 
Initializes a new particle batch with the default key and priority.
This method can fail is the shader fails to compile.
      
  | 
  overridevirtual | 
Initializes a new particle batch with the given key and priority.
This method can fail is the shader fails to compile.
| key | The batch key | 
| priority | The batch priority | 
Reimplemented from cugl::scene3::Scene3Batch.
      
  | 
  static | 
The key for this batch type