altEngine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
shadow_volume.h
Go to the documentation of this file.
1 #ifndef SHADOW_VOLUME_H
2 #define SHADOW_VOLUME_H
3 
4 #include "include.h"
5 
6 typedef struct
7 {
11 } edge_t;
12 
13 class Graphics;
14 
16 {
17 public:
18  ShadowVolume();
19  int CreateVolume(Graphics &gfx, vertex_t *pVertex, unsigned int *pIndex, unsigned int start_index, unsigned int num_face, vec3 &vLight);
20  void AddEdge(int *pEdge, unsigned int &num_edges, int v0, int v1);
21  int render(Graphics &gfx);
22  void destroy(Graphics &gfx);
23 
26  int vbo;
27  int ibo;
28 
29 private:
30  vertex_t *vert_array; // Vertex data for rendering shadow volume
31  unsigned int *index_array;
32  int *pEdges; // temporary edge list
33  unsigned int num_vert;
34 
35  unsigned int alloc_vert;
36  unsigned int alloc_edge;
37 
38 };
39 
40 
41 #endif