YAGE  1.0
Yet Another Game Engine
Scene_Container Class Reference

#include <Scene_Container.h>

Inheritance diagram for Scene_Container:
IGameObject

Public Member Functions

 Scene_Container (const std::string &, Transform)
 
 Scene_Container (const Scene_Container *&, Transform)
 
 ~Scene_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 SetProgram (GLuint) override
 Sets the main shader program corresponding to this object. More...
 
void SetShadowProgram (GLuint) override
 Sets the shadow pass shader program corresponding to this object. More...
 
btRigidBody * getRigidBody ()
 
virtual void InitRigidBody (btScalar mass)
 
const std::vector< Mesh * > GetMeshes () const
 
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...
 
- Public Member Functions inherited from IGameObject
virtual ~IGameObject ()
 Destructor that deletes the unique shader program and shadow program belonging to the 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

Scene_Container::Scene_Container ( const std::string &  path,
Transform  transform 
)
Scene_Container::Scene_Container ( const Scene_Container *&  other,
Transform  t 
)
Scene_Container::~Scene_Container ( )

Member Function Documentation

void Scene_Container::Destroy ( )
overridevirtual

Destroys this object.

Implements IGameObject.

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

Draws via the given shader.

Parameters
shaderThe shader.

Implements IGameObject.

void Scene_Container::DrawShadow ( )
void Scene_Container::DrawShadow ( GLuint  shader)
overridevirtual

Draw shadows via the given shader.

Implements IGameObject.

const std::vector< Mesh * > Scene_Container::GetMeshes ( ) const
btRigidBody * Scene_Container::getRigidBody ( )
const GLuint Scene_Container::GetTexture ( const std::string &  textureName) const
overridevirtual

Gets a texture.

Parameters
textureNameThe name of the texture.
Returns
The texture.

Implements IGameObject.

void Scene_Container::InitRigidBody ( btScalar  mass)
virtual

Scene_Container owns this method because I, Dylan, have made an executive decision to make lights bound to the laws of physics impossible; I see no point for it (except for flashlights maybe). Our lights will be static, so the initialization of rigid bodies can be the sole responsibility of the Scene_Container, because it knows about all of its own vertices.

TODO: Support more than just Convex Hull Shape for collision detection; Triangle Mesh Shape might be more appropriate for static game objects.

void Scene_Container::SetProgram ( GLuint  shaderName)
overridevirtual

Sets the main shader program corresponding to this object.

Author
Harry
Date
4/14/2016
Parameters
shaderNameName of the shader.

Reimplemented from IGameObject.

void Scene_Container::SetShadowProgram ( GLuint  shaderName)
overridevirtual

Sets the shadow pass shader program corresponding to this object.

Parameters
shaderNameName of the shader.

Reimplemented from IGameObject.

void Scene_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 Scene_Container::Update ( )
overridevirtual

Updates this object.

Implements IGameObject.

Member Data Documentation

Transform Scene_Container::transform