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

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

Inheritance diagram for BALL::VIEW::RTfactRenderer:

## Classes

class | RTfactData

## Public Member Functions

| RTfactRenderer ()
| Default Constructor.
virtual | ~RTfactRenderer ()
| Destructor.
virtual bool | hasFPScounter ()
virtual double | getFPS ()
virtual bool | init (Scene &scene)
virtual String | getRenderer ()
virtual void | formatUpdated ()
virtual GeometricObject * | pickObject (Position x, Position y)
virtual void | pickObjects (Position x1, Position y1, Position x2, Position y2, std::list< GeometricObject * > &objects)
virtual void | setSize (float width, float height)
| Set the size of the display.
virtual void | setupStereo (float eye_separation, float focal_length)
virtual void | getFrustum (float &near_f, float &far_f, float &left_f, float &right_f, float &top_f, float &bottom_f)
virtual void | setFrustum (float near_f, float far_f, float left_f, float right_f, float top_f, float bottom_f)
virtual void | prepareBufferedRendering (const Stage &stage)
virtual void | renderToBufferImpl (FrameBufferPtr buffer)
virtual void | useContinuousLoop (bool use_loop)
void | bufferRepresentation (const Representation &rep)
void | bufferRepresentationDynamic (const Representation &rep)
void | removeRepresentation (const Representation &rep)
void | setLights (bool reset_all=false)
| Set the light sources according to the stage.
void | updateCamera (const Camera *camera=0)
void | updateBackgroundColor ()
| Update the background color from the stage.
void | setupEnvironmentMap (const QImage &image)
| Setup an environment map.
void | updateMaterialForRepresentation (Representation const *rep)
void | transformTube (const TwoColoredTube &tube, float *trafo)
void | transformLine (const TwoColoredLine &line, float *trafo)
void | updateMaterialFromStage (RTpieCpp::AppearanceHandle &material)
void | convertMaterial (Stage::Material const &rt_material, RTpieCpp::AppearanceHandle &material)
virtual std::vector< float > | intersectRaysWithGeometry (const std::vector< Vector3 > &origins, const std::vector< Vector3 > &directions)
Public Member Functions inherited from BALL::VIEW::RaytracingRenderer
virtual bool | supports (const PixelFormat &format) const
virtual Resolution | getSupportedResolution (const Resolution &min, const Resolution &max, const PixelFormat &format) const
Public Member Functions inherited from BALL::VIEW::BufferedRenderer
| BufferedRenderer ()
bool | setFrameBufferFormat (const FrameBufferFormat &format)
void | renderToBuffer (RenderTarget *renderTarget, const Stage &stage)
virtual void | setOffset (Size offset)
virtual void | setStride (Size stride)
Public Member Functions inherited from BALL::VIEW::Renderer
| Renderer ()
| Renderer (const Renderer &renderer)
virtual | ~Renderer ()
virtual void | clear ()
virtual bool | init (const Stage &stage, float height, float width)
bool | isContinuous ()
virtual bool | finish ()
virtual Vector3 | mapViewportTo3D (Position x, Position y)
virtual Vector2 | map3DToViewport (const Vector3 &vec)
virtual bool | renderOneRepresentation (const Representation &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 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.

## 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 }
Protected Member Functions inherited from BALL::VIEW::RaytracingRenderer
virtual bool | supports (const FrameBufferFormat &format) const
Protected Member Functions inherited from BALL::VIEW::BufferedRenderer
const FrameBufferFormat & | getFrameBufferFormat () const
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.
Protected Attributes inherited from BALL::VIEW::BufferedRenderer
Size | offset_
Size | stride_
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

RTfactRenderer Provides ray tracing through RTfact-RTRemote

Definition at line 70 of file rtfactRenderer.h.

## Constructor & Destructor Documentation

## RTfactRenderer()

BALL::VIEW::RTfactRenderer::RTfactRenderer | ( |  | ) |

inline

Default Constructor.

Definition at line 110 of file rtfactRenderer.h.

## ~RTfactRenderer()

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

inline virtual

Destructor.

Definition at line 117 of file rtfactRenderer.h.

## Member Function Documentation

## bufferRepresentation()

void BALL::VIEW::RTfactRenderer::bufferRepresentation | ( | const Representation & |  | ) |

virtual

Buffer a Representation for later rendering.

Reimplemented from BALL::VIEW::Renderer.

## bufferRepresentationDynamic()

void BALL::VIEW::RTfactRenderer::bufferRepresentationDynamic | ( | const Representation & | rep | ) |

## convertMaterial()

void BALL::VIEW::RTfactRenderer::convertMaterial | ( | Stage::Material const & | rt_material,
|  | RTpieCpp::AppearanceHandle & | material )

## formatUpdated()

virtual void BALL::VIEW::RTfactRenderer::formatUpdated | ( |  | ) |

inline virtual

This is called once the FrameBufferFormat has been set so the renderer can perform any initialization steps that are needed.

Implements BALL::VIEW::BufferedRenderer.

Definition at line 135 of file rtfactRenderer.h.

## getFPS()

virtual double BALL::VIEW::RTfactRenderer::getFPS | ( |  | ) |

virtual

Internal renderer FPS if available, otherwise returns 0.

Reimplemented from BALL::VIEW::Renderer.

## getFrustum()

virtual void BALL::VIEW::RTfactRenderer::getFrustum | ( | float & | near_f,
|  | float & | far_f,
|  | float & | left_f,
|  | float & | right_f,
|  | float & | top_f,
|  | float & | bottom_f )

virtual

Return the frustum used by this renderer.

Reimplemented from BALL::VIEW::Renderer.

## getRenderer()

virtual String BALL::VIEW::RTfactRenderer::getRenderer | ( |  | ) |

inline virtual

Implements BALL::VIEW::RaytracingRenderer.

Definition at line 130 of file rtfactRenderer.h.

## hasFPScounter()

virtual bool BALL::VIEW::RTfactRenderer::hasFPScounter | ( |  | ) |

virtual

Whether renderer has its own FPS counter.

Reimplemented from BALL::VIEW::Renderer.

## init()

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

virtual

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

Reimplemented from BALL::VIEW::Renderer.

## intersectRaysWithGeometry()

virtual std::vector< float > BALL::VIEW::RTfactRenderer::intersectRaysWithGeometry | ( | const std::vector< Vector3 > & | origins,
|  | const std::vector< Vector3 > & | directions )

virtual

Raytracing-related functionality Intersect a set of rays with the geometry buffered by this renderer.

This function will intersect the rays

origins[i] + l * directions[i]

with the geometry that has been buffered by this renderer previously.

Reimplemented from BALL::VIEW::RaytracingRenderer.

## pickObject()

virtual GeometricObject * BALL::VIEW::RTfactRenderer::pickObject | ( | Position | x,
|  | Position | y )

virtual

## pickObjects()

virtual void BALL::VIEW::RTfactRenderer::pickObjects | ( | Position | x1,
|  | Position | y1,
|  | Position | x2,
|  | Position | y2,
|  | std::list< GeometricObject * > & | objects )

virtual

Pick all objects in the given screen rectangle.

Reimplemented from BALL::VIEW::Renderer.

## prepareBufferedRendering()

virtual void BALL::VIEW::RTfactRenderer::prepareBufferedRendering | ( | const Stage & | stage | ) |

virtual

Prepare for the rendering, taking into account settings in Stage, eg. Camera, Lights, Background colors, etc.

Implements BALL::VIEW::BufferedRenderer.

## removeRepresentation()

void BALL::VIEW::RTfactRenderer::removeRepresentation | ( | const Representation & |  | ) |

virtual

Remove a representation from the buffer.

Reimplemented from BALL::VIEW::Renderer.

## renderToBufferImpl()

virtual void BALL::VIEW::RTfactRenderer::renderToBufferImpl | ( | FrameBufferPtr | buffer | ) |

virtual

Render to the frame buffer.

Precondition
  The frame buffer's format is the one stored in bufferFormat and prepareBufferedRendering() has been called.

Implements BALL::VIEW::BufferedRenderer.

## setFrustum()

virtual void BALL::VIEW::RTfactRenderer::setFrustum | ( | float | near_f,
|  | float | far_f,
|  | float | left_f,
|  | float | right_f,
|  | float | top_f,
|  | float | bottom_f )

virtual

## setLights()

void BALL::VIEW::RTfactRenderer::setLights | ( | bool | reset_all = false | ) |

virtual

Set the light sources according to the stage.

Reimplemented from BALL::VIEW::Renderer.

## setSize()

virtual void BALL::VIEW::RTfactRenderer::setSize | ( | float | width,
|  | float | height )

virtual

Set the size of the display.

Reimplemented from BALL::VIEW::Renderer.

## setupEnvironmentMap()

void BALL::VIEW::RTfactRenderer::setupEnvironmentMap | ( | const QImage & | image | ) |

virtual

Setup an environment map.

Reimplemented from BALL::VIEW::Renderer.

## setupStereo()

virtual void BALL::VIEW::RTfactRenderer::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 from BALL::VIEW::Renderer.

## transformLine()

void BALL::VIEW::RTfactRenderer::transformLine | ( | const TwoColoredLine & | line,
|  | float * | trafo )

## transformTube()

void BALL::VIEW::RTfactRenderer::transformTube | ( | const TwoColoredTube & | tube,
|  | float * | trafo )

## updateBackgroundColor()

void BALL::VIEW::RTfactRenderer::updateBackgroundColor | ( |  | ) |

virtual

Update the background color from the stage.

Reimplemented from BALL::VIEW::Renderer.

## updateCamera()

void BALL::VIEW::RTfactRenderer::updateCamera | ( | const Camera * | camera = 0 | ) |

virtual

Update the camera position either from a given Camera, or from the default Stage.

Reimplemented from BALL::VIEW::Renderer.

## updateMaterialForRepresentation()

void BALL::VIEW::RTfactRenderer::updateMaterialForRepresentation | ( | Representation const * |  | ) |

virtual

Updates the material for the current representation

Implements BALL::VIEW::RaytracingRenderer.

## updateMaterialFromStage()

void BALL::VIEW::RTfactRenderer::updateMaterialFromStage | ( | RTpieCpp::AppearanceHandle & | material | ) |

## useContinuousLoop()

virtual void BALL::VIEW::RTfactRenderer::useContinuousLoop | ( | bool | use_loop | ) |

virtual

Decide between event based and (threaded) continuous loop rendering.

Reimplemented from BALL::VIEW::Renderer.