Robotran C Documentation
MbsShapeRenderer.hh
Go to the documentation of this file.
1 
8 #ifndef _MBS_SHAPE_RENDERER_HH_
9 #define _MBS_SHAPE_RENDERER_HH_
10 
11 
12 #include <glm.hpp>
13 #include <vector>
14 
15 
16 namespace OpenGLMbs{
17 
18 // forward declaration
19 class MbsWorld3D;
20 
21 
30 {
31  public:
32 
34  virtual ~MbsShapeRenderer(){}
35 
37  virtual void Init(std::vector<glm::vec3> vertices,
38  std::vector<glm::vec3> colors,
39  std::vector<glm::vec3> normals,
40  std::vector<unsigned int> indexes,
41  std::vector<glm::vec3> line_vertices,
42  std::vector<glm::vec3> line_colors,
43  std::vector<unsigned int> line_indexes) = 0;
44 
46  virtual void Update(glm::mat4 model_mat,
47  glm::mat4 MVP,
48  glm::mat3 M_inv_trans,
49  MbsWorld3D *world_3d,
50  float shiny_mat,
51  glm::vec3 const& specular_mat,
52  float transparency) = 0;
53 
54  virtual void ShadowDepth(int index) = 0;
55 
56  virtual void SetModelMat(glm::mat4 const& model_mat) = 0;
57 };
58 
59 
60 } // close namespace
61 
62 #endif //_MBS_SHAPE_RENDERER_HH_
OpenGLMbs
Definition: MpegFrameCaptureOptions.hh:6
OpenGLMbs::MbsShapeRenderer::~MbsShapeRenderer
virtual ~MbsShapeRenderer()
Destructor.
Definition: MbsShapeRenderer.hh:34
OpenGLMbs::MbsShapeRenderer::Init
virtual void Init(std::vector< glm::vec3 > vertices, std::vector< glm::vec3 > colors, std::vector< glm::vec3 > normals, std::vector< unsigned int > indexes, std::vector< glm::vec3 > line_vertices, std::vector< glm::vec3 > line_colors, std::vector< unsigned int > line_indexes)=0
Init the current shape renderer.
OpenGLMbs::MbsShapeRenderer
MbsShapeRenderer is an abstract class that defines the property need to render a MbsShape3D....
Definition: MbsShapeRenderer.hh:29
OpenGLMbs::MbsShapeRenderer::ShadowDepth
virtual void ShadowDepth(int index)=0
OpenGLMbs::MbsShapeRenderer::SetModelMat
virtual void SetModelMat(glm::mat4 const &model_mat)=0
OpenGLMbs::MbsShapeRenderer::Update
virtual void Update(glm::mat4 model_mat, glm::mat4 MVP, glm::mat3 M_inv_trans, MbsWorld3D *world_3d, float shiny_mat, glm::vec3 const &specular_mat, float transparency)=0
Execute the necessary code to render this shape.