Loading...
Searching...
No Matches
BALL::VIEW::POVRenderer Class Reference
Visualisation » Renderer

`#include <BALL/VIEW/RENDERING/RENDERERS/POVRenderer.h>`

Inheritance diagram for BALL::VIEW::POVRenderer:

## Classes

struct | POVRendererClippingPlane

## Public Member Functions

Constructors and Destructors.
| POVRenderer ()
| Default constructor.
| POVRenderer (const String &name)
| POVRenderer (const POVRenderer &renderer)
virtual | ~POVRenderer ()
| Destructor.
virtual void | clear ()
| Clear method.
Accessors
void | setFileName (const String &name)
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)
Public Member Functions inherited from BALL::VIEW::Renderer
| Renderer ()
| Renderer (const Renderer &renderer)
virtual | ~Renderer ()
virtual void | setLights (bool reset_all=false)
| Set the light sources according to the stage.
virtual void | updateCamera (const Camera *camera=0)
virtual void | updateMaterialForRepresentation (Representation const *)
virtual void | updateBackgroundColor ()
| Update the background color from the stage.
virtual void | setupEnvironmentMap (const QImage &image)
| Setup an environment map.
virtual void | setupStereo (float eye_separation, float focal_length)
virtual void | useContinuousLoop (bool use_loop)
bool | isContinuous ()
virtual bool | hasFPScounter ()
virtual double | getFPS ()
virtual Vector3 | mapViewportTo3D (Position x, Position y)
virtual Vector2 | map3DToViewport (const Vector3 &vec)
virtual void | pickObjects (Position x1, Position y1, Position x2, Position y2, std::list< GeometricObject * > &objects)
virtual void | getFrustum (float &near_f, float &far_f, float &left_f, float &right_f, float &top_f, float &bottom_f)
virtual void | bufferRepresentation (const Representation &)
virtual void | removeRepresentation (const Representation &)
virtual const Stage & | getStage () const
virtual void | setStage (const Stage &stage)
bool | hasStage () const
| Test if a Stage was assigned to the Renderer.
virtual void | setSize (float width, float height)
| Set the size of the display.
virtual float | getWidth () const
virtual float | getHeight () const
virtual void | setPreviewMode (bool show_preview)
virtual void | showLightSources (bool show_light_sources)
virtual void | renderRuler ()
virtual void | setStereoMode (StereoMode state)
virtual StereoMode | getStereoMode () const
virtual void | setStereoFrustumConversion (int width_factor, int height_factor)
bool | operator== (const Renderer &) const
virtual void | render_ (const GeometricObject *object)
| Wrapper for the renderering of special GeometricObjects.

## Processor specific methods

typedef HashMap< String, Size > | ColorMap
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_
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.
virtual bool | init (Scene &scene)
const ColorRGBA & | getColor_ (const GeometricObject &object)
String | trimFloatValue_ (float value)
void | storeColor_ (const GeometricObject &object)
String | getColorIndex_ (const ColorRGBA &color)

## Additional Inherited Members

Public Types inherited from BALL::VIEW::Renderer
enum | StereoMode { NO_STEREO = 0 , ACTIVE_STEREO , DUAL_VIEW_STEREO , DUAL_VIEW_DIFFERENT_DISPLAY_STEREO , TOP_BOTTOM_STEREO , INTERLACED_STEREO }
virtual void | renderClippingPlane_ (const ClippingPlane &)
virtual void | renderBox_ (const Box &)
| Render a box.
virtual void | renderSimpleBox_ (const SimpleBox &)
| Render a simple box (parallel to the axes).
virtual void | renderGridVisualisation_ (const GridVisualisation &)
| Render a grid.
virtual void | renderQuadMesh_ (const QuadMesh &)
| Render a quad mesh.
Scene * | scene_
const Stage * | stage_
float | width_
float | height_
bool | show_preview_
float | volume_width_
bool | show_light_sources_
Camera | camera_
Vector3 | camera_offset_
bool | use_continuous_loop_
Size | stereo_frustum_conversion_width_
Size | stereo_frustum_conversion_height_
StereoMode | stereo_

## 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.

Definition at line 39 of file POVRenderer.h.

## Member Typedef Documentation

## ColorMap

typedef HashMap<String, Size> BALL::VIEW::POVRenderer::ColorMap

protected

Definition at line 168 of file POVRenderer.h.

## Constructor & Destructor Documentation

## POVRenderer() [1/3]

BALL::VIEW::POVRenderer::POVRenderer | ( |  | ) |

Default constructor.

## POVRenderer() [2/3]

BALL::VIEW::POVRenderer::POVRenderer | ( | const String & | name | ) |

Detailed constructor.

Parameters

  name | The name of the file we will create

Exceptions

  BALL::Exception::FileNotFound |

## POVRenderer() [3/3]

BALL::VIEW::POVRenderer::POVRenderer | ( | const POVRenderer & | renderer | ) |

## ~POVRenderer()

virtual BALL::VIEW::POVRenderer::~POVRenderer | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## clear()

virtual void BALL::VIEW::POVRenderer::clear | ( |  | ) |

virtual

Clear method.

Reimplemented from BALL::VIEW::Renderer.

## finish()

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.

## getColor_()

const ColorRGBA & BALL::VIEW::POVRenderer::getColor_ | ( | const GeometricObject & | object | ) |

protected

## getColorIndex_()

String BALL::VIEW::POVRenderer::getColorIndex_ | ( | const ColorRGBA & | color | ) |

protected

## init() [1/2]

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.

## init() [2/2]

virtual bool BALL::VIEW::Renderer::init | ( | Scene & | scene | ) |

virtual

Initialization routines. This method is called by Scene::initializeGL.

Reimplemented from BALL::VIEW::Renderer.

## isHumanReadable()

bool BALL::VIEW::POVRenderer::isHumanReadable | ( |  | ) | const

inline

Definition at line 95 of file POVRenderer.h.

## POVColorRGBA()

String BALL::VIEW::POVRenderer::POVColorRGBA | ( | const ColorRGBA & | input | ) |

Converts a ColorRGBA into a String in POVRay format.

## POVFinish()

String BALL::VIEW::POVRenderer::POVFinish | ( | const String & | object,
|  | const ColorRGBA & | input )

Returns the corresponding BALLFinish declaration

## POVVector3()

String BALL::VIEW::POVRenderer::POVVector3 | ( | Vector3 | input | ) |

Converts a Vector3 into a String in POVRay format.

## renderDisc_()

void BALL::VIEW::POVRenderer::renderDisc_ | ( | const Disc & |  | ) |

virtual

Render a disc.

Reimplemented from BALL::VIEW::Renderer.

## renderLabel_()

void BALL::VIEW::POVRenderer::renderLabel_ | ( | const Label & |  | ) |

virtual

Reimplemented from BALL::VIEW::Renderer.

## renderLine_()

void BALL::VIEW::POVRenderer::renderLine_ | ( | const Line & |  | ) |

virtual

Render a line.

Reimplemented from BALL::VIEW::Renderer.

## renderMesh_()

void BALL::VIEW::POVRenderer::renderMesh_ | ( | const Mesh & |  | ) |

virtual

Render a surface mesh.

Reimplemented from BALL::VIEW::Renderer.

## renderMultiLine_()

virtual void BALL::VIEW::POVRenderer::renderMultiLine_ | ( | const MultiLine & | line | ) |

virtual

Render an illuminated line.

Reimplemented from BALL::VIEW::Renderer.

## renderOneRepresentation()

virtual bool BALL::VIEW::POVRenderer::renderOneRepresentation | ( | const Representation & | representation | ) |

virtual

Render a Representation.

Reimplemented from BALL::VIEW::Renderer.

## renderPoint_()

void BALL::VIEW::POVRenderer::renderPoint_ | ( | const Point & |  | ) |

virtual

Render a single point.

Reimplemented from BALL::VIEW::Renderer.

## renderSphere_()

void BALL::VIEW::POVRenderer::renderSphere_ | ( | const Sphere & |  | ) |

virtual

Render a sphere.

Reimplemented from BALL::VIEW::Renderer.

## renderTube_()

void BALL::VIEW::POVRenderer::renderTube_ | ( | const Tube & |  | ) |

virtual

Render a tube.

Reimplemented from BALL::VIEW::Renderer.

## renderTwoColoredLine_()

void BALL::VIEW::POVRenderer::renderTwoColoredLine_ | ( | const TwoColoredLine & |  | ) |

virtual

Render a line with two colors.

Reimplemented from BALL::VIEW::Renderer.

## renderTwoColoredTube_()

void BALL::VIEW::POVRenderer::renderTwoColoredTube_ | ( | const TwoColoredTube & |  | ) |

virtual

Render a tube with two colors.

Reimplemented from BALL::VIEW::Renderer.

## setFileName()

void BALL::VIEW::POVRenderer::setFileName | ( | const String & | name | ) |

Sets the name of the file we will create.

Parameters

  name | The file name

Exceptions

  BALL::Exception::FileNotFound |

## setHumanReadable()

void BALL::VIEW::POVRenderer::setHumanReadable | ( | bool | state | ) |

inline

Definition at line 91 of file POVRenderer.h.

## setOstream()

void BALL::VIEW::POVRenderer::setOstream | ( | std::ostream & | out_stream | ) |

Set a stream as output device.

## storeColor_()

void BALL::VIEW::POVRenderer::storeColor_ | ( | const GeometricObject & | object | ) |

protected

## trimFloatValue_()

String BALL::VIEW::POVRenderer::trimFloatValue_ | ( | float | value | ) |

protected

## Member Data Documentation

## clipping_planes_

vector<ClippingPlane*> BALL::VIEW::POVRenderer::clipping_planes_

protected

Definition at line 165 of file POVRenderer.h.

## color_index_

Position BALL::VIEW::POVRenderer::color_index_

protected

Definition at line 175 of file POVRenderer.h.

## color_map_

ColorMap BALL::VIEW::POVRenderer::color_map_

protected

Definition at line 169 of file POVRenderer.h.

## color_strings_

HashSet<String> BALL::VIEW::POVRenderer::color_strings_

protected

Definition at line 172 of file POVRenderer.h.

## font_file_

String BALL::VIEW::POVRenderer::font_file_

protected

Definition at line 173 of file POVRenderer.h.

## human_readable_

bool BALL::VIEW::POVRenderer::human_readable_

protected

Definition at line 166 of file POVRenderer.h.

## m_

double BALL::VIEW::POVRenderer::m_[12]

protected

Definition at line 174 of file POVRenderer.h.

## origin_

Vector3 BALL::VIEW::POVRenderer::origin_

protected

Definition at line 163 of file POVRenderer.h.

## outfile_

std::ostream* BALL::VIEW::POVRenderer::outfile_

protected

Definition at line 158 of file POVRenderer.h.

## representations_

vector<const Representation*> BALL::VIEW::POVRenderer::representations_

protected

Definition at line 170 of file POVRenderer.h.

## rotation_

Matrix4x4 BALL::VIEW::POVRenderer::rotation_

protected

Definition at line 164 of file POVRenderer.h.

## wireframes_

HashSet<const Mesh*> BALL::VIEW::POVRenderer::wireframes_

protected

Definition at line 171 of file POVRenderer.h.