VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Protected Attributes
makVrv::DtRenderer Class Referenceabstract

The DtRenderer is the component responsible for rendering 3D images onto the screen. More...

Inheritance diagram for makVrv::DtRenderer:
Inheritance graph
[legend]

Public Types

typedef boost::unordered_map
< DtElementID, double
DtRenderMap
 Type definition of an unordered map that maps the element ids of objects recently rendered to the last simulation time at which they were rendered. More...
 

Public Member Functions

 DtRenderer (DtDe &de)
 CTOR. More...
 
virtual ~DtRenderer ()
 DTOR. More...
 
virtual void update ()
 Abstract update. More...
 
virtual void postUpdate ()
 Called after tick; time to update observers. More...
 
DtObserverObjectManagerobserverObjectManager ()
 Get the observer object manager. More...
 
DtTickableManagerInterfacetickableManager ()
 Get the scene manager's attachable scene object manager. More...
 
const DtTickableManagerInterfacetickableManager () const
 
DtOverlayManageroverlayManager ()
 Get the manager's over the 2D overlays. More...
 
const DtOverlayManageroverlayManager () const
 
virtual bool exportTerrainAndProps (const std::string &)=0
 Saves terrain geometry and props to specified file. More...
 
virtual void render ()=0
 Abstract render. More...
 
virtual void resetSceneGraph ()=0
 Removes all nodes from the scene graph. More...
 
virtual void setWireframeRendering (bool enabled)=0
 Turn wireframe mode on/off. More...
 
virtual bool wireframeRendering () const =0
 Get status of wireframe mode. More...
 
virtual void setShadowState (bool enabled)=0
 Set the shadow mode and settings. More...
 
virtual bool shadowsEnabled () const =0
 Get status of shadow mode. More...
 
virtual void releaseResources ()=0
 Release all openGL objects in the scene graph. More...
 
virtual bool makeContextCurrent ()=0
 Attempt to make a context current. More...
 
void createManagers ()
 Create overlay manager, must be called after creating the renderer as the manager may expect a specific subclasses of renderer. More...
 
const DtRenderMaprenderMap () const
 Returns a const reference to the unordered map that contains all the element IDs of objects that were in the scene and what simTime they were last rendered in the scene. More...
 
virtual void runMainThreadJobs (double timeBudget)=0
 run the mainthread job and ico for as long as specified this can only be run if there is only one context or the osg graphics context and the opengl graphics context are in sync. More...
 
virtual void launchSwapBufferTasks ()=0
 run tasks in parallel to swap buffers and main thread job More...
 
virtual void cleanup ()=0
 base class doesn't have anything to cleanup. More...
 

Public Attributes

boost::signalslib::signal
< void(double simTime)> 
signal_update
 Signal used to update systems. More...
 
boost::signalslib::signal
< void(double simTime)> 
signal_preObserverUpdate
 Signal used to update systems. More...
 
boost::signalslib::signal
< void(double simTime)> 
signal_postUpdate
 Signal used to update systems. More...
 
boost::signalslib::signal< void()> signal_releaseResources
 Signal used to update systems. More...
 

Protected Attributes

DtDemyDe
 
DtObserverObjectManagermyObserverObjectManager
 
DtTickableManagerInterfacemyTickableManager
 
DtOverlayManagermyOverlayManager
 
DtRenderMap myRenderMap
 
DtSignalConnectionManager myConnections
 

Detailed Description

The DtRenderer is the component responsible for rendering 3D images onto the screen.

The component responsible for drawing 3D images onto a screen is the DtRenderer. Each display engine owns one. The DtRenderer provides an interface for updating the scene graph and rendering the scene. Its update() and render() functions are called each display engine tick.

The core VR-Vantage Toolkit framework abstracts away from the underlying rendering implementation. This separation ensures that the rendering-independent code remains independent of OSG, while the rendering code exists in the libraries that depend on OSG. (VR-Vantage can support alternate rendering solutions.)

Member Typedef Documentation

typedef boost::unordered_map<DtElementID, double> makVrv::DtRenderer::DtRenderMap

Type definition of an unordered map that maps the element ids of objects recently rendered to the last simulation time at which they were rendered.

Elements not rendered recently are removed

Constructor & Destructor Documentation

makVrv::DtRenderer::DtRenderer ( DtDe de)

CTOR.

virtual makVrv::DtRenderer::~DtRenderer ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtRenderer::update ( )
virtual

Abstract update.

Reimplemented in makVrv::DtOsgRenderer.

virtual void makVrv::DtRenderer::postUpdate ( )
virtual

Called after tick; time to update observers.

DtObserverObjectManager* makVrv::DtRenderer::observerObjectManager ( )

Get the observer object manager.

DtTickableManagerInterface& makVrv::DtRenderer::tickableManager ( )

Get the scene manager's attachable scene object manager.

const DtTickableManagerInterface& makVrv::DtRenderer::tickableManager ( ) const
DtOverlayManager& makVrv::DtRenderer::overlayManager ( )

Get the manager's over the 2D overlays.

const DtOverlayManager& makVrv::DtRenderer::overlayManager ( ) const
virtual bool makVrv::DtRenderer::exportTerrainAndProps ( const std::string &  )
pure virtual

Saves terrain geometry and props to specified file.

This file will be saved in the format specified by the file extension. Currently only the .gdb extension is supported

Implemented in makVrv::DtOsgRenderer.

virtual void makVrv::DtRenderer::render ( )
pure virtual

Abstract render.

Implemented in makVrv::DtOsgRenderer.

virtual void makVrv::DtRenderer::resetSceneGraph ( )
pure virtual

Removes all nodes from the scene graph.

Implemented in makVrv::DtOsgRenderer.

virtual void makVrv::DtRenderer::setWireframeRendering ( bool  enabled)
pure virtual

Turn wireframe mode on/off.

Implemented in makVrv::DtOsgRenderer.

virtual bool makVrv::DtRenderer::wireframeRendering ( ) const
pure virtual

Get status of wireframe mode.

Implemented in makVrv::DtOsgRenderer.

virtual void makVrv::DtRenderer::setShadowState ( bool  enabled)
pure virtual

Set the shadow mode and settings.

Implemented in makVrv::DtOsgRenderer.

virtual bool makVrv::DtRenderer::shadowsEnabled ( ) const
pure virtual

Get status of shadow mode.

Implemented in makVrv::DtOsgRenderer.

virtual void makVrv::DtRenderer::releaseResources ( )
pure virtual

Release all openGL objects in the scene graph.

Implemented in makVrv::DtOsgRenderer.

virtual bool makVrv::DtRenderer::makeContextCurrent ( )
pure virtual

Attempt to make a context current.

Returns
true if a context was made current.

Implemented in makVrv::DtOsgRenderer.

void makVrv::DtRenderer::createManagers ( )

Create overlay manager, must be called after creating the renderer as the manager may expect a specific subclasses of renderer.

const DtRenderMap& makVrv::DtRenderer::renderMap ( ) const
inline

Returns a const reference to the unordered map that contains all the element IDs of objects that were in the scene and what simTime they were last rendered in the scene.

virtual void makVrv::DtRenderer::runMainThreadJobs ( double  timeBudget)
pure virtual

run the mainthread job and ico for as long as specified this can only be run if there is only one context or the osg graphics context and the opengl graphics context are in sync.

Implemented in makVrv::DtOsgRenderer.

virtual void makVrv::DtRenderer::launchSwapBufferTasks ( )
pure virtual

run tasks in parallel to swap buffers and main thread job

Implemented in makVrv::DtOsgRenderer.

virtual void makVrv::DtRenderer::cleanup ( )
pure virtual

base class doesn't have anything to cleanup.

DtOsgRenderer cancels the the database pager in this function. Called by the DtDe before things are deleted at shutdown time.

Implemented in makVrv::DtOsgRenderer.

Member Data Documentation

boost::signalslib::signal<void (double simTime)> makVrv::DtRenderer::signal_update

Signal used to update systems.

Connect functions to this signal that need to be called once per tick in the update phase.

boost::signalslib::signal<void (double simTime)> makVrv::DtRenderer::signal_preObserverUpdate

Signal used to update systems.

Connect functions to this signal that need to be called once per tick AFTER scene objects have been updated but before the observers are updated

boost::signalslib::signal<void (double simTime)> makVrv::DtRenderer::signal_postUpdate

Signal used to update systems.

Connect functions to this signal that need to be called once per tick in the post update phase.

boost::signalslib::signal<void ()> makVrv::DtRenderer::signal_releaseResources

Signal used to update systems.

Connect functions to this signal that need to be called once per tick in the post update phase.

DtDe& makVrv::DtRenderer::myDe
protected
DtObserverObjectManager* makVrv::DtRenderer::myObserverObjectManager
protected
DtTickableManagerInterface* makVrv::DtRenderer::myTickableManager
protected
DtOverlayManager* makVrv::DtRenderer::myOverlayManager
protected
DtRenderMap makVrv::DtRenderer::myRenderMap
protected
DtSignalConnectionManager makVrv::DtRenderer::myConnections
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)