GlobeEngine
Flag.h
Go to the documentation of this file.
1 
7 #ifndef GlobeEngine_Flag_h
8 #define GlobeEngine_Flag_h
9 
10 #include "OpenGL_Includes.h"
11 #include "DrawableComponent.h"
12 
13 namespace ge {
14  class Flag : public ge::DrawableComponent
15  {
16  public:
17  Flag();
18  ~Flag();
19  void clear();
20  void create(GLuint slices, vmml::Vector3f origin, GLfloat radius, bool isPennant);
21  void create();
22 
23  void update();
24  void draw(std::shared_ptr<ge::Camera> _cam);
25 
26  private:
27 
28  vmml::Vector3i getVertexIndices(GLint vertexNr);
29  GLint getIndex(GLint insertedItems);
30  void setCircularVertexPositions(GLint index, GLfloat* positionBuffer, GLint slices, vmml::Vector3f origin, GLfloat radius, GLfloat verticalOffsetFromOrigin);
31  void setTriangleVertexPositions(GLint index, GLfloat* positionBuffer, vmml::Vector3f origin, GLfloat xOffset, GLfloat yOffset, GLfloat zOffset);
32  void setTriangleIndices(GLint index, GLuint* indicesBuffer, GLint firstVertex, GLint midVertex, GLint lastVertex, bool isCCW);
33  void extrudeTriangleFan(GLint index, GLuint* indicesBuffer, GLuint sharedVertex, GLuint* vertices, GLuint stripLength, bool isCCW, bool isClosed);
34  void extrudeTriangleStrip(GLint index, GLuint* indicesBuffer, GLuint* baseVertices, GLuint* topVertices, GLuint stripLength, bool isCCW, bool isClosed);
35  };
36 }
37 #endif
Definition: DrawableComponent.h:25
Flag()
Definition: Flag.cpp:4
~Flag()
Definition: Flag.cpp:9
Definition: Flag.h:14
void update()
Definition: Flag.cpp:226
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: Flag.cpp:210
Definition: AvalancheTrainingSimulationEngine.h:28
void create()
Definition: Flag.cpp:19
void clear()
Definition: Flag.cpp:14