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
POVRenderer.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
// $Id: POVRenderer.h,v 1.12.16.1 2007/03/25 21:26:13 oliver Exp $
5
//
6
7
#ifndef BALL_VIEW_RENDERING_POVRENDERER_H
8
#define BALL_VIEW_RENDERING_POVRENDERER_H
9
10
#ifndef BALL_VIEW_RENDERING_RENDERER_H
11
# include <
BALL/VIEW/RENDERING/renderer.h
>
12
#endif
13
14
#ifndef BALL_SYSTEM_FILE_H
15
# include <
BALL/SYSTEM/file.h
>
16
#endif
17
18
#ifndef BALL_MATHS_VECTOR3_H
19
# include <
BALL/MATHS/vector3.h
>
20
#endif
21
22
#ifndef BALL_MATHS_MATRIX44_H
23
# include <
BALL/MATHS/matrix44.h
>
24
#endif
25
26
namespace
BALL
27
{
28
namespace
VIEW
29
{
30
class
ColorRGBA;
31
class
ClippingPlane;
32
39
class
BALL_VIEW_EXPORT
POVRenderer
:
public
Renderer
40
{
41
public
:
42
43
BALL_CREATE
(
POVRenderer
)
44
45
struct
POVRendererClippingPlane
46
{
47
public
:
48
Vector3
normal
;
49
float
translation
;
50
// Vector3 translation;
51
};
52
56
58
POVRenderer
();
59
63
POVRenderer
(
const
String
& name)
64
throw
(
Exception::FileNotFound
);
65
66
// Only for Python
67
POVRenderer
(
const
POVRenderer
& renderer);
68
69
71
virtual
~
POVRenderer
();
72
74
virtual
void
clear();
75
77
80
84
void
setFileName(
const
String
& name)
85
throw
(
Exception::FileNotFound
);
86
88
void
setOstream(std::ostream& out_stream);
89
91
void
setHumanReadable(
bool
state)
92
{ human_readable_ = state;}
93
95
bool
isHumanReadable()
const
96
{
return
human_readable_;}
97
100
String
POVColorRGBA(
const
ColorRGBA
& input);
101
104
String
POVFinish(
const
String
&
object
,
const
ColorRGBA
& input);
105
108
String
POVVector3(
Vector3
input);
109
110
virtual
bool
renderOneRepresentation(
const
Representation
& representation);
111
113
117
120
virtual
bool
init(
Scene
& scene);
121
125
virtual
bool
init(
const
Stage
& stage,
float
width,
float
height);
126
130
virtual
bool
finish();
131
132
void
renderSphere_(
const
Sphere
& sphere);
133
134
void
renderDisc_(
const
Disc
& disc);
135
136
void
renderTube_(
const
Tube
& tube);
137
138
void
renderTwoColoredTube_(
const
TwoColoredTube
& tube);
139
140
void
renderMesh_(
const
Mesh
& mesh);
141
142
void
renderTwoColoredLine_(
const
TwoColoredLine
& line);
143
144
void
renderLine_(
const
Line
& line);
145
146
void
renderPoint_(
const
Point
& point);
147
148
// do nothing
149
void
renderLabel_(
const
Label
&);
150
152
virtual
void
renderMultiLine_(
const
MultiLine
& line);
153
155
156
protected
:
157
158
const
ColorRGBA
& getColor_(
const
GeometricObject
&
object
);
159
160
std::ostream*
outfile_
;
161
String
trimFloatValue_(
float
value);
162
void
storeColor_(
const
GeometricObject
&
object
);
163
String
getColorIndex_(
const
ColorRGBA
& color);
164
165
Vector3
origin_
;
166
Matrix4x4
rotation_
;
167
vector<ClippingPlane*>
clipping_planes_
;
168
bool
human_readable_
;
169
170
typedef
HashMap<String, Size>
ColorMap
;
171
ColorMap
color_map_
;
172
vector<const Representation*>
representations_
;
173
HashSet<const Mesh*>
wireframes_
;
174
HashSet<String>
color_strings_
;
175
String
font_file_
;
176
double
m_[12];
177
Position
color_index_
;
178
};
179
180
}
// namespace BALL
181
}
// namespace VIEW
182
183
#endif // BALL_VIEW_RENDERING_POVRENDERER_H
Generated by
1.8.3.1