altEngine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
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
{
8
vec3
v1
;
9
vec3
v2
;
10
vec3
vNorm
;
11
}
edge_t
;
12
13
class
Graphics
;
14
15
class
ShadowVolume
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
24
matrix3
morientation
;
25
vec3
position
;
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
Generated on Tue Nov 21 2017 19:18:54 for altEngine by
1.8.2