GCP Assignment 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Sam Class Reference

A class that handles the sam objects. More...

#include <Sam.h>

Collaboration diagram for Sam:
Collaboration graph

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

Shadershader
 The Shader for the Model. More...
 
Objectobj
 The object for the Model. More...
 
std::string material
 The material name. More...
 

Detailed Description

A class that handles the sam objects.

Constructor & Destructor Documentation

◆ Sam()

Sam::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.

Parameters
objectsA reference to the loaded Object files
shadersA reference to the loaded Shader files
Here is the call graph for this function:

◆ ~Sam()

Sam::~Sam ( )

Destructs a Sam Object.

Member Function Documentation

◆ draw()

void Sam::draw ( Maths::Mat4 viewMatrix,
Maths::Mat4 projMatrix,
Maths::Mat4  matrix 
)

Draw the Sam to the screen.

Parameters
viewMatrixA reference to the camera view matrix.
projMatrixA reference to the camera projection matrix.
matrixA reference to the objects matrix.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseShaders()

void Sam::initialiseShaders ( std::string  vertexShaderFileName,
std::string  fragmentShaderFileName,
std::unordered_map< std::string, Shader *> &  shaders 
)
private

Initialise the shaders.

Parameters
vertexShaderFileNameThe name of the vertex shader file.
fragmentShaderFileNameThe name of the fragment shader file.
shadersA reference to the loaded Shader files
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseVAO()

void Sam::initialiseVAO ( std::string  objFileName,
std::unordered_map< std::string, Object *> &  objects 
)
private

Initialise the object for the Model.

Parameters
objFileNameThe name of the obj file.
objectsA reference to the loaded Object files
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ material

std::string Sam::material
private

The material name.

◆ obj

Object* Sam::obj
private

The object for the Model.

◆ shader

Shader* Sam::shader
private

The Shader for the Model.


The documentation for this class was generated from the following files: