VisualizeVideo
 All Classes Functions Pages
Cube.h
1 #pragma once
2 
3 #include <glm/glm.hpp>
4 
5 #include <string>
6 
7 #include <FreeImage.h>
8 
9 #include "ResourceLoader.h"
10 #include "Program.h"
11 #include "Camera.h"
12 #include "VolumeData.h"
14 
18 class Cube
19 {
20 public:
26  Cube(std::shared_ptr<ResourceLoader> resLoader, VolumeData volumedata);
27  ~Cube(void);
28 
30  void renderVolume(Program &prog, std::shared_ptr<Camera> camera = std::shared_ptr<Camera>());
31  void setModelMatrix(const glm::mat4 &modelMatrix);
32 
33 private:
34  // creates a cube
35  void createCube();
36  // binds the buffers
37  void bindCube(const std::vector<GLfloat> &vertices, const std::vector<GLuint> &indices);
38 
39  std::shared_ptr<ResourceLoader> _resourceLoader;
40  VolumeData _volumedata;
41 
42  GLuint _2D_texture;
43  GLuint _3D_texture;
44  GLuint _vao, _vbo, _vbio;
45  glm::mat4 _modelMatrix;
46 
47 };
48