YAGE  1.0
Yet Another Game Engine
Particle_Container Class Reference

#include <Particle_Container.h>

Inheritance diagram for Particle_Container:
IGameObject

Public Member Functions

 Particle_Container (Transform t, const std::string &texturePath, bool enable=true, int max_particles=10000, int particle_rate=1000, float particle_max_life=5)
 
 ~Particle_Container ()
 
void Draw ()
 
void Draw (GLuint) override
 Draws via the given shader. More...
 
void DrawShadow ()
 
void DrawShadow (GLuint) override
 Draw shadows via the given shader. More...
 
void Update () override
 Updates this object. More...
 
void Destroy () override
 Destroys this object. More...
 
void SetTexture (const std::string &, const TextureType &, const GLuint &) override
 Adds a texture to an object. More...
 
const GLuint GetTexture (const std::string &) const override
 Gets a texture. More...
 
void setMaxParticles (int)
 
void setSpawnRate (int)
 
void setMaxLife (float)
 
- Public Member Functions inherited from IGameObject
virtual ~IGameObject ()
 Destructor that deletes the unique shader program and shadow program belonging to the object. More...
 
virtual void SetProgram (GLuint shaderName)
 Sets the main shader program corresponding to this object. More...
 
virtual void SetShadowProgram (GLuint shaderName)
 Sets the shadow pass shader program corresponding to this object. More...
 
virtual GLuint GetProgram ()
 Gets the object's main shader program. More...
 
virtual GLuint GetShadowProgram ()
 Gets the object's shadow program. More...
 

Public Attributes

Transform transform
 

Additional Inherited Members

- Protected Attributes inherited from IGameObject
GLuint program = 0
 
GLuint shadowProgram = 0
 

Constructor & Destructor Documentation

Particle_Container::Particle_Container ( Transform  t,
const std::string &  texturePath,
bool  enable = true,
int  max_particles = 10000,
int  particle_rate = 1000,
float  particle_max_life = 5 
)
Particle_Container::~Particle_Container ( )

Member Function Documentation

void Particle_Container::Destroy ( )
overridevirtual

Destroys this object.

Implements IGameObject.

void Particle_Container::Draw ( )
void Particle_Container::Draw ( GLuint  shader)
overridevirtual

Draws via the given shader.

Parameters
shaderThe shader.

Implements IGameObject.

void Particle_Container::DrawShadow ( )
inline
void Particle_Container::DrawShadow ( GLuint  shader)
inlineoverridevirtual

Draw shadows via the given shader.

Implements IGameObject.

const GLuint Particle_Container::GetTexture ( const std::string &  textureName) const
overridevirtual

Gets a texture.

Parameters
textureNameThe name of the texture.
Returns
The texture.

Implements IGameObject.

void Particle_Container::setMaxLife ( float  life)
void Particle_Container::setMaxParticles ( int  n)
void Particle_Container::setSpawnRate ( int  rate)
void Particle_Container::SetTexture ( const std::string &  textureName,
const TextureType textureType,
const GLuint &  texture 
)
overridevirtual

Adds a texture to an object.

Parameters
textureNameName of the texture.
textureTypeType of the texture.
textureThe texture id.

Implements IGameObject.

void Particle_Container::Update ( )
overridevirtual

Updates this object.

Implements IGameObject.

Member Data Documentation

Transform Particle_Container::transform