RenderEngine
Loading...
Searching...
No Matches
Group.hpp
Go to the documentation of this file.
1#ifndef GROUP_HPP
2#define GROUP_HPP
3
4
5#include "Object.hpp"
6#include "Mesh.hpp"
7// Include GLM
8#include <glm/glm.hpp>
9#include <glm/gtc/matrix_transform.hpp>
10#include <glm/gtc/quaternion.hpp>
11#include <glm/gtx/quaternion.hpp>
12#include <glm/gtx/euler_angles.hpp>
13#include <glm/gtx/norm.hpp>
14#include "MTLShader.hpp"
15#include "Material.hpp"
16
17
18// Object that can have multiple meshes and materials
19class Group: public Object{
20
21 public:
23
24 Group();
26
27 ~Group();
29
30 void addMesh(Mesh* mesh);
32
33 void addMaterial(Material* mat);
35
36 Mesh* getMesh(int index);
38
39 Material* getMaterial(int index);
41
42 int getNumMeshes();
44
45 void setRenderMode(float rendermode);
47
48 void init();
50
51 void render(Camera* camera);
53
54 void setupShaders();
55
56 private:
57
58 std::vector<Mesh*> meshes;
59 std::vector<Material*> materials;
60
61
62};
63
64#endif
Camera.
Definition Camera.hpp:22
Definition Group.hpp:19
void render(Camera *camera)
render
Definition Group.cpp:42
void setupShaders()
SetupShaders.
Definition Group.cpp:53
void addMaterial(Material *mat)
addMaterial
Definition Group.cpp:19
void init()
init
Definition Group.cpp:38
Group()
Default constructor.
Definition Group.cpp:6
void addMesh(Mesh *mesh)
addGeometry
Definition Group.cpp:15
Material * getMaterial(int index)
getMaterial
Definition Group.cpp:28
Mesh * getMesh(int index)
getMesh
Definition Group.cpp:24
void setRenderMode(float rendermode)
SetRenderMode.
int getNumMeshes()
getNumMeshes
Definition Group.cpp:32
~Group()
Destructor.
Definition Group.cpp:10
Definition Material.hpp:19
Mesh.
Definition Mesh.hpp:28
Object.
Definition Object.hpp:28