Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

VIEW::POVRenderer Class Reference
[Renderer]

POVRenderer class. More...

#include <POVRenderer.h>

Inheritance diagram for VIEW::POVRenderer:

VIEW::Renderer Object AutoDeletable List of all members.

Public Member Functions

Constructors and Destructors.
 POVRenderer () throw ()
 Default constructor.
 POVRenderer (const String &name) throw (Exception::FileNotFound)
 Detailed constructor.
 POVRenderer (const POVRenderer &renderer) throw ()
virtual ~POVRenderer () throw ()
 Destructor.
virtual void clear () throw ()
 Clear method.
Accessors
void setFileName (const String &name) throw (Exception::FileNotFound)
 Sets the name of the file we will create.
void setOstream (std::ostream &out_stream)
 Set a stream as output device.
void setHumanReadable (bool state) throw ()
bool isHumanReadable () const throw ()
String POVColorRGBA (const ColorRGBA &input) throw ()
 Converts a ColorRGBA into a String in POVRay format.
String POVFinish (const String &object, const ColorRGBA &input) throw ()
 Returns the corresponding BALLFinish declaration.
String POVVector3 (Vector3 input) throw ()
 Converts a Vector3 into a String in POVRay format.
virtual bool render (const Representation &representation) throw ()
 Render a Representation.
Processor specific methods
virtual bool init (const Stage &stage, float width, float height) throw ()
 Start method.
virtual bool finish () throw ()
 Finish method.
void renderSphere_ (const Sphere &sphere) throw ()
 Render a sphere.
void renderDisc_ (const Disc &disc) throw ()
 Render a disc.
void renderTube_ (const Tube &tube) throw ()
 Render a tube.
void renderTwoColoredTube_ (const TwoColoredTube &tube) throw ()
 Render a tube with two colors.
void renderMesh_ (const Mesh &mesh) throw ()
 Render a surface mesh.
void renderTwoColoredLine_ (const TwoColoredLine &line) throw ()
 Render a line with two colors.
void renderLine_ (const Line &line) throw ()
 Render a line.
void renderPoint_ (const Point &point) throw ()
 Render a single point.
void renderLabel_ (const Label &) throw ()
virtual void renderMultiLine_ (const MultiLine &line) throw ()
 Render an illuminated line.

Protected Types

typedef HashMap< String, SizeColorMap

Protected Member Functions

const ColorRGBAgetColor_ (const GeometricObject &object)
String trimFloatValue_ (float value)
void storeColor_ (const GeometricObject &object)
String getColorIndex_ (const ColorRGBA &color)

Protected Attributes

std::ostream * outfile_
Vector3 origin_
Matrix4x4 rotation_
vector< ClippingPlane * > clipping_planes_
bool human_readable_
ColorMap color_map_
vector< const Representation * > representations_
HashSet< const Mesh * > wireframes_
HashSet< Stringcolor_strings_
String font_file_
double m_ [12]

Detailed Description

POVRenderer class.

This class walks over all the geometric primitives in a Scene and exports them into a data file in the POVRay 1.5 format, which can be used to render the same scene externally.


Constructor & Destructor Documentation

VIEW::POVRenderer::POVRenderer const String name  )  throw (Exception::FileNotFound)
 

Detailed constructor.

Parameters:
name The name of the file we will create


Member Function Documentation

virtual bool VIEW::POVRenderer::finish  )  throw () [virtual]
 

Finish method.

This method writes the ending of the file and closes it.

Reimplemented from VIEW::Renderer.

virtual bool VIEW::POVRenderer::init const Stage stage,
float  width,
float  height
throw () [virtual]
 

Start method.

This method creates the file and writes the header.

Reimplemented from VIEW::Renderer.

String VIEW::POVRenderer::POVColorRGBA const ColorRGBA input  )  throw ()
 

Converts a ColorRGBA into a String in POVRay format.

String VIEW::POVRenderer::POVVector3 Vector3  input  )  throw ()
 

Converts a Vector3 into a String in POVRay format.

virtual bool VIEW::POVRenderer::render const Representation representation  )  throw () [virtual]
 

Render a Representation.

Reimplemented from VIEW::Renderer.

void VIEW::POVRenderer::setFileName const String name  )  throw (Exception::FileNotFound)
 

Sets the name of the file we will create.

Parameters:
name The file name