YAGE  1.0
Yet Another Game Engine
Mesh Class Reference

#include <Mesh.h>

Inheritance diagram for Mesh:
Model IGameObject

Public Member Functions

 Mesh (const aiMesh *, const aiMaterial *, Transform *)
 
 Mesh (const Mesh *, Transform *)
 
 ~Mesh ()
 
std::vector< VertexFormatGetVertices () override final
 
void Create ()
 
void DrawShadow (GLuint) override final
 Draw shadows via the given shader. More...
 
void Draw (GLuint) override final
 Draws via the given shader. More...
 
void Update () override final
 Updates this object. More...
 
std::vector< glm::vec3 > GetPositionVertices ()
 
- Public Member Functions inherited from Model
 Model ()
 
 Model (Transform *t)
 
virtual ~Model ()
 
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...
 
void Destroy () override
 Destroys this object. More...
 
GLuint GetVao () const
 
const std::vector< GLuint > & GetVbos () const
 
const GLuint GetTexture (const std::string &) const override
 Gets a texture. More...
 
void SetTexture (const std::string &textureName, const TextureType &textureType, const GLuint &texture) override
 Adds a texture to an object. 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

float shininess
 
float strength
 

Additional Inherited Members

- Protected Attributes inherited from Model
Transformtransform
 
GLuint vao
 
std::vector< GLuint > vbos
 
std::vector< Texturetextures
 
- Protected Attributes inherited from IGameObject
GLuint program = 0
 
GLuint shadowProgram = 0
 

Constructor & Destructor Documentation

Mesh::Mesh ( const aiMesh *  ai_mesh,
const aiMaterial *  ai_mat,
Transform transform 
)
Mesh::Mesh ( const Mesh mesh,
Transform t 
)
Mesh::~Mesh ( )

Member Function Documentation

void Mesh::Create ( )
void Mesh::Draw ( GLuint  shader)
finaloverridevirtual

Draws via the given shader.

Parameters
shaderThe shader.

Implements IGameObject.

void Mesh::DrawShadow ( GLuint  shader)
finaloverridevirtual

Draw shadows via the given shader.

Implements IGameObject.

std::vector< glm::vec3 > Mesh::GetPositionVertices ( )
std::vector< VertexFormat > Mesh::GetVertices ( )
finaloverridevirtual

Implements Model.

void Mesh::Update ( )
finaloverridevirtual

Updates this object.

Implements IGameObject.

Member Data Documentation

float Mesh::shininess
float Mesh::strength