-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel.hpp
More file actions
36 lines (27 loc) · 772 Bytes
/
Model.hpp
File metadata and controls
36 lines (27 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include "Material.hpp"
#include "math.hpp"
#include "structs.hpp"
class Model {
public:
Model();
void setMaterial(Material material);
// Setter für die Transformationen
void setRotation(GLVector rotation);
void setTranslation(GLVector translation);
void setScale(GLVector scale);
// Die Dreiecke aus denen das Modell besteht
std::vector<Triangle> mTriangles;
// Das Material des Modells
Material getMaterial() const;
GLMatrix getTransformation() const;
private:
// Aufgabenblatt 2, Aufgabe 2: Nutzen Sie diese Matrizen für die Transformationen
GLVector mRotation;
GLVector mTranslation;
GLVector mScale;
Material mMaterial;
// Die Transformationsmatrix des Modells
GLMatrix mMatrix;
void updateMatrix();
};