-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.h
67 lines (48 loc) · 970 Bytes
/
domain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef DOMAIN_H
#define DOMAIN_H
#include "vect3d.h"
#include "shared_ptr.h"
#include "Config.h"
#include "Bud.h"
#include "Leaf.h"
#include "Internode.h"
#include "GL/glut.h"
extern float *h_shadow;
extern float *d_shadow;
///
///
class Domain
{
public:
Domain()
: _nLastGen(-1)
{ }
void Init();
void Destroy();
void Render();
// growth control
// one stage ahead per calling
// NOTE: should be called only after voxels processed
void grow();
private:
//
void makeInternode( Internode &rNode, int nParentId,
Vect3d &vNodePos, Vect3d &vNodeVec,
Vect3d &vTermBudVec,
bool bHasLeaf = false, bool bHasAnBud = false);
void addInternode( Internode &rNode);
//
void gpu_SpaceColonization();
//
void RenderFrame();
void RenderTree();
void RenderShadow();
void CalcGroundShadow();
void RenderGroundShadow();
void RenderBarriers();
void checkCells();
void checkShadow();
private:
unsigned _nLastGen;
};
#endif