-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRectangle.h
34 lines (25 loc) · 836 Bytes
/
Rectangle.h
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
#ifndef RECTANGLE_CLASS_H
#define RECTANGLE_CLASS_H
#include <glm/glm.hpp>
#include "Mesh.h"
#include "Primitives.h"
class Rectangle {
private:
const Primitives& primitives;
Mesh* rectMesh;
void UpdateBounds();
public:
glm::mat4 matrix = glm::mat4( 1.0f );
glm::vec3 translation = glm::vec3( 0.0f, 0.0f, 0.0f );
glm::quat rotation = glm::quat( 1.0f, 0.0f, 0.0f, 0.0f );
glm::vec3 scale = glm::vec3( 1.0f, 1.0f, 1.0f );
glm::vec3 minBound;
glm::vec3 maxBound;
float width;
float height;
Rectangle( const Primitives& primitives, float width, float height );
void Draw( Shader& shader, Camera& camera );
void Translate( glm::vec3 diplacementVec );
void MoveTo( glm::vec3 newPosition );
};
#endif