forked from Vogtinator/crafti
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgldrawable.h
31 lines (25 loc) · 824 Bytes
/
gldrawable.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
#ifndef GLDRAWABLE_H
#define GLDRAWABLE_H
#include "gl.h"
class GLDrawable
{
public:
virtual ~GLDrawable() {}
void setXPosition(GLFix x) { posX = x; }
GLFix getXPosition() const { return posX; }
void setYPosition(GLFix y) { posY = y; }
GLFix getYPosition() const { return posY; }
void setZPosition(GLFix z) { posZ = z; }
GLFix getZPosition() const { return posZ; }
void setXRotation(GLFix x) { rotX = x; }
GLFix getXRotation() const { return rotX; }
void setYRotation(GLFix y) { rotY = y; }
GLFix getYRotation() const { return rotY; }
void setZRotation(GLFix z) { rotZ = z; }
GLFix getZRotation() const { return rotZ; }
virtual void draw() = 0;
protected:
GLFix posX = 0, posY = 0, posZ = 0;
GLFix rotX = 0, rotY = 0, rotZ = 0;
};
#endif // GLDRAWABLE_H