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
VRMLRenderer.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
5
#ifndef BALL_VIEW_RENDERING_VRMLRENDERER_H
6
#define BALL_VIEW_RENDERING_VRMLRENDERER_H
7
8
#ifndef BALL_VIEW_RENDERING_RENDERER_H
9
# include <
BALL/VIEW/RENDERING/renderer.h
>
10
#endif
11
12
#ifndef BALL_SYSTEM_FILE_H
13
# include <
BALL/SYSTEM/file.h
>
14
#endif
15
16
#ifndef BALL_MATHS_VECTOR3_H
17
# include <
BALL/MATHS/vector3.h
>
18
#endif
19
20
#ifndef BALL_MATHS_MATRIX44_H
21
# include <
BALL/MATHS/matrix44.h
>
22
#endif
23
24
namespace
BALL
25
{
26
namespace
VIEW
27
{
28
class
ColorRGBA;
29
39
class
BALL_VIEW_EXPORT
VRMLRenderer
:
public
Renderer
40
{
41
public
:
42
46
48
VRMLRenderer
();
49
53
VRMLRenderer
(
const
String
& name)
54
throw
(
Exception::FileNotFound
);
55
57
virtual
~
VRMLRenderer
();
58
60
virtual
void
clear();
61
63
66
70
void
setFileName(
const
String
& name)
71
throw
(
Exception::FileNotFound
);
72
75
String
VRMLColorRGBA(
const
ColorRGBA
& input);
76
79
String
VRMLVector3(
Vector3
input);
80
82
void
VRMLColor(
const
ColorRGBA
& color);
83
85
88
92
virtual
bool
init(
const
Stage
& stage);
93
97
virtual
bool
finish();
98
100
101
void
renderSphere_(
const
Sphere
& sphere);
102
103
void
renderMesh_(
const
Mesh
& mesh);
104
105
void
renderLine_(
const
Line
& miniTube);
106
107
void
renderTwoColoredLine_(
const
TwoColoredLine
& miniTube);
108
109
void
renderTube_(
const
Tube
& tube);
110
111
void
renderTwoColoredTube_(
const
TwoColoredTube
& tube);
112
113
void
out_(
const
String
& data);
114
115
void
outheader_(
const
String
& data)
116
{out_(data); current_indent_ += 1;}
117
118
void
outfinish_(
const
String
& data)
119
{out_(data); current_indent_ -= 1;}
120
121
Size
width
, height;
122
123
protected
:
124
125
void
header_(
const
Vector3
& translation,
const
ColorRGBA
& color,
126
const
String
& rotation =
""
);
127
128
void
footer_();
129
130
File
outfile_
;
131
132
Vector3
origin_
;
133
Matrix4x4
rotation_
;
134
Index
current_indent_
;
135
136
//size estimate for afterwards scaling for printing
137
float
smallX, smallY,
smallZ
, bigX, bigY, bigZ;
138
139
//boolean showing if scaling is relevant afterall
140
bool
scalingUsed
;
141
};
142
143
} }
// namespaces
144
145
#endif // BALL_VIEW_RENDERING_VRMLRENDERER_H
Generated by
1.8.3.1