GCP Assignment 1
Sam.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include <unordered_map>
5 #include "GL/glew.h"
8 #include "Maths/Mat4.h"
9 
13 class Sam
14 {
15 public:
21  Sam(std::unordered_map<std::string, Object*> &objects, std::unordered_map<std::string, Shader*> &shaders);
22 
26  ~Sam();
27 
34  void draw(Maths::Mat4 &viewMatrix, Maths::Mat4 &projMatrix, Maths::Mat4 matrix);
35 
36 private:
42  std::string material;
43 
49  void initialiseVAO(std::string objFileName, std::unordered_map<std::string, Object*> &objects);
50 
57  void initialiseShaders(std::string vertexShaderFileName, std::string fragmentShaderFileName,
58  std::unordered_map<std::string, Shader*> &shaders);
59 };
std::string material
The material name.
Definition: Sam.h:42
Object * obj
The object for the Model.
Definition: Sam.h:40
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.
Definition: Sam.cpp:3
Contains the Mat4 structure with functions and overloaded operators. This is row major.
Definition: Mat4.h:15
void initialiseShaders(std::string vertexShaderFileName, std::string fragmentShaderFileName, std::unordered_map< std::string, Shader *> &shaders)
Initialise the shaders.
Definition: Sam.cpp:53
void initialiseVAO(std::string objFileName, std::unordered_map< std::string, Object *> &objects)
Initialise the object for the Model.
Definition: Sam.cpp:16
Shader * shader
The Shader for the Model.
Definition: Sam.h:38
Creates a Shader from an text file, this can then be used with OpenGL.
Definition: Shader.h:12
void draw(Maths::Mat4 &viewMatrix, Maths::Mat4 &projMatrix, Maths::Mat4 matrix)
Draw the Sam to the screen.
Definition: Sam.cpp:74
~Sam()
Destructs a Sam Object.
Definition: Sam.cpp:12
Creates an object from an text file, this can then be used with OpenGL.
Definition: Object.h:15
A class that handles the sam objects.
Definition: Sam.h:13