Flow Visualisation
Geometry.h
Go to the documentation of this file.
1 //
2 // Geometry.h
3 // flowviz
4 //
5 // Created by Johann Götz on 11.05.15.
6 // Copyright (c) 2015 Johann Götz. All rights reserved.
7 //
8 
9 #ifndef __flowviz__Geometry__
10 #define __flowviz__Geometry__
11 
12 #include <stdio.h>
13 #include <OpenGL/gl3.h>
14 
15 #include "glm.hpp"
16 
17 #include "VertexGeometry.h"
18 #include "ISceneGraphPart.h"
19 #include "Texture.h"
20 
21 namespace render {
22 
26  class Geometry : public ISceneGraphPart
27  {
28  private:
29  Texture* m_texture;
31  int m_vertexCount;
32  int m_indexCount;
34  GLuint m_vertexBuffer;
35  GLuint m_vertexArray;
36  GLuint m_indexBuffer;
38  glm::mat4 m_modelMatrix;
39  float m_transparency;
41  public:
42  Geometry(objects::VertexGeometry *vertexGeoemetry);
43  ~Geometry();
44 
45  Texture *get_texture() { return m_texture; };
46  void set_texture(Texture *texture) { m_texture = texture; }
47 
48  int get_vertexCount() { return m_vertexCount; }
49  int get_indexCount() { return m_indexCount; }
50 
56  virtual void render(SceneContext *context);
57 
58  glm::mat4 get_modelMatrix() { return m_modelMatrix; }
59  void set_modelMatrix(glm::mat4 modelMatrix) { m_modelMatrix = modelMatrix; }
60 
61  float get_transparency() { return m_transparency; }
62  void set_transparency(float transparency) { m_transparency = transparency; }
63  };
64 
65 }
66 
67 #endif /* defined(__flowviz__Geometry__) */
~Geometry()
Definition: Geometry.cpp:53
Represents OpenGL texture.
Definition: Texture.h:21
int get_vertexCount()
Definition: Geometry.h:48
void set_modelMatrix(glm::mat4 modelMatrix)
Definition: Geometry.h:59
Stores all model information.
Definition: VertexGeometry.h:22
int get_indexCount()
Definition: Geometry.h:49
Represents the current state of rendering.
Definition: SceneContext.h:22
glm::mat4 get_modelMatrix()
Definition: Geometry.h:58
Represents part of the SceneGraph.
Definition: ISceneGraphPart.h:23
Texture * get_texture()
Definition: Geometry.h:45
Definition: Camera.h:19
Geometry(objects::VertexGeometry *vertexGeoemetry)
Transparency Setting.
Definition: Geometry.cpp:15
float get_transparency()
Definition: Geometry.h:61
Represents a 3D Object in OpenGL.
Definition: Geometry.h:26
void set_transparency(float transparency)
Definition: Geometry.h:62
void set_texture(Texture *texture)
Definition: Geometry.h:46
Definition: type_mat2x2.hpp:49
virtual void render(SceneContext *context)
Renders the current object.
Definition: Geometry.cpp:61