#include <BALL/VIEW/RENDERING/POVRenderer.h>
Classes | |
struct | POVRendererClippingPlane |
Public Member Functions | |
Constructors and Destructors. | |
POVRenderer () | |
Default constructor. | |
POVRenderer (const String &name) throw (Exception::FileNotFound) | |
POVRenderer (const POVRenderer &renderer) | |
virtual | ~POVRenderer () |
Destructor. | |
virtual void | clear () |
Clear method. | |
Accessors | |
void | setFileName (const String &name) throw (Exception::FileNotFound) |
void | setOstream (std::ostream &out_stream) |
Set a stream as output device. | |
void | setHumanReadable (bool state) |
bool | isHumanReadable () const |
String | POVColorRGBA (const ColorRGBA &input) |
String | POVFinish (const String &object, const ColorRGBA &input) |
String | POVVector3 (Vector3 input) |
virtual bool | renderOneRepresentation (const Representation &representation) |
Processor specific methods | |
virtual bool | init (Scene &scene) |
virtual bool | init (const Stage &stage, float width, float height) |
virtual bool | finish () |
void | renderSphere_ (const Sphere &sphere) |
Render a sphere. | |
void | renderDisc_ (const Disc &disc) |
Render a disc. | |
void | renderTube_ (const Tube &tube) |
Render a tube. | |
void | renderTwoColoredTube_ (const TwoColoredTube &tube) |
Render a tube with two colors. | |
void | renderMesh_ (const Mesh &mesh) |
Render a surface mesh. | |
void | renderTwoColoredLine_ (const TwoColoredLine &line) |
Render a line with two colors. | |
void | renderLine_ (const Line &line) |
Render a line. | |
void | renderPoint_ (const Point &point) |
Render a single point. | |
void | renderLabel_ (const Label &) |
virtual void | renderMultiLine_ (const MultiLine &line) |
Render an illuminated line. | |
Protected Types | |
typedef HashMap< String, Size > | ColorMap |
Protected Member Functions | |
const ColorRGBA & | getColor_ (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< String > | color_strings_ |
String | font_file_ |
double | m_ [12] |
Position | color_index_ |
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.
typedef HashMap<String, Size> BALL::VIEW::POVRenderer::ColorMap [protected] |
BALL::VIEW::POVRenderer::POVRenderer | ( | ) |
Default constructor.
BALL::VIEW::POVRenderer::POVRenderer | ( | const String & | name | ) | throw (Exception::FileNotFound) |
Detailed constructor.
name | The name of the file we will create |
BALL::VIEW::POVRenderer::POVRenderer | ( | const POVRenderer & | renderer | ) |
virtual BALL::VIEW::POVRenderer::~POVRenderer | ( | ) | [virtual] |
Destructor.
virtual void BALL::VIEW::POVRenderer::clear | ( | ) | [virtual] |
Clear method.
Reimplemented from BALL::VIEW::Renderer.
virtual bool BALL::VIEW::POVRenderer::finish | ( | ) | [virtual] |
Finish method. This method writes the ending of the file and closes it.
Reimplemented from BALL::VIEW::Renderer.
const ColorRGBA& BALL::VIEW::POVRenderer::getColor_ | ( | const GeometricObject & | object | ) | [protected] |
virtual bool BALL::VIEW::POVRenderer::init | ( | const Stage & | stage, | |
float | width, | |||
float | height | |||
) | [virtual] |
Start method. This method creates the file and writes the header.
Reimplemented from BALL::VIEW::Renderer.
Initialization routine.
Reimplemented from BALL::VIEW::Renderer.
bool BALL::VIEW::POVRenderer::isHumanReadable | ( | ) | const [inline] |
Returns the corresponding BALLFinish declaration
Converts a Vector3 into a String in POVRay format.
void BALL::VIEW::POVRenderer::renderDisc_ | ( | const Disc & | ) | [virtual] |
Render a disc.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::POVRenderer::renderLabel_ | ( | const Label & | ) | [virtual] |
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::POVRenderer::renderLine_ | ( | const Line & | ) | [virtual] |
Render a line.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::POVRenderer::renderMesh_ | ( | const Mesh & | ) | [virtual] |
Render a surface mesh.
Reimplemented from BALL::VIEW::Renderer.
virtual void BALL::VIEW::POVRenderer::renderMultiLine_ | ( | const MultiLine & | line | ) | [virtual] |
Render an illuminated line.
Reimplemented from BALL::VIEW::Renderer.
virtual bool BALL::VIEW::POVRenderer::renderOneRepresentation | ( | const Representation & | representation | ) | [virtual] |
Render a Representation.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::POVRenderer::renderPoint_ | ( | const Point & | ) | [virtual] |
Render a single point.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::POVRenderer::renderSphere_ | ( | const Sphere & | ) | [virtual] |
Render a sphere.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::POVRenderer::renderTube_ | ( | const Tube & | ) | [virtual] |
Render a tube.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::POVRenderer::renderTwoColoredLine_ | ( | const TwoColoredLine & | ) | [virtual] |
Render a line with two colors.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::POVRenderer::renderTwoColoredTube_ | ( | const TwoColoredTube & | ) | [virtual] |
Render a tube with two colors.
Reimplemented from BALL::VIEW::Renderer.
void BALL::VIEW::POVRenderer::setFileName | ( | const String & | name | ) | throw (Exception::FileNotFound) |
Sets the name of the file we will create.
name | The file name |
void BALL::VIEW::POVRenderer::setHumanReadable | ( | bool | state | ) | [inline] |
void BALL::VIEW::POVRenderer::setOstream | ( | std::ostream & | out_stream | ) |
Set a stream as output device.
void BALL::VIEW::POVRenderer::storeColor_ | ( | const GeometricObject & | object | ) | [protected] |
vector<ClippingPlane*> BALL::VIEW::POVRenderer::clipping_planes_ [protected] |
Position BALL::VIEW::POVRenderer::color_index_ [protected] |
ColorMap BALL::VIEW::POVRenderer::color_map_ [protected] |
HashSet<String> BALL::VIEW::POVRenderer::color_strings_ [protected] |
String BALL::VIEW::POVRenderer::font_file_ [protected] |
bool BALL::VIEW::POVRenderer::human_readable_ [protected] |
double BALL::VIEW::POVRenderer::m_[12] [protected] |
Vector3 BALL::VIEW::POVRenderer::origin_ [protected] |
std::ostream* BALL::VIEW::POVRenderer::outfile_ [protected] |
vector<const Representation*> BALL::VIEW::POVRenderer::representations_ [protected] |
Matrix4x4 BALL::VIEW::POVRenderer::rotation_ [protected] |
HashSet<const Mesh*> BALL::VIEW::POVRenderer::wireframes_ [protected] |