GCP Assignment 1
|
A class that handles the sam objects. More...
#include <Sam.h>
Public Member Functions | |
Sam (std::unordered_map< std::string, Object *> &objects, std::unordered_map< std::string, Shader *> &shaders) | |
Creates a Sam Object using the shader file locations, the obj file location and OpenGL. More... | |
~Sam () | |
Destructs a Sam Object. More... | |
void | draw (Maths::Mat4 &viewMatrix, Maths::Mat4 &projMatrix, Maths::Mat4 matrix) |
Draw the Sam to the screen. More... | |
Private Member Functions | |
void | initialiseVAO (std::string objFileName, std::unordered_map< std::string, Object *> &objects) |
Initialise the object for the Model. More... | |
void | initialiseShaders (std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader *> &shaders) |
Initialise the shaders. More... | |
Private Attributes | |
Shader * | shader |
The Shader for the Model. More... | |
Object * | obj |
The object for the Model. More... | |
std::string | material |
The material name. More... | |
A class that handles the sam objects.
void Sam::draw | ( | Maths::Mat4 & | viewMatrix, |
Maths::Mat4 & | projMatrix, | ||
Maths::Mat4 | matrix | ||
) |
Draw the Sam to the screen.
viewMatrix | A reference to the camera view matrix. |
projMatrix | A reference to the camera projection matrix. |
matrix | A reference to the objects matrix. |
|
private |
Initialise the shaders.
vertexShaderFileName | The name of the vertex shader file. |
fragmentShaderFileName | The name of the fragment shader file. |
shaders | A reference to the loaded Shader files |
|
private |
Initialise the object for the Model.
objFileName | The name of the obj file. |
objects | A reference to the loaded Object files |
|
private |
The material name.
|
private |
The object for the Model.