BALL 1.5.0
Loading...
Searching...
No Matches
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
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
26namespace BALL
27{
28 namespace VIEW
29 {
30 class ColorRGBA;
31 class ClippingPlane;
32
40 {
41 public:
42
44
46 {
47 public:
50// Vector3 translation;
51 };
52
56
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
101
104 String POVFinish(const String& object, const ColorRGBA& input);
105
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
137
138 void renderMesh_(const Mesh& mesh);
139
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_;
160 void storeColor_(const GeometricObject& object);
162
165 vector<ClippingPlane*> clipping_planes_;
167
170 vector<const Representation*> representations_;
174 double m_[12];
176 };
177
178 } // namespace BALL
179} // namespace VIEW
180
181#endif // BALL_VIEW_RENDERING_POVRENDERER_H
#define BALL_CREATE(name)
Definition create.h:62
HashMap class based on the STL map (containing serveral convenience functions)
bool isHumanReadable() const
Definition POVRenderer.h:95
virtual bool renderOneRepresentation(const Representation &representation)
void setFileName(const String &name)
void setOstream(std::ostream &out_stream)
Set a stream as output device.
std::ostream * outfile_
void renderPoint_(const Point &point)
Render a single point.
void renderTwoColoredTube_(const TwoColoredTube &tube)
Render a tube with two colors.
virtual bool finish()
vector< const Representation * > representations_
String POVFinish(const String &object, const ColorRGBA &input)
String getColorIndex_(const ColorRGBA &color)
POVRenderer(const String &name)
HashSet< const Mesh * > wireframes_
void storeColor_(const GeometricObject &object)
virtual ~POVRenderer()
Destructor.
void renderLabel_(const Label &)
HashSet< String > color_strings_
void renderTube_(const Tube &tube)
Render a tube.
void renderTwoColoredLine_(const TwoColoredLine &line)
Render a line with two colors.
POVRenderer(const POVRenderer &renderer)
virtual void clear()
Clear method.
String trimFloatValue_(float value)
virtual bool init(const Stage &stage, float width, float height)
void renderLine_(const Line &line)
Render a line.
HashMap< String, Size > ColorMap
String POVColorRGBA(const ColorRGBA &input)
String POVVector3(Vector3 input)
void renderDisc_(const Disc &disc)
Render a disc.
void setHumanReadable(bool state)
Definition POVRenderer.h:91
const ColorRGBA & getColor_(const GeometricObject &object)
vector< ClippingPlane * > clipping_planes_
virtual void renderMultiLine_(const MultiLine &line)
Render an illuminated line.
void renderSphere_(const Sphere &sphere)
Render a sphere.
POVRenderer()
Default constructor.
void renderMesh_(const Mesh &mesh)
Render a surface mesh.
#define BALL_VIEW_EXPORT