-
Notifications
You must be signed in to change notification settings - Fork 1
/
OBJET.h
44 lines (35 loc) · 1007 Bytes
/
OBJET.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
35
36
37
38
39
40
41
42
43
44
#include <string>
#include <vector>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "shader.h"
#include "model.h"
class OBJET
{
public:
/* Data */
/* Function */
OBJET(std::string pathToMetaJSON, int width, int heigth);
void Draw();
void ToImage(std::string pathToImage);
std::vector<float> GetDepthMap();
std::vector<int> GetImage();
void SetCamera(std::vector<float> position, std::vector<float> target);
void SetObjectPosition(std::string objectName, std::vector<float> position);
void SetObjectYRotation(std::string objectName, float yRotation);
void SetObjectScale(std::string objectName, float scale);
protected:
/* Data */
GLuint renderFramebuffer;
GLuint depthMapFramebuffer;
GLuint depthMap;
unsigned width, height;
unsigned shadowWidth, shadowHeight;
GLFWwindow* window;
Shader* objectShader;
Shader* shadowShader;
Model* model;
/* Function */
void InitOpenGL();
void InitShaders();
};