BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
VIEW
RENDERING
STLRenderer.h
Go to the documentation of this file.
1
//STLRenderer: Version 1.0 (2008.09.12) Annette Treichel
2
3
#ifndef BALL_VIEW_RENDERING_STLRENDERER_H
4
#define BALL_VIEW_RENDERING_STLRENDERER_H
5
6
#ifndef BALL_VIEW_RENDERING_RENDERER_H
7
# include <
BALL/VIEW/RENDERING/renderer.h
>
8
#endif
9
10
#ifndef BALL_SYSTEM_FILE_H
11
# include <
BALL/SYSTEM/file.h
>
12
#endif
13
14
#ifndef BALL_MATHS_VECTOR3_H
15
# include <
BALL/MATHS/vector3.h
>
16
#endif
17
18
#ifndef BALL_MATHS_MATRIX44_H
19
# include <
BALL/MATHS/matrix44.h
>
20
#endif
21
22
namespace
BALL
23
{
24
namespace
VIEW
25
{
26
35
class
BALL_VIEW_EXPORT
STLRenderer
36
:
public
Renderer
37
{
38
public
:
39
43
45
STLRenderer
();
46
50
STLRenderer
(
const
String
& name)
51
throw
(
Exception::FileNotFound
);
52
54
virtual
~
STLRenderer
();
55
57
virtual
void
clear();
58
60
63
67
void
setFileName(
const
String
& name)
68
throw
(
Exception::FileNotFound
);
69
70
73
String
VRMLVector3(
Vector3
input);
74
76
79
83
virtual
bool
init(
const
Stage
& stage);
84
88
virtual
bool
finish();
89
91
92
void
renderSphere_(
const
Sphere
& sphere);
93
94
void
renderMesh_(
const
Mesh
& mesh);
95
96
void
renderTube_(
const
Tube
& tube);
97
98
void
renderTwoColoredTube_(
const
TwoColoredTube
& tube);
99
100
void
renderLine_(
const
Line
& tube);
101
102
void
renderTwoColoredLine_(
const
TwoColoredLine
& tube);
103
104
void
out_(
const
String
& data);
105
106
void
outheader_(
const
String
& data)
107
{out_(data); current_indent_ += 1;}
108
109
void
outfinish_(
const
String
& data)
110
{out_(data); current_indent_ -= 1;}
111
112
Size
width
, height;
113
114
protected
:
115
116
void
header_(
const
Vector3
& translation,
const
ColorRGBA
& color,
117
const
String
& rotation =
""
);
118
119
void
footer_();
120
121
File
outfile_
;
122
123
Vector3
origin_
;
124
Matrix4x4
rotation_
;
125
Index
current_indent_
;
126
String
endingName_
;
127
};
128
129
} }
// namespaces
130
131
#endif // BALL_VIEW_RENDERING_STLRENDERER_H
132
Generated by
1.8.3.1