-
Notifications
You must be signed in to change notification settings - Fork 0
/
Internode.h
59 lines (46 loc) · 908 Bytes
/
Internode.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
#ifndef INTERNODE_H
#define INTERNODE_H
#include "shared_ptr.h"
#include "Bud.h"
#include "Leaf.h"
#include "Vect3d.h"
#include "GenMarker.h"
///
// as Internode ID, NOTE it is also the index that the node in the tree vector
extern int nInternodeCount;
///
/// Note: I will not make a Internode too long
/// so I will only pick 3 points from the Internode
/// to make the shadow.
///
struct Internode : GenMarker
{
Internode()
: width(0.2f)
, pTerminalBud(NULL)
, pAnxillaryBud(NULL)
, pLeaf(NULL)
, nGrowthStep(0)
, id(-1)
, ancestorId(-1)
, bFromAnBud(false)
{ }
//
void Render();
// meta info
int id;
int ancestorId;
bool bFromAnBud;
//
Vect3d pos;// base pos
Vect3d vec;
float width;
unsigned nGrowthStep;
//
SharedPtr<Bud> pTerminalBud;
SharedPtr<Bud> pAnxillaryBud;
SharedPtr<Leaf> pLeaf;
private:
static float _specular[];// green
};
#endif