BALL::VIEW::Renderer Class Reference
[Renderer]

Renderer is just a generic base class. More...

#include <renderer.h>

Inheritance diagram for BALL::VIEW::Renderer:
Inheritance graph
[legend]

List of all members.


Public Member Functions

Constructors and Destructors
Renderer ()
Default Constructor.
Renderer (const Renderer &renderer)
Copy constructor.
virtual ~Renderer ()
Destructor.
virtual void clear ()
Explicit default initialization.
virtual bool init (Scene &scene)
Initialization routines.
virtual bool init (const Stage &stage, float height, float width)
Initialisation with the Stage.
virtual void setLights (bool reset_all=false)
Set the light sources according to the stage.
virtual void updateCamera (const Camera *camera=0)
Update the camera position either from a given Camera, or from the default Stage.
virtual void updateBackgroundColor ()
Update the background color from the stage.
virtual void setupStereo (float eye_separation, float focal_length)
Sets this renderer as a part of a stereo setup.
virtual void useContinuousLoop (bool use_loop)
Decide between event based and (threaded) continuous loop rendering.
bool isContinuous ()
Returns the mode of the render loop.
virtual bool finish ()
virtual Vector3 mapViewportTo3D (Position x, Position y)
Compute the 3D position on the view plane corresponding to point (x,y) on the view port.
virtual Vector2 map3DToViewport (const Vector3 &vec)
Compute the 2D position on the screen corresponding to the 3D point vec.
Accessors
virtual bool renderOneRepresentation (const Representation &representation)
Render a Representation.
virtual void bufferRepresentation (const Representation &)
Buffer a Representation for later rendering.
virtual void removeRepresentation (const Representation &)
Remove a representation from the buffer.
virtual const Stage & getStage () const
Get the stage for the renderer (const).
virtual void setStage (const Stage &stage)
Set the stage for the renderer.
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)
Decides whether the renderer should use a faster preview mode.
virtual void showLightSources (bool show_light_sources)
Decides whether to draw light sources explicitly.
virtual void renderRuler ()
Render a ruler.

Protected Attributes

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_

Predicates

bool operator== (const Renderer &) const
virtual void render_ (const GeometricObject *object)
Wrapper for the renderering of special GeometricObjects.
virtual void renderClippingPlane_ (const ClippingPlane &)
virtual void renderLabel_ (const Label &)
virtual void renderLine_ (const Line &)
Render a line.
virtual void renderMultiLine_ (const MultiLine &)
Render an illuminated line.
virtual void renderMesh_ (const Mesh &)
Render a surface mesh.
virtual void renderPoint_ (const Point &)
Render a single point.
virtual void renderBox_ (const Box &)
Render a box.
virtual void renderSimpleBox_ (const SimpleBox &)
Render a simple box (parallel to the axes).
virtual void renderSphere_ (const Sphere &)
Render a sphere.
virtual void renderDisc_ (const Disc &)
Render a disc.
virtual void renderTube_ (const Tube &)
Render a tube.
virtual void renderTwoColoredLine_ (const TwoColoredLine &)
Render a line with two colors.
virtual void renderTwoColoredTube_ (const TwoColoredTube &)
Render a tube with two colors.
virtual void renderGridVisualisation_ (const GridVisualisation &)
Render a grid.
virtual void renderQuadMesh_ (const QuadMesh &)
Render a quad mesh.

Detailed Description

Renderer is just a generic base class.

Derived classes are GLRenderer and POVRenderer. Every renderer has a pointer to a Stage object, which contains the viewpoint, the LightSource, etc. The renderer also knows the width and height, of the display, it shall render.


Member Function Documentation

virtual bool BALL::VIEW::Renderer::init ( const Stage & stage,
float height,
float width
) [virtual]

Initialisation with the Stage.

Called by Scene::exportScene().

Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::POVRenderer.

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

Initialization routines.

This method is called by Scene::initializeGL.

Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::POVRenderer.

virtual void BALL::VIEW::Renderer::renderRuler ( ) [virtual]

Render a ruler.

If supported by the renderer implementation, this function will produce a simple ruler that is rendered together with the other representations. The main use of this function is in the edit mode, where it can help to straighten-up structures and to correctly estimate angles and distances.

Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::TilingRenderer.

virtual void BALL::VIEW::Renderer::setPreviewMode ( bool show_preview ) [virtual]

Decides whether the renderer should use a faster preview mode.

Please note that not all renderers support previews and may choose just to ignore this setting.

virtual void BALL::VIEW::Renderer::setupStereo ( float eye_separation,
float focal_length
) [virtual]

Sets this renderer as a part of a stereo setup.

eye_separation denotes the distance along the right vector used by this "eye".

Reimplemented in BALL::VIEW::GLRenderer.

virtual void BALL::VIEW::Renderer::showLightSources ( bool show_light_sources ) [virtual]

Decides whether to draw light sources explicitly.

Please note that not all renderers support this feature and may choose just to ignore this setting.


Generated on Thu Aug 6 18:30:59 2009 for BALL by doxygen 1.5.8