BALL
1.5.0
include
BALL
VIEW
RENDERING
RENDERERS
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_RENDERERS_POVRENDERER_H
8
#define BALL_VIEW_RENDERING_RENDERERS_POVRENDERER_H
9
10
#ifndef BALL_VIEW_RENDERING_RENDERERS_RENDERER_H
11
# include <
BALL/VIEW/RENDERING/RENDERERS/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
64
POVRenderer
(
const
String
& name);
65
66
// Only for Python
67
POVRenderer
(
const
POVRenderer
& renderer);
68
69
71
virtual
~
POVRenderer
();
72
74
virtual
void
clear();
75
77
80
85
void
setFileName(
const
String
& name);
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
118
using
Renderer::init
;
119
123
virtual
bool
init(
const
Stage
& stage,
float
width,
float
height);
124
128
virtual
bool
finish();
129
130
void
renderSphere_(
const
Sphere
& sphere);
131
132
void
renderDisc_(
const
Disc
& disc);
133
134
void
renderTube_(
const
Tube
& tube);
135
136
void
renderTwoColoredTube_(
const
TwoColoredTube
& tube);
137
138
void
renderMesh_(
const
Mesh
& mesh);
139
140
void
renderTwoColoredLine_(
const
TwoColoredLine
& line);
141
142
void
renderLine_(
const
Line
& line);
143
144
void
renderPoint_(
const
Point
& point);
145
146
// do nothing
147
void
renderLabel_(
const
Label
&);
148
150
virtual
void
renderMultiLine_(
const
MultiLine
& line);
151
153
154
protected
:
155
156
const
ColorRGBA
& getColor_(
const
GeometricObject
&
object
);
157
158
std::ostream*
outfile_
;
159
String
trimFloatValue_(
float
value);
160
void
storeColor_(
const
GeometricObject
&
object
);
161
String
getColorIndex_(
const
ColorRGBA
& color);
162
163
Vector3
origin_
;
164
Matrix4x4
rotation_
;
165
vector<ClippingPlane*>
clipping_planes_
;
166
bool
human_readable_
;
167
168
typedef
HashMap<String, Size>
ColorMap
;
169
ColorMap
color_map_
;
170
vector<const Representation*>
representations_
;
171
HashSet<const Mesh*>
wireframes_
;
172
HashSet<String>
color_strings_
;
173
String
font_file_
;
174
double
m_[12];
175
Position
color_index_
;
176
};
177
178
}
// namespace BALL
179
}
// namespace VIEW
180
181
#endif // BALL_VIEW_RENDERING_POVRENDERER_H
BALL::VIEW::Sphere
Definition:
sphere.h:30
BALL::VIEW::POVRenderer::outfile_
std::ostream * outfile_
Definition:
POVRenderer.h:158
BALL::HashMap< String, Size >
BALL::VIEW::POVRenderer::color_strings_
HashSet< String > color_strings_
Definition:
POVRenderer.h:172
vector3.h
BALL::TMatrix4x4< float >
BALL::VIEW::Representation
Definition:
representation.h:57
BALL::VIEW::POVRenderer::font_file_
String font_file_
Definition:
POVRenderer.h:173
BALL::String
Definition:
string.h:56
file.h
BALL::VIEW::TwoColoredTube
Definition:
twoColoredTube.h:45
BALL::VIEW::POVRenderer::representations_
vector< const Representation * > representations_
Definition:
POVRenderer.h:170
BALL
Definition:
constants.h:12
BALL::VIEW::POVRenderer::origin_
Vector3 origin_
Definition:
POVRenderer.h:163
BALL::VIEW::Renderer
Definition:
renderer.h:54
BALL::VIEW::POVRenderer::wireframes_
HashSet< const Mesh * > wireframes_
Definition:
POVRenderer.h:171
BALL::VIEW::MultiLine
Definition:
multiLine.h:30
BALL::VIEW::GeometricObject
Definition:
geometricObject.h:36
BALL::HashSet
Definition:
hashSet.h:45
BALL::VIEW::POVRenderer
Definition:
POVRenderer.h:39
BALL::VIEW::Label
Definition:
label.h:45
BALL::VIEW::Tube
Definition:
tube.h:37
BALL::VIEW::POVRenderer::clipping_planes_
vector< ClippingPlane * > clipping_planes_
Definition:
POVRenderer.h:165
BALL::VIEW::POVRenderer::human_readable_
bool human_readable_
Definition:
POVRenderer.h:166
BALL::VIEW::ColorRGBA
Definition:
colorRGBA.h:31
BALL::VIEW::POVRenderer::color_index_
Position color_index_
Definition:
POVRenderer.h:175
BALL::VIEW::Disc
Definition:
disc.h:29
BALL_SIZE_TYPE
BALL::TVector3< float >
BALL::VIEW::POVRenderer::POVRendererClippingPlane::normal
Vector3 normal
Definition:
POVRenderer.h:48
renderer.h
BALL::VIEW::POVRenderer::ColorMap
HashMap< String, Size > ColorMap
Definition:
POVRenderer.h:168
BALL::VIEW::Mesh
Definition:
mesh.h:38
matrix44.h
BALL::VIEW::POVRenderer::POVRendererClippingPlane::translation
float translation
Definition:
POVRenderer.h:49
BALL::VIEW::Renderer::init
virtual bool init(Scene &scene)
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition:
COMMON/global.h:52
BALL::VIEW::POVRenderer::setHumanReadable
void setHumanReadable(bool state)
Definition:
POVRenderer.h:91
BALL::VIEW::Point
Definition:
point.h:34
BALL_CREATE
#define BALL_CREATE(name)
Definition:
create.h:62
BALL::VIEW::POVRenderer::POVRendererClippingPlane
Definition:
POVRenderer.h:45
BALL::VIEW::Line
Definition:
line.h:35
BALL::VIEW::POVRenderer::rotation_
Matrix4x4 rotation_
Definition:
POVRenderer.h:164
BALL::VIEW::POVRenderer::color_map_
ColorMap color_map_
Definition:
POVRenderer.h:169
BALL::VIEW::Stage
Definition:
stage.h:238
BALL::VIEW::POVRenderer::isHumanReadable
bool isHumanReadable() const
Definition:
POVRenderer.h:95
BALL::VIEW::TwoColoredLine
Definition:
twoColoredLine.h:45
Generated by
1.8.17