Loading...
Searching...
No Matches
POVRenderer.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: POVRenderer.h,v 1.12.16.1 2007/03/25 21:26:13 oliver Exp $
//
#ifndef BALL_VIEW_RENDERING_RENDERERS_POVRENDERER_H
#define BALL_VIEW_RENDERING_RENDERERS_POVRENDERER_H
#ifndef BALL_VIEW_RENDERING_RENDERERS_RENDERER_H
# include <BALL/VIEW/RENDERING/RENDERERS/renderer.h>
#endif
#ifndef BALL_SYSTEM_FILE_H
# include <BALL/SYSTEM/file.h>
#endif
#ifndef BALL_MATHS_VECTOR3_H
# include <BALL/MATHS/vector3.h>
#endif
#ifndef BALL_MATHS_MATRIX44_H
# include <BALL/MATHS/matrix44.h>
#endif
namespace BALL
{
namespace VIEW
{
class ColorRGBA;
class ClippingPlane;
class BALL_VIEW_EXPORT POVRenderer : public Renderer
{
public:
BALL_CREATE(POVRenderer)
struct POVRendererClippingPlane
{
public:
Vector3 normal;
float translation;
// Vector3 translation;
};
POVRenderer();
POVRenderer(const String& name);
// Only for Python
POVRenderer(const POVRenderer& renderer);
virtual ~POVRenderer();
virtual void clear();
void setFileName(const String& name);
void setOstream(std::ostream& out_stream);
void setHumanReadable(bool state)
{ human_readable_ = state;}
bool isHumanReadable() const
{ return human_readable_;}
String POVColorRGBA(const ColorRGBA& input);
String POVFinish(const String& object, const ColorRGBA& input);
String POVVector3(Vector3 input);
virtual bool renderOneRepresentation(const Representation& representation);
using Renderer::init;
virtual bool init(const Stage& stage, float width, float height);
virtual bool finish();
void renderSphere_(const Sphere& sphere);
void renderDisc_(const Disc& disc);
void renderTube_(const Tube& tube);
void renderTwoColoredTube_(const TwoColoredTube& tube);
void renderMesh_(const Mesh& mesh);
void renderTwoColoredLine_(const TwoColoredLine& line);
void renderLine_(const Line& line);
void renderPoint_(const Point& point);
// do nothing
void renderLabel_(const Label&);
virtual void renderMultiLine_(const MultiLine& line);
protected:
const ColorRGBA& getColor_(const GeometricObject& object);
std::ostream* outfile_;
String trimFloatValue_(float value);
void storeColor_(const GeometricObject& object);
String getColorIndex_(const ColorRGBA& color);
Vector3 origin_;
Matrix4x4 rotation_;
vector<ClippingPlane*> clipping_planes_;
bool human_readable_;
typedef HashMap<String, Size> ColorMap;
ColorMap color_map_;
vector<const Representation*> representations_;
HashSet<const Mesh*> wireframes_;
HashSet<String> color_strings_;
String font_file_;
double m_[12];
Position color_index_;
};
} // namespace BALL
} // namespace VIEW
#endif // BALL_VIEW_RENDERING_POVRENDERER_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::HashSet
Definition hashSet.h:46
BALL::String
Definition string.h:57
BALL::VIEW::ClippingPlane
Definition clippingPlane.h:26
BALL::VIEW::ColorRGBA
Definition colorRGBA.h:32
BALL::VIEW::Disc
Definition disc.h:32
BALL::VIEW::GeometricObject
Definition geometricObject.h:37
BALL::VIEW::Label
Definition label.h:48
BALL::VIEW::Line
Definition line.h:38
BALL::VIEW::Mesh
Definition mesh.h:42
BALL::VIEW::MultiLine
Definition multiLine.h:33
BALL::VIEW::POVRenderer::isHumanReadable
bool isHumanReadable() const
Definition POVRenderer.h:95
BALL::VIEW::POVRenderer::renderOneRepresentation
virtual bool renderOneRepresentation(const Representation &representation)
BALL::VIEW::POVRenderer::setFileName
void setFileName(const String &name)
BALL::VIEW::POVRenderer::setOstream
void setOstream(std::ostream &out_stream)
Set a stream as output device.
BALL::VIEW::POVRenderer::outfile_
std::ostream * outfile_
Definition POVRenderer.h:158
BALL::VIEW::POVRenderer::renderPoint_
void renderPoint_(const Point &point)
Render a single point.
BALL::VIEW::POVRenderer::renderTwoColoredTube_
void renderTwoColoredTube_(const TwoColoredTube &tube)
Render a tube with two colors.
BALL::VIEW::POVRenderer::finish
virtual bool finish()
BALL::VIEW::POVRenderer::representations_
vector< const Representation * > representations_
Definition POVRenderer.h:170
BALL::VIEW::POVRenderer::POVFinish
String POVFinish(const String &object, const ColorRGBA &input)
BALL::VIEW::POVRenderer::getColorIndex_
String getColorIndex_(const ColorRGBA &color)
BALL::VIEW::POVRenderer::POVRenderer
POVRenderer(const String &name)
BALL::VIEW::POVRenderer::wireframes_
HashSet< const Mesh * > wireframes_
Definition POVRenderer.h:171
BALL::VIEW::POVRenderer::storeColor_
void storeColor_(const GeometricObject &object)
BALL::VIEW::POVRenderer::~POVRenderer
virtual ~POVRenderer()
Destructor.
BALL::VIEW::POVRenderer::renderLabel_
void renderLabel_(const Label &)
BALL::VIEW::POVRenderer::color_strings_
HashSet< String > color_strings_
Definition POVRenderer.h:172
BALL::VIEW::POVRenderer::color_map_
ColorMap color_map_
Definition POVRenderer.h:169
BALL::VIEW::POVRenderer::m_
double m_[12]
Definition POVRenderer.h:174
BALL::VIEW::POVRenderer::renderTube_
void renderTube_(const Tube &tube)
Render a tube.
BALL::VIEW::POVRenderer::renderTwoColoredLine_
void renderTwoColoredLine_(const TwoColoredLine &line)
Render a line with two colors.
BALL::VIEW::POVRenderer::human_readable_
bool human_readable_
Definition POVRenderer.h:166
BALL::VIEW::POVRenderer::POVRenderer
POVRenderer(const POVRenderer &renderer)
BALL::VIEW::POVRenderer::clear
virtual void clear()
Clear method.
BALL::VIEW::POVRenderer::trimFloatValue_
String trimFloatValue_(float value)
BALL::VIEW::POVRenderer::color_index_
Position color_index_
Definition POVRenderer.h:175
BALL::VIEW::POVRenderer::init
virtual bool init(const Stage &stage, float width, float height)
BALL::VIEW::POVRenderer::renderLine_
void renderLine_(const Line &line)
Render a line.
BALL::VIEW::POVRenderer::POVColorRGBA
String POVColorRGBA(const ColorRGBA &input)
BALL::VIEW::POVRenderer::POVVector3
String POVVector3(Vector3 input)
BALL::VIEW::POVRenderer::renderDisc_
void renderDisc_(const Disc &disc)
Render a disc.
BALL::VIEW::POVRenderer::setHumanReadable
void setHumanReadable(bool state)
Definition POVRenderer.h:91
BALL::VIEW::POVRenderer::getColor_
const ColorRGBA & getColor_(const GeometricObject &object)
BALL::VIEW::POVRenderer::clipping_planes_
vector< ClippingPlane * > clipping_planes_
Definition POVRenderer.h:165
BALL::VIEW::POVRenderer::renderMultiLine_
virtual void renderMultiLine_(const MultiLine &line)
Render an illuminated line.
BALL::VIEW::POVRenderer::renderSphere_
void renderSphere_(const Sphere &sphere)
Render a sphere.
BALL::VIEW::POVRenderer::font_file_
String font_file_
Definition POVRenderer.h:173
BALL::VIEW::POVRenderer::origin_
Vector3 origin_
Definition POVRenderer.h:163
BALL::VIEW::POVRenderer::POVRenderer
POVRenderer()
Default constructor.
BALL::VIEW::POVRenderer::rotation_
Matrix4x4 rotation_
Definition POVRenderer.h:164
BALL::VIEW::POVRenderer::renderMesh_
void renderMesh_(const Mesh &mesh)
Render a surface mesh.
BALL::VIEW::POVRenderer::ColorMap
HashMap< String, Size > ColorMap
Definition POVRenderer.h:168
BALL::VIEW::Point
Definition point.h:37
BALL::VIEW::Renderer::init
virtual bool init(Scene &scene)
BALL::VIEW::Renderer::Renderer
Renderer()
BALL::VIEW::Representation
Definition representation.h:59
BALL::VIEW::Sphere
Definition sphere.h:33
BALL::VIEW::Stage
Definition stage.h:239
BALL::VIEW::Tube
Definition tube.h:40
BALL::VIEW::TwoColoredLine
Definition twoColoredLine.h:49
BALL::VIEW::TwoColoredTube
Definition twoColoredTube.h:49
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
file.h
BALL::Matrix4x4
TMatrix4x4< float > Matrix4x4
Definition matrix44.h:2184
matrix44.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
renderer.h
BALL::VIEW::POVRenderer::POVRendererClippingPlane
Definition POVRenderer.h:46
BALL::VIEW::POVRenderer::POVRendererClippingPlane::translation
float translation
Definition POVRenderer.h:49
BALL::VIEW::POVRenderer::POVRendererClippingPlane::normal
Vector3 normal
Definition POVRenderer.h:48
vector3.h