vrecko
virtual reality framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
lsgeode.h
Go to the documentation of this file.
1
#ifndef LSGEODE_H_
2
#define LSGEODE_H_
3
4
namespace
AP_LSystem {
8
struct
TurtleProperties
9
{
13
enum
Flags
14
{
15
DRAW_DEBUG_GEOMETRY
= 0x00000001,
16
MINIMIZE_TWIST
= 0x00000002,
17
DEGREES_TO_RADIANS
= 0x00000004,
18
SEPARATE_GEOMETRY_FOR_TRANSLUCENT
= 0x00000008,
19
USE_QUERIES
= 0x00000010,
20
DRAW_PIPE_CAPS
= 0x00000100,
21
};
22
23
TurtleProperties
():
modelFile
(NULL){};
24
28
void
clean
()
29
{
30
if
(
modelFile
)
31
delete
modelFile
;
32
}
33
34
osg::ref_ptr<osg::Geometry>
geometry
;
35
36
osg::Matrixd
matrix
;
37
osg::Matrixd
lastMatrix
;
38
osg::Matrixd
lastFrame
;
39
40
double
length
;
41
double
lengthMultiplier
;
42
double
angle
;
43
double
angleMultiplier
;
44
unsigned
int
angleVariance
;
45
double
radius
;
46
double
radiusMultiplier
;
47
double
texCoordT
;
48
unsigned
int
texRepeatingS
;
49
50
unsigned
int
curveDetail
;
51
52
osg::Vec3
controlPoint
;
53
54
unsigned
int
flags
;
55
56
// direction stimuli
57
double
elasticityMultiplier
;
58
double
gravitropismElasticity
;
59
double
tropismElasticity
;
60
double
tropismAngle
;
61
osg::Vec3d
tropismVector
;
62
63
std::string *
modelFile
;
64
65
osg::ref_ptr<osg::Vec3dArray>
contour
;
66
osg::ref_ptr<osg::Vec3dArray>
contourLastV
;
67
osg::ref_ptr<osg::Vec3dArray>
contourLastN
;
68
unsigned
int
contourDetail
;
69
70
vector<osg::ref_ptr<osg::Vec3dArray> >
hemisphere
;
71
72
double
debugGeometryScale
;
73
};
77
enum
TurtleType
78
{
79
LS_TURTLE_JOINTEDPIPE
,
80
LS_TURTLE_STRAIGHTPIPE
,
81
LS_TURTLE_HERMITPIPE
,
82
LS_TURTLE_OBJMODEL
,
83
LS_TURTLE_RECTANGLE
,
84
LS_TURTLE_QUERY
,
85
};
86
92
class
LSGeode
:
public
osg::Geode
93
{
94
private
:
95
TurtleType
turtleType;
96
TurtleProperties
defaultTurtleProperties;
97
public
:
102
void
setTurtleType
(
const
std::string &
type
);
103
108
void
setTurtleType
(
TurtleType
type);
109
114
TurtleType
getTurtleType
();
115
120
void
setDefaultTurtleProperties
(
TurtleProperties
& p );
121
122
127
void
setDefaultTurtleProperties
(
int
index );
128
129
134
TurtleProperties
&
getDefaultTurtleProperties
( );
135
141
LSGeode
(
unsigned
int
index );
142
};
143
}
144
145
#endif
include
vreckoAP
Garden
lsgeode.h
Generated on Tue Feb 19 2013 10:23:43 for vrecko by
1.8.3.1