BALL
1.4.2
|
#include <BALL/VIEW/RENDERING/renderer.h>
Public Member Functions | |
Constructors and Destructors | |
Renderer () | |
Renderer (const Renderer &renderer) | |
virtual | ~Renderer () |
virtual void | clear () |
virtual bool | init (Scene &scene) |
virtual bool | init (const Stage &stage, float height, float width) |
virtual void | setLights (bool reset_all=false) |
Set the light sources according to the stage. More... | |
virtual void | updateCamera (const Camera *camera=0) |
virtual void | updateBackgroundColor () |
Update the background color from the stage. More... | |
virtual void | setupStereo (float eye_separation, float focal_length) |
virtual void | useContinuousLoop (bool use_loop) |
bool | isContinuous () |
virtual bool | finish () |
virtual Vector3 | mapViewportTo3D (Position x, Position y) |
virtual Vector2 | map3DToViewport (const Vector3 &vec) |
Accessors | |
virtual bool | renderOneRepresentation (const Representation &representation) |
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. More... | |
virtual void | setSize (float width, float height) |
Set the size of the display. More... | |
virtual float | getWidth () const |
virtual float | getHeight () const |
virtual void | setPreviewMode (bool show_preview) |
virtual void | showLightSources (bool show_light_sources) |
virtual void | renderRuler () |
Public Member Functions inherited from BALL::Object | |
Object () | |
Default constructor. More... | |
Object (const Object &object) | |
Copy constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
const Object & | operator= (const Object &) |
bool | operator== (const Object &object) const |
bool | operator!= (const Object &object) const |
bool | operator< (const Object &object) const |
bool | operator<= (const Object &object) const |
bool | operator>= (const Object &object) const |
bool | operator> (const Object &object) const |
int | compare (const Object &object) const |
virtual bool | isValid () const |
virtual void | dump (::std::ostream &s=std::cout, Size depth=0) const |
Handle | getHandle () const |
Public Member Functions inherited from BALL::AutoDeletable | |
virtual | ~AutoDeletable () |
void * | operator new (size_t size) |
void | operator delete (void *ptr) |
void * | operator new (size_t size, void *ptr) |
void | operator delete (void *ptr, void *) |
bool | isAutoDeletable () const |
void | setAutoDeletable (bool enable) |
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. More... | |
virtual void | renderClippingPlane_ (const ClippingPlane &) |
virtual void | renderLabel_ (const Label &) |
virtual void | renderLine_ (const Line &) |
Render a line. More... | |
virtual void | renderMultiLine_ (const MultiLine &) |
Render an illuminated line. More... | |
virtual void | renderMesh_ (const Mesh &) |
Render a surface mesh. More... | |
virtual void | renderPoint_ (const Point &) |
Render a single point. More... | |
virtual void | renderBox_ (const Box &) |
Render a box. More... | |
virtual void | renderSimpleBox_ (const SimpleBox &) |
Render a simple box (parallel to the axes) More... | |
virtual void | renderSphere_ (const Sphere &) |
Render a sphere. More... | |
virtual void | renderDisc_ (const Disc &) |
Render a disc. More... | |
virtual void | renderTube_ (const Tube &) |
Render a tube. More... | |
virtual void | renderTwoColoredLine_ (const TwoColoredLine &) |
Render a line with two colors. More... | |
virtual void | renderTwoColoredTube_ (const TwoColoredTube &) |
Render a tube with two colors. More... | |
virtual void | renderGridVisualisation_ (const GridVisualisation &) |
Render a grid. More... | |
virtual void | renderQuadMesh_ (const QuadMesh &) |
Render a quad mesh. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from BALL::Object | |
static Handle | getNextHandle () |
static Handle | getNewHandle () |
Static Public Member Functions inherited from BALL::AutoDeletable | |
static void | clearLastPtr () |
Protected Member Functions inherited from BALL::AutoDeletable | |
AutoDeletable () | |
AutoDeletable (const AutoDeletable &auto_deletable, bool deep=false) | |
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.
Definition at line 53 of file renderer.h.
BALL::VIEW::Renderer::Renderer | ( | ) |
Default Constructor.
BALL::VIEW::Renderer::Renderer | ( | const Renderer & | renderer | ) |
Copy constructor.
|
inlinevirtual |
Destructor
Definition at line 74 of file renderer.h.
|
inlinevirtual |
Buffer a Representation for later rendering.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::TilingRenderer.
Definition at line 144 of file renderer.h.
|
inlinevirtual |
Explicit default initialization.
Reimplemented from BALL::Object.
Reimplemented in BALL::VIEW::GLRenderer, BALL::VIEW::POVRenderer, BALL::VIEW::VRMLRenderer, and BALL::VIEW::STLRenderer.
Definition at line 78 of file renderer.h.
|
virtual |
Reimplemented in BALL::VIEW::POVRenderer, BALL::VIEW::VRMLRenderer, BALL::VIEW::STLRenderer, and BALL::VIEW::TilingRenderer.
|
inlinevirtual |
Definition at line 170 of file renderer.h.
|
inlinevirtual |
Get the stage for the renderer (const)
Definition at line 152 of file renderer.h.
|
inlinevirtual |
Definition at line 167 of file renderer.h.
Initialization routines. This method is called by Scene::initializeGL.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::POVRenderer.
Initialisation with the Stage. Called by Scene::exportScene().
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::POVRenderer.
|
inline |
Returns the mode of the render loop.
Definition at line 117 of file renderer.h.
Compute the 2D position on the screen corresponding to the 3D point vec
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::TilingRenderer.
Compute the 3D position on the view plane corresponding to point (x,y) on the view port
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::TilingRenderer.
Definition at line 199 of file renderer.h.
|
inlinevirtual |
Remove a representation from the buffer.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::TilingRenderer.
Definition at line 148 of file renderer.h.
|
virtual |
Wrapper for the renderering of special GeometricObjects.
Reimplemented in BALL::VIEW::TilingRenderer.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Reimplemented in BALL::VIEW::GLRenderer.
Definition at line 208 of file renderer.h.
|
inlineprotectedvirtual |
Render a disc.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::POVRenderer.
Definition at line 244 of file renderer.h.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::POVRenderer.
Definition at line 212 of file renderer.h.
|
inlineprotectedvirtual |
Render a line.
Reimplemented in BALL::VIEW::GLRenderer, BALL::VIEW::POVRenderer, BALL::VIEW::VRMLRenderer, and BALL::VIEW::STLRenderer.
Definition at line 216 of file renderer.h.
|
inlineprotectedvirtual |
Render a surface mesh.
Reimplemented in BALL::VIEW::GLRenderer, BALL::VIEW::POVRenderer, BALL::VIEW::VRMLRenderer, and BALL::VIEW::STLRenderer.
Definition at line 224 of file renderer.h.
|
inlineprotectedvirtual |
Render an illuminated line.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::POVRenderer.
Definition at line 220 of file renderer.h.
|
virtual |
Render a Representation.
Reimplemented in BALL::VIEW::POVRenderer, and BALL::VIEW::TilingRenderer.
|
inlineprotectedvirtual |
Render a single point.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::POVRenderer.
Definition at line 228 of file renderer.h.
|
inlineprotectedvirtual |
Render a quad mesh.
Reimplemented in BALL::VIEW::GLRenderer.
Definition at line 263 of file renderer.h.
|
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.
|
inlineprotectedvirtual |
Render a simple box (parallel to the axes)
Reimplemented in BALL::VIEW::GLRenderer.
Definition at line 236 of file renderer.h.
|
inlineprotectedvirtual |
Render a sphere.
Reimplemented in BALL::VIEW::GLRenderer, BALL::VIEW::POVRenderer, BALL::VIEW::VRMLRenderer, and BALL::VIEW::STLRenderer.
Definition at line 240 of file renderer.h.
|
inlineprotectedvirtual |
Render a tube.
Reimplemented in BALL::VIEW::GLRenderer, BALL::VIEW::POVRenderer, BALL::VIEW::VRMLRenderer, and BALL::VIEW::STLRenderer.
Definition at line 248 of file renderer.h.
|
inlineprotectedvirtual |
Render a line with two colors.
Reimplemented in BALL::VIEW::GLRenderer, BALL::VIEW::POVRenderer, BALL::VIEW::VRMLRenderer, and BALL::VIEW::STLRenderer.
Definition at line 252 of file renderer.h.
|
inlineprotectedvirtual |
Render a tube with two colors.
Reimplemented in BALL::VIEW::GLRenderer, BALL::VIEW::POVRenderer, BALL::VIEW::VRMLRenderer, and BALL::VIEW::STLRenderer.
Definition at line 256 of file renderer.h.
|
virtual |
Set the light sources according to the stage.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::TilingRenderer.
|
inlinevirtual |
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.
Definition at line 176 of file renderer.h.
Set the size of the display.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::TilingRenderer.
Definition at line 164 of file renderer.h.
|
inlinevirtual |
Set the stage for the renderer
Definition at line 157 of file renderer.h.
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.
|
inlinevirtual |
Decides whether to draw light sources explicitly. Please note that not all renderers support this feature and may choose just to ignore this setting.
Definition at line 182 of file renderer.h.
|
virtual |
Update the background color from the stage.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::TilingRenderer.
|
virtual |
Update the camera position either from a given Camera, or from the default Stage.
Reimplemented in BALL::VIEW::GLRenderer, and BALL::VIEW::TilingRenderer.
|
inlinevirtual |
Decide between event based and (threaded) continuous loop rendering.
Definition at line 109 of file renderer.h.
|
protected |
Definition at line 289 of file renderer.h.
|
protected |
Definition at line 292 of file renderer.h.
|
protected |
Definition at line 277 of file renderer.h.
|
protected |
Definition at line 268 of file renderer.h.
|
protected |
Definition at line 286 of file renderer.h.
|
protected |
Definition at line 280 of file renderer.h.
|
protected |
Definition at line 271 of file renderer.h.
|
protected |
Definition at line 294 of file renderer.h.
|
protected |
Definition at line 283 of file renderer.h.
|
protected |
Definition at line 274 of file renderer.h.