Kinetic Visualization
 All Classes Functions Variables Pages
View.h
1 #pragma once
2 #include "INode.h"
3 #include "Camera.h"
4 #include "Light.h"
5 #include "FBO.h"
6 #include "MyShader.hpp"
7 
8 class View
9 {
10 public:
11  enum UniformType
12  {
13  UT_IDENTITY,
14  UT_MODELMATRIX,
15  UT_OLDMODELMATRIX,
16  UT_VIEWMATRIX,
17  UT_OLDVIEWMATRIX,
18  UT_PROJECTIONMATRIX,
19  UT_OLDPROJECTIONMATRIX,
20  UT_VIEWPROJECTIONMATRIX,
21  UT_MODELVIEWPROJECTIONMATRIX,
22  UT_OLDMODELVIEWPROJECTIONMATRIX,
23  UT_MODELVIEWPROJECTIONLIGHTMATRIX,
24  UT_WORLDINVERSETRANSPOSE3x3,
25  UT_VIEWPORT_WIDTH,
26  UT_VIEWPORT_HEIGHT,
27  UT_ACT_FBO_DEPTH,
28  UT_FBO_SIZE_3D,
29  UT_VIEWPORT,
30  UT_TEXTURE0,
31  UT_TEXTURE1,
32  UT_TEXTURE2,
33  UT_TEXTURE3,
34  UT_TEXTURE4,
35  UT_TEXTURE5,
36  UT_TEXTURE6,
37  UT_TEXTURE7,
38  UT_LIGHT_POSITION,
39  UT_LIGHT_AMBIENT,
40  UT_LIGHT_DIFFUSE,
41  UT_LIGHT_SPECULAR,
42  UT_LIGHT_CONSTANTATTENUATION,
43  UT_LIGHT_LINEARATTENUATION,
44  UT_LIGHT_QUADRATICATTENUATION,
45  UT_LIGHT_SHINENESS,
46  UT_MATERIAL_EMISSIVE,
47  UT_MATERIAL_AMBIENT,
48  UT_MATERIAL_DIFFUSE,
49  UT_MATERIAL_SPECULAR,
50  UT_MATERIAL_SHININESS,
51  UT_TIME_DURATION,
52  UT_BONES,
53  UT_OLDBONES,
54  UT_EYE_POSITION,
55  UT_VOLUMESIZE,
56  UT_RENDERMODE,
57  UT_ADDAPTIVE,
58  UT_STEPSIZE,
59  UT_COMPOSITING_MODE,
60  UT_MIP,
61  UT_TRANSFER,
62  UT_AVERAGE,
63  UT_LIGHT,
64  UT_PHONG,
65  UT_PARTICLE_SIZE,
66  UT_HDR_MODE,
67  UT_HDR_ENABLE
68 
69  };
70 
71 public:
75  View(void);
79  ~View(void);
80 
85  void SetLight(Light* light);
90  void SetCamera(Camera* camera);
95  void SetRoot(INode* inode);
96 
101  Camera* GetCamera();
106  INode* GetRoot();
111  Light* GetLight();
112 
117  void SetPass(unsigned int pass);
122  unsigned int GetPass();
123 
128  void AddFBO(FBO::FBOPtr fbo);
134  void SetFBO(unsigned int id, FBO::FBOPtr fbo);
139  FBO::FBOPtr GetFBO();
145  FBO::FBOPtr GetFBO(int at);
146 
151  glm::vec3 GetGrid();
156  void SetGrid(glm::vec3 grid);
157 
158 private:
159  unsigned int m_pass;
160 
161  INode* m_root;
162  Camera* m_camera;
163  Light* m_light;
164  std::vector<FBO::FBOPtr> m_fbo;
165 
166  glm::vec3 m_grid;
167 };