Vis 2 Demo  1.0
Technical illustration type real-time rendering of geometry
 All Classes Namespaces Files Functions Variables Typedefs Macros
ModelMultiTextured.h
Go to the documentation of this file.
1 #ifndef __MODEL_MULTI_TEXTURED_H__
2 #define __MODEL_MULTI_TEXTURED_H__
3 
4 #include <glew.h>
5 #include "DrawableObject.h"
6 #include "../visualisation/ShaderController.h"
7 #include "../visualisation/Texture.h"
8 #include "./loader/LoaderOBJ.h"
9 
10 #define VIS2_SHADER_DIFFUSE_SLOT 0
11 #define VIS2_SHADER_COLORID_SLOT 1
12 #define VIS2_SHADER_TRANSP_SLOT 2
13 
14 namespace vis2
15 {
17 
23  {
24  public:
26 
35  ModelMultiTextured( const char* _id_name,
36  const glm::vec3 _id_color,
37  const glm::vec3 _contour_color,
38  glm::mat4 & _modelMatrix,
39  LoaderOBJ* _loader,
40  ShaderController* _shader_controller);
41 
43 
44  virtual ~ModelMultiTextured();
45 
47 
50  virtual void update(double _deltaT);
51 
53 
56  virtual void draw(glm::mat4 & _projectionMatrix);
57 
59 
65  virtual void assignShaderController(ShaderController* _shader_ctrl, const unsigned int _slot);
66 
68 
71  virtual void updateModelMatrix(glm::mat4 & _modelMatrix);
72 
74 
78  virtual void draw(glm::mat4 & _projectionMatrix, const unsigned int _slot);
79 
81  inline const char* getIdName() const {return id_name;}
82 
84  inline glm::vec3 getIdColor() const { return id_color; }
85 
86  protected:
87 
88  const char* id_name;
89  const glm::vec3 id_color;
90  const glm::vec3 contour_color;
91 
93 
94  unsigned int index_count;
95 
97 
98  GLuint vao_handle[3];
99  bool vao_setup_done[3];
100 
105 
106  private:
109 
110  };
111 }
112 
113 
114 #endif