VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends
makVrv::DtOsgRenderer Class Reference

The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneGraph The component responsible for drawing 3D images onto a screen is the DtRenderer. More...

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

Classes

class  SceneRoot
 Abstract index into the scene graph. More...

Public Types

enum  RootDomain {
  RenderSystem, Environment, Terrain, Prop,
  ModelSetSpecific, VisualizerTypeSpecific, ChannelSpecific
}
 Enumerations to indicate the part of the scene graph to interact with. More...
typedef std::vector< SceneRootRootList
 A list of DtOsgRenderer::SceneRoots.
- Public Types inherited from makVrv::DtRenderer
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.

Public Member Functions

virtual ~DtOsgRenderer ()
 DTOR.
virtual void update ()
 Add functionality to update, update dynamic objects.
virtual void render ()
 Render.
virtual bool viewExists () const
 Returns whether or not a view (typically a window) exists.
virtual void resetSceneGraph ()
 Removes all nodes from the scene graph.
virtual void removeChannelRoot (DtChannel *channel)
 Checks to see if this channel has a root, and, if it does, remove it from all model set roots.
virtual void addNodeToRoot (osg::Node *node, const SceneRoot &sr, bool createOnAccess=true)
 Add a node to the specified SceneRoot.
virtual void removeNodeFromRoot (osg::Node *node, const SceneRoot &sr)
 Remove a node from the specified SceneRoot.
virtual void traverseRoot (osg::NodeVisitor &nv, const SceneRoot &sr)
 Traverse from the specified SceneRoot with the given visitor.
virtual void setSceneRootNodeMask (const SceneRoot &sr, osg::Node::NodeMask nodemask)
 Set the nodemask of a SceneRoot.
virtual osg::Node::NodeMask sceneRootNodeMask (const SceneRoot &sr)
 Get the nodemask of a SceneRoot.
virtual osg::BoundingSphere sceneRootBound (const SceneRoot &sr)
 Get the bounding sphere of sceneRoot.
virtual osg::BoundingSphere sceneRootListBound (const RootList &srList)
 Get the bounding sphere of list of sceneRoots.
virtual void addChannelToModelSetRoot (int modelSetId, DtChannel *channel)
 Set the specified channel to render a modelSet root.
virtual void removeChannelFromModelSetRoot (int modelSetId, DtChannel *channel)
 Stop the specified channel from rendering a modelSet root.
virtual void addChannelToVisualizerRoot (int modelSetId, int visualizerType, DtChannel *channel)
 Set the specified channel to render a visualizer type root.
virtual void removeChannelFromVisualizerRoot (int modelSetId, int visualizerType, DtChannel *channel)
 Stop the specified channel from rendering a visualizer type root.
virtual void setSceneDataToRenderRoot (osgViewer::View &view)
 Set the sceneData of a view to the top of the scene graph.
virtual void addSceneToCamera (osg::Camera *camera)
 Add the scene to the specified camera.
virtual void addSceneRootToNode (const SceneRoot &sr, osg::Group *node, bool createOnAccess=true)
 Add the specified SceneRoot to an OSG group node.
virtual osg::Group * findSceneRootChildByName (const SceneRoot &parent, const std::string &rootName)
 Look up a root by name in the parent specified by SceneRoot.
virtual bool matchesSceneRoot (const SceneRoot &sr, osg::Group *group)
 Does this group match the given scene root.
virtual void releaseResources ()
 Release all openGL objects in the scene graph.
virtual void releaseResources (osg::State *state)
 Release all openGL objects in the scene graph.
void setRootNode (osg::Group *, bool copyChildrenFromOldRoot)
 Set the new scene root node, and optionally copy the old root children.
void resetRoot ()
 Reset the scene root node back to the original node.
void registerPagedLODs (osg::Node *node)
 Register any paged LOD's with all of the existing database pagers.
void clearPagedLODs ()
 Register any paged LOD's with all of the existing database pagers.
virtual void setPerformanceStatsOverlayEnabled (bool show)
 Set whether IG performance stats overlay is enabled.
virtual bool performanceStatsOverlayEnabled () const
 Get whether IG performance stats overlay is enabled.
virtual void setProfilerOverlayEnabled (bool show)
 Set whether IG function profiler overlay is enabled.
virtual bool profilerOverlayEnabled () const
 Get whether IG function profiler overlay is enabled.
virtual void setWireframeRendering (bool enabled)
 Turn on/off wireframe mode rendering.
virtual void setDdsFlip (bool flip)
 Turn on/off dds flip.
virtual bool wireframeRendering () const
 Check wireframe status.
virtual void setShadowState (bool enabled)
 Set the global shadow mode.
virtual bool shadowsEnabled () const
 Get global shadow mode.
void setTerrainScalingEnabled (bool enabled)
 Set whether terrain scaling is on.
void setTerrainScaleFactor (double scaleFactor)
 Set the terrain scale factor (only used if scaling is on)
virtual bool makeContextCurrent ()
 Attempt to make a context current.
DtFontManagerfontManager ()
 Get the font manager.
const DtFontManagerfontManager () const
DtEffectManagereffectManager ()
 Get the font manager.
const DtEffectManagereffectManager () const
void debugDrawBox (const osg::Vec3 &center, const osg::Vec3 &extents)
 Draw a box in the next frame.
void debugDrawBox (const osg::Vec3 &center, const osg::Vec3 &extents, const osg::Quat &orientation)
 Draw a box in the next frame.
void setChannelShadowState (DtOsgChannel *osgChannel, bool enable)
 Set the shadow mode for channels.
bool getChannelShadowSettings (DtOsgChannel *osgChannel, DtShadowSettingsObject **shadowSettingObject, bool *isPlanView)
 Gets the shadow settings for this channel.
bool getChannelCloudShadowMap (DtOsgChannel *osgChannel, unsigned int *textureIndex, osg::Matrix *textureViewProjMatrix)
 Gets the cloud shadow map for this channel.
bool getCameraCloudShadowMap (osg::Camera *camera, unsigned int *textureIndex, osg::Matrix *textureViewProjMatrix)
 Gets the cloud shadow map for this camera.
- Public Member Functions inherited from makVrv::DtRenderer
 DtRenderer (DtDe &de)
 CTOR.
virtual ~DtRenderer ()
 DTOR.
virtual void postUpdate ()
 Called after tick; time to update observers.
DtObserverObjectManagerobserverObjectManager ()
 Get the observer object manager.
DtTickableManagerInterfacetickableManager ()
 Get the scene manager's attachable scene object manager.
const DtTickableManagerInterfacetickableManager () const
DtOverlayManageroverlayManager ()
 Get the manager's over the 2D overlays.
const DtOverlayManageroverlayManager () const
void createManagers ()
 Create overlay manager, must be called after creating the renderer as the manager may expect a specific subclasses of renderer.
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.

Static Public Member Functions

static DtOsgRendererfindInstance (DtDe &de)
 Attempt to get the Osg renderer for the de.

Public Attributes

boost::signal< void(int
modelSet, int visualType) > 
signal_visualizerRootAdded
boost::signal< void(DtChannel *) > signal_channelRootAdded
- Public Attributes inherited from makVrv::DtRenderer
boost::signal< void(double
simTime)> 
signal_update
 Signal used to update systems.
boost::signal< void(double
simTime)> 
signal_preObserverUpdate
 Signal used to update systems.
boost::signal< void(double
simTime)> 
signal_postUpdate
 Signal used to update systems.
boost::signal< void()> signal_releaseResources
 Signal used to update systems.

Static Public Attributes

static const int SKY_RENDERBIN = -10
static const int DEFAULT_RENDERBIN = 0
static const int DEPTH_ONLY_RENDERBIN = 6
static const int OCEAN_RENDERBIN = 7
static const int LIGHTPOINT_RENDERBIN = 8
static const int CLOUD_RENDERBIN = 9
static const int DEFAULT_TRANSPARENT_RENDERBIN = 10
static const int COCKPIT_RENDERBIN = 25
static const std::string SkyBin
static const std::string DepthOnlyBin
static const std::string OceanBin
static const std::string LightPointBin
static const std::string CloudBin
static const std::string CockpitBin

Friends

class DtSceneGraph
class DtOsgRendererCreator
class DtSceneGraphTreeLogic

Utility functions for getting scene root index objects.

typedef boost::unordered_map
< int, osg::ref_ptr
< osg::Group > > 
RootMap
 Under each model set group is another channel group for each visualizer type.
typedef boost::unordered_map
< int, osg::ref_ptr
< osgShadow::ShadowedScene > > 
ShadowedSceneMap
 Under each model set group is another channel group for each visualizer type.
typedef int ModelSet
 Under each model set group is another channel group for each visualizer type.
typedef int VisualizerType
 Under each model set group is another channel group for each visualizer type.
typedef boost::unordered_map
< ModelSet, osg::ref_ptr
< osg::Group > > 
ModelSetRootMap
 Under each model set group is another channel group for each visualizer type.
typedef boost::unordered_map
< VisualizerType, osg::ref_ptr
< osg::Group > > 
VisualizerTypeRootMap
 Under each model set group is another channel group for each visualizer type.
typedef boost::unordered_map
< ModelSet,
VisualizerTypeRootMap
ModelSetVisualizerTypeRootMap
 Under each model set group is another channel group for each visualizer type.
typedef boost::unordered_map
< DtChannel *, ModelSetRootMap
ChannelRootMap
 DtChannelSpecificGroup that contains only the channel it represents.
DtSceneGraphmySceneGraph
 Under each model set group is another channel group for each visualizer type.
DtFontManagermyFontManager
 Under each model set group is another channel group for each visualizer type.
DtEffectManagermyEffectManager
 Under each model set group is another channel group for each visualizer type.
DtOsgWindowManagermyOsgWindowManager
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osgViewer::Viewer > myDefaultViewer
 This viewer exists so that when there are no displays, windows, or channels, the scene can be updated and kept current.
osg::ref_ptr< osg::Group > myRenderRoot
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osg::Group > myDebugRoot
 Group for drawing debug graphics, cleared after each frame.
osg::ref_ptr< osg::Geode > myDebugBox
 Shared geometry for debug boxes.
osg::ref_ptr< osg::Group > myEnvironmentRoot
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osg::Group > myTerrainRoot
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osg::Group > myPropsRoot
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr
< DtFastMatrixTransform
myScaledTerrainRoot
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr
< DtFastMatrixTransform
myScaledPropsRoot
 Under each model set group is another channel group for each visualizer type.
osg::Matrix myScaleMatrix
 Under each model set group is another channel group for each visualizer type.
ModelSetRootMap myModelSetMap
 Under each model set group is another channel group for each visualizer type.
ModelSetVisualizerTypeRootMap myVisualizerRootMap
 Under each model set group is another channel group for each visualizer type.
ChannelRootMap myChannelRootMap
 Under each model set group is another channel group for each visualizer type.
ShadowedSceneMap myShadowedSceneMap
 Under each model set group is another channel group for each visualizer type.
RootMap myShadowRootMap
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osgUtil::RenderBin > mySkyBin
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osgUtil::RenderBin > myDepthOnlyBin
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osgUtil::RenderBin > myOceanBin
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osgUtil::RenderBin > myLightPointBin
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osgUtil::RenderBin > myCloudBin
 Under each model set group is another channel group for each visualizer type.
osg::ref_ptr< osgUtil::RenderBin > myCockpitBin
 Under each model set group is another channel group for each visualizer type.
bool myWireframeOn
 Under each model set group is another channel group for each visualizer type.
bool myShadowsEnabled
 Under each model set group is another channel group for each visualizer type.
DtOsgProfilerOverlaymyProfilerOverlay
 Under each model set group is another channel group for each visualizer type.
DtOsgPerformanceStatsOverlaymyPerformanceStatsOverlay
 Under each model set group is another channel group for each visualizer type.
double myTerrainScaleFactor
 Under each model set group is another channel group for each visualizer type.
bool myTerrainScaleFactorChanged
 Under each model set group is another channel group for each visualizer type.
bool myTerrainScalingEnabled
 Under each model set group is another channel group for each visualizer type.
bool myTerrainScalingEnabledChanged
 Under each model set group is another channel group for each visualizer type.
bool myResourcesReleased
 Under each model set group is another channel group for each visualizer type.
static SceneRoot theRenderRoot
 Under each model set group is another channel group for each visualizer type.
static SceneRoot theEnvironmentRoot
 Under each model set group is another channel group for each visualizer type.
static SceneRoot theTerrainRoot
 Under each model set group is another channel group for each visualizer type.
static SceneRoot thePropRoot
 Under each model set group is another channel group for each visualizer type.
static SceneRoot renderRoot ()
 Under each model set group is another channel group for each visualizer type.
static SceneRoot environmentRoot ()
 Under each model set group is another channel group for each visualizer type.
static SceneRoot terrainRoot ()
 Under each model set group is another channel group for each visualizer type.
static SceneRoot propRoot ()
 Under each model set group is another channel group for each visualizer type.
static SceneRoot modelSetRoot (int modelSet)
 Under each model set group is another channel group for each visualizer type.
static SceneRoot visualizerTypeRoot (int modelSet, int visualizerType)
 Under each model set group is another channel group for each visualizer type.
static SceneRoot channelRoot (int modelSet, DtChannel *channel)
 Under each model set group is another channel group for each visualizer type.
virtual void moveRootToShadowRoot (const SceneRoot &targetRoot, osg::Group *shadowRoot, osg::Group *modelSetRoot)
 Move a target root out of its model set root and into the shadow root.
virtual osgViewer::ViewerBase & viewer ()
 Returns the current OSG viewer.
 DtOsgRenderer (DtDe &de)
 CTOR This is protected, use the creator instead.
osg::Group * sgRenderRoot ()
 Get the scene graph render root.
osg::Group * sgEnvironmentRoot ()
 Get the environment root which controls the scene's lighting and other global state.
osg::Group * sgPropsRoot ()
 Get the props root node.
osg::Group * sgTerrainRoot ()
 Get the terrains root node.
osg::Group * sgScaledTerrainRoot ()
 Get the active terrain root when terrain scaling is on.
osg::Group * sgScaledPropsRoot ()
 Get the active props root when terrain scaling is on.
osg::Group * sgModelSetRoot (int modelSet)
 Get the root for a given modelSet.
osg::Group * sgVisualizerRoot (int modelSet, int visualizerType, bool createOnAccess=true)
 Get the root for visual models of a specific type in a specific model set If the root does not exist and createOnAccess is true, it will be created and returned; otherwise, returns 0.
osg::Group * sgChannelRoot (int modelSet, DtChannel *channel, bool createOnAccess=true)
 Get the root for the given channel.
void slot_onViewCreated ()
 When a window is created, the fill out its myOsgWindowManager pointer.
void slot_onViewToBeDestroyed ()
 When a window is about to be destroyed, check if its the last window and if so, null out the myOsgWindowManager pointer.
void slot_onWireframeModeChanged (bool mode)
 receive signals from the shared state about wireframe mode
void slot_onDdsFlipChanged (bool flip)
 receive signals from the shared state about dds flip mode
virtual void slot_onProfilerOverlayOnChanged (bool mode)
 receive signals from the shared state about performance overlays
virtual void slot_onPerformanceStatsOverlayOnChanged (bool mode)
 receive signals from the shared state about performance overlays
void slot_onShadowStateChanged (bool shadowMode)
 receive signals from the shared state abotu the shadow state
void slot_onTerrainScalingEnabledChanged (bool enabled)
 receive signals from the shared state about the terrain scaling state
void slot_onTerrainScaleFactorChanged (double scaleFactor)
 receive signals from the shared state about the terrain scale factor
void slot_onCoordinateSystemChanged (const std::string &coordinateSystemType)
 receive signals from the shared state about coordinate system changes
void advanceTime ()
 Advance time, necessary when running as a slave.
void updateSceneGraph ()
 Under each model set group is another channel group for each visualizer type.
void clearEmptyWindows ()
 This method checks for windows that exist but have no channels.
virtual void removeShadows ()
 removes the shadows from the tree and restores any children to the scene root
virtual void createShadowRoots ()
 creates a shadowed scene and adds it to the scene root
virtual bool exportTerrainAndProps (const std::string &)
 Saves terrain geometry and props to specified file.
virtual osg::Group * createModelSetRoot (int modelSet)
 Under each model set group is another channel group for each visualizer type.
virtual osg::Group * createVisualizerRoot (int modelSet, int visualizer)
 Under each model set group is another channel group for each visualizer type.
virtual osg::Group * createChannelRoot (int modelSet, DtChannel *)
 Create a root that is associated with the channel.
virtual osgShadow::ShadowedScene * createModelSetSpecificShadowRootAndScene (int modelSet)
 Under each model set group is another channel group for each visualizer type.
virtual osg::Group * modelSetSpecificShadowRoot (int modelSet)
 Under each model set group is another channel group for each visualizer type.
virtual osgShadow::ShadowedScene * modelSetSpecificShadowScene (int modelSet)
 Under each model set group is another channel group for each visualizer type.
virtual void updateTerrainScaling ()
 Under each model set group is another channel group for each visualizer type.
virtual void updateAerodrome ()
 Under each model set group is another channel group for each visualizer type.
void swapChildren (osg::Node *currentChild, osg::Node *newChild)
 Under each model set group is another channel group for each visualizer type.
virtual void updateRenderMap (const DtInstanceManager::CullSet &cullSet)
 Update the map of recently rendered element IDs and when they were last rendered.
void postInitialize ()
 Used to connect to the instance manager signal that provides the render set.

Additional Inherited Members

- Protected Attributes inherited from makVrv::DtRenderer
DtDemyDe
DtObserverObjectManagermyObserverObjectManager
DtTickableManagerInterfacemyTickableManager
DtOverlayManagermyOverlayManager
DtRenderMap myRenderMap
DtSignalConnectionManager myConnections

Detailed Description

The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneGraph 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.) The DtOsgRenderer is the OSG implementation of the DtRenderer and draws 3D images via OpenSceneGraph.

Member Typedef Documentation

A list of DtOsgRenderer::SceneRoots.

typedef boost::unordered_map<int, osg::ref_ptr<osg::Group> > makVrv::DtOsgRenderer::RootMap
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

typedef boost::unordered_map<int, osg::ref_ptr<osgShadow::ShadowedScene> > makVrv::DtOsgRenderer::ShadowedSceneMap
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

typedef int makVrv::DtOsgRenderer::ModelSet
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

typedef boost::unordered_map<ModelSet, osg::ref_ptr<osg::Group> > makVrv::DtOsgRenderer::ModelSetRootMap
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

typedef boost::unordered_map<VisualizerType, osg::ref_ptr<osg::Group> > makVrv::DtOsgRenderer::VisualizerTypeRootMap
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

typedef boost::unordered_map<DtChannel*, ModelSetRootMap > makVrv::DtOsgRenderer::ChannelRootMap
protected

DtChannelSpecificGroup that contains only the channel it represents.

This will allow for osg nodes to be parented on a channel basis under each model set. As an observer changes which model set it is viewing on the channel, the channel will be removed fom the channel specific group, however, the root itself will stay. The only time the root is removed is when the channel itself is destroyed

Member Enumeration Documentation

Enumerations to indicate the part of the scene graph to interact with.

Enumerator:
RenderSystem 
Environment 
Terrain 
Prop 
ModelSetSpecific 
VisualizerTypeSpecific 
ChannelSpecific 

This root is model set specific.

This root is model set specific

Constructor & Destructor Documentation

virtual makVrv::DtOsgRenderer::~DtOsgRenderer ( )
virtual

DTOR.

makVrv::DtOsgRenderer::DtOsgRenderer ( DtDe de)
protected

CTOR This is protected, use the creator instead.

Member Function Documentation

static DtOsgRenderer* makVrv::DtOsgRenderer::findInstance ( DtDe de)
static

Attempt to get the Osg renderer for the de.

If the de is not initialized or the Renderer is of a different type the returned pointer will be null.

Return values
0If the de does not have an OSG renderer.
virtual void makVrv::DtOsgRenderer::update ( )
virtual

Add functionality to update, update dynamic objects.

Reimplemented from makVrv::DtRenderer.

virtual void makVrv::DtOsgRenderer::render ( )
virtual

Render.

Implements makVrv::DtRenderer.

virtual bool makVrv::DtOsgRenderer::viewExists ( ) const
virtual

Returns whether or not a view (typically a window) exists.

virtual void makVrv::DtOsgRenderer::resetSceneGraph ( )
virtual

Removes all nodes from the scene graph.

Implements makVrv::DtRenderer.

virtual void makVrv::DtOsgRenderer::removeChannelRoot ( DtChannel channel)
virtual

Checks to see if this channel has a root, and, if it does, remove it from all model set roots.

This will typically happen when a channel is destroyed

virtual void makVrv::DtOsgRenderer::addNodeToRoot ( osg::Node *  node,
const SceneRoot sr,
bool  createOnAccess = true 
)
virtual

Add a node to the specified SceneRoot.

virtual void makVrv::DtOsgRenderer::removeNodeFromRoot ( osg::Node *  node,
const SceneRoot sr 
)
virtual

Remove a node from the specified SceneRoot.

virtual void makVrv::DtOsgRenderer::traverseRoot ( osg::NodeVisitor &  nv,
const SceneRoot sr 
)
virtual

Traverse from the specified SceneRoot with the given visitor.

virtual void makVrv::DtOsgRenderer::setSceneRootNodeMask ( const SceneRoot sr,
osg::Node::NodeMask  nodemask 
)
virtual

Set the nodemask of a SceneRoot.

virtual osg::Node::NodeMask makVrv::DtOsgRenderer::sceneRootNodeMask ( const SceneRoot sr)
virtual

Get the nodemask of a SceneRoot.

virtual osg::BoundingSphere makVrv::DtOsgRenderer::sceneRootBound ( const SceneRoot sr)
virtual

Get the bounding sphere of sceneRoot.

virtual osg::BoundingSphere makVrv::DtOsgRenderer::sceneRootListBound ( const RootList srList)
virtual

Get the bounding sphere of list of sceneRoots.

virtual void makVrv::DtOsgRenderer::addChannelToModelSetRoot ( int  modelSetId,
DtChannel channel 
)
virtual

Set the specified channel to render a modelSet root.

virtual void makVrv::DtOsgRenderer::removeChannelFromModelSetRoot ( int  modelSetId,
DtChannel channel 
)
virtual

Stop the specified channel from rendering a modelSet root.

virtual void makVrv::DtOsgRenderer::addChannelToVisualizerRoot ( int  modelSetId,
int  visualizerType,
DtChannel channel 
)
virtual

Set the specified channel to render a visualizer type root.

virtual void makVrv::DtOsgRenderer::removeChannelFromVisualizerRoot ( int  modelSetId,
int  visualizerType,
DtChannel channel 
)
virtual

Stop the specified channel from rendering a visualizer type root.

virtual void makVrv::DtOsgRenderer::setSceneDataToRenderRoot ( osgViewer::View &  view)
virtual

Set the sceneData of a view to the top of the scene graph.

virtual void makVrv::DtOsgRenderer::addSceneToCamera ( osg::Camera *  camera)
virtual

Add the scene to the specified camera.

virtual void makVrv::DtOsgRenderer::addSceneRootToNode ( const SceneRoot sr,
osg::Group *  node,
bool  createOnAccess = true 
)
virtual

Add the specified SceneRoot to an OSG group node.

This should be used with caution - it creates a dependency between the caller and the scene graph's internal node structure.

virtual osg::Group* makVrv::DtOsgRenderer::findSceneRootChildByName ( const SceneRoot parent,
const std::string &  rootName 
)
virtual

Look up a root by name in the parent specified by SceneRoot.

This should not be used to access roots that are created by Vantage. It Is provided for plugins to find the roots possibly created by other plugins (such as multiple GlStudio plugins, for example)

virtual bool makVrv::DtOsgRenderer::matchesSceneRoot ( const SceneRoot sr,
osg::Group *  group 
)
virtual

Does this group match the given scene root.

virtual void makVrv::DtOsgRenderer::releaseResources ( )
inlinevirtual

Release all openGL objects in the scene graph.

Implements makVrv::DtRenderer.

virtual void makVrv::DtOsgRenderer::releaseResources ( osg::State *  state)
virtual

Release all openGL objects in the scene graph.

void makVrv::DtOsgRenderer::setRootNode ( osg::Group *  ,
bool  copyChildrenFromOldRoot 
)

Set the new scene root node, and optionally copy the old root children.

void makVrv::DtOsgRenderer::resetRoot ( )

Reset the scene root node back to the original node.

void makVrv::DtOsgRenderer::registerPagedLODs ( osg::Node *  node)

Register any paged LOD's with all of the existing database pagers.

void makVrv::DtOsgRenderer::clearPagedLODs ( )

Register any paged LOD's with all of the existing database pagers.

virtual void makVrv::DtOsgRenderer::setPerformanceStatsOverlayEnabled ( bool  show)
virtual

Set whether IG performance stats overlay is enabled.

virtual bool makVrv::DtOsgRenderer::performanceStatsOverlayEnabled ( ) const
virtual

Get whether IG performance stats overlay is enabled.

virtual void makVrv::DtOsgRenderer::setProfilerOverlayEnabled ( bool  show)
virtual

Set whether IG function profiler overlay is enabled.

virtual bool makVrv::DtOsgRenderer::profilerOverlayEnabled ( ) const
virtual

Get whether IG function profiler overlay is enabled.

virtual void makVrv::DtOsgRenderer::setWireframeRendering ( bool  enabled)
virtual

Turn on/off wireframe mode rendering.

Implements makVrv::DtRenderer.

virtual void makVrv::DtOsgRenderer::setDdsFlip ( bool  flip)
virtual

Turn on/off dds flip.

virtual bool makVrv::DtOsgRenderer::wireframeRendering ( ) const
virtual

Check wireframe status.

Implements makVrv::DtRenderer.

virtual void makVrv::DtOsgRenderer::setShadowState ( bool  enabled)
virtual

Set the global shadow mode.

Implements makVrv::DtRenderer.

virtual bool makVrv::DtOsgRenderer::shadowsEnabled ( ) const
virtual

Get global shadow mode.

Implements makVrv::DtRenderer.

void makVrv::DtOsgRenderer::setTerrainScalingEnabled ( bool  enabled)

Set whether terrain scaling is on.

void makVrv::DtOsgRenderer::setTerrainScaleFactor ( double  scaleFactor)

Set the terrain scale factor (only used if scaling is on)

virtual bool makVrv::DtOsgRenderer::makeContextCurrent ( )
virtual

Attempt to make a context current.

Returns
true if a context was made current.

Implements makVrv::DtRenderer.

DtFontManager& makVrv::DtOsgRenderer::fontManager ( )

Get the font manager.

const DtFontManager& makVrv::DtOsgRenderer::fontManager ( ) const
DtEffectManager& makVrv::DtOsgRenderer::effectManager ( )

Get the font manager.

const DtEffectManager& makVrv::DtOsgRenderer::effectManager ( ) const
void makVrv::DtOsgRenderer::debugDrawBox ( const osg::Vec3 &  center,
const osg::Vec3 &  extents 
)

Draw a box in the next frame.

void makVrv::DtOsgRenderer::debugDrawBox ( const osg::Vec3 &  center,
const osg::Vec3 &  extents,
const osg::Quat &  orientation 
)

Draw a box in the next frame.

void makVrv::DtOsgRenderer::setChannelShadowState ( DtOsgChannel osgChannel,
bool  enable 
)

Set the shadow mode for channels.

bool makVrv::DtOsgRenderer::getChannelShadowSettings ( DtOsgChannel osgChannel,
DtShadowSettingsObject **  shadowSettingObject,
bool isPlanView 
)

Gets the shadow settings for this channel.

bool makVrv::DtOsgRenderer::getChannelCloudShadowMap ( DtOsgChannel osgChannel,
unsigned int *  textureIndex,
osg::Matrix *  textureViewProjMatrix 
)

Gets the cloud shadow map for this channel.

bool makVrv::DtOsgRenderer::getCameraCloudShadowMap ( osg::Camera *  camera,
unsigned int *  textureIndex,
osg::Matrix *  textureViewProjMatrix 
)

Gets the cloud shadow map for this camera.

static SceneRoot makVrv::DtOsgRenderer::renderRoot ( )
static

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

static SceneRoot makVrv::DtOsgRenderer::environmentRoot ( )
static

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

static SceneRoot makVrv::DtOsgRenderer::terrainRoot ( )
static

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

static SceneRoot makVrv::DtOsgRenderer::propRoot ( )
static

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

static SceneRoot makVrv::DtOsgRenderer::modelSetRoot ( int  modelSet)
inlinestatic

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

static SceneRoot makVrv::DtOsgRenderer::visualizerTypeRoot ( int  modelSet,
int  visualizerType 
)
inlinestatic

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

static SceneRoot makVrv::DtOsgRenderer::channelRoot ( int  modelSet,
DtChannel channel 
)
inlinestatic

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

virtual void makVrv::DtOsgRenderer::moveRootToShadowRoot ( const SceneRoot targetRoot,
osg::Group *  shadowRoot,
osg::Group *  modelSetRoot 
)
protectedvirtual

Move a target root out of its model set root and into the shadow root.

virtual osgViewer::ViewerBase& makVrv::DtOsgRenderer::viewer ( )
protectedvirtual

Returns the current OSG viewer.

Generally this is a DefaultViewer before the display is initialized, and a composite viewer afterwards

osg::Group* makVrv::DtOsgRenderer::sgRenderRoot ( )
protected

Get the scene graph render root.

This node will not change and should only be accessed when connecting a window to it.

osg::Group* makVrv::DtOsgRenderer::sgEnvironmentRoot ( )
protected

Get the environment root which controls the scene's lighting and other global state.

osg::Group* makVrv::DtOsgRenderer::sgPropsRoot ( )
protected

Get the props root node.

osg::Group* makVrv::DtOsgRenderer::sgTerrainRoot ( )
protected

Get the terrains root node.

osg::Group* makVrv::DtOsgRenderer::sgScaledTerrainRoot ( )
protected

Get the active terrain root when terrain scaling is on.

osg::Group* makVrv::DtOsgRenderer::sgScaledPropsRoot ( )
protected

Get the active props root when terrain scaling is on.

osg::Group* makVrv::DtOsgRenderer::sgModelSetRoot ( int  modelSet)
protected

Get the root for a given modelSet.

Nodes aren't put directly under here (except the model set-specific visualizer type nodes) but channels subscribe and unsubscribe to these

Returns a DtChannelSpecificGroup or an osg::Group

osg::Group* makVrv::DtOsgRenderer::sgVisualizerRoot ( int  modelSet,
int  visualizerType,
bool  createOnAccess = true 
)
protected

Get the root for visual models of a specific type in a specific model set If the root does not exist and createOnAccess is true, it will be created and returned; otherwise, returns 0.

Returns a DtChannelSpecificGroup or an osg::Group

osg::Group* makVrv::DtOsgRenderer::sgChannelRoot ( int  modelSet,
DtChannel channel,
bool  createOnAccess = true 
)
protected

Get the root for the given channel.

Nodes are put directly under this root. If root does not exist and createOnAccess is true will create, else return 0

Returns a DtChannelSpecificGroup or an osg::Group

void makVrv::DtOsgRenderer::slot_onViewCreated ( )
protected

When a window is created, the fill out its myOsgWindowManager pointer.

void makVrv::DtOsgRenderer::slot_onViewToBeDestroyed ( )
protected

When a window is about to be destroyed, check if its the last window and if so, null out the myOsgWindowManager pointer.

void makVrv::DtOsgRenderer::slot_onWireframeModeChanged ( bool  mode)
protected

receive signals from the shared state about wireframe mode

void makVrv::DtOsgRenderer::slot_onDdsFlipChanged ( bool  flip)
protected

receive signals from the shared state about dds flip mode

virtual void makVrv::DtOsgRenderer::slot_onProfilerOverlayOnChanged ( bool  mode)
protectedvirtual

receive signals from the shared state about performance overlays

virtual void makVrv::DtOsgRenderer::slot_onPerformanceStatsOverlayOnChanged ( bool  mode)
protectedvirtual

receive signals from the shared state about performance overlays

void makVrv::DtOsgRenderer::slot_onShadowStateChanged ( bool  shadowMode)
protected

receive signals from the shared state abotu the shadow state

void makVrv::DtOsgRenderer::slot_onTerrainScalingEnabledChanged ( bool  enabled)
protected

receive signals from the shared state about the terrain scaling state

void makVrv::DtOsgRenderer::slot_onTerrainScaleFactorChanged ( double  scaleFactor)
protected

receive signals from the shared state about the terrain scale factor

void makVrv::DtOsgRenderer::slot_onCoordinateSystemChanged ( const std::string &  coordinateSystemType)
protected

receive signals from the shared state about coordinate system changes

void makVrv::DtOsgRenderer::advanceTime ( )
protected

Advance time, necessary when running as a slave.

void makVrv::DtOsgRenderer::updateSceneGraph ( )
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

void makVrv::DtOsgRenderer::clearEmptyWindows ( )
protected

This method checks for windows that exist but have no channels.

It clears them each frame so that they don't have garbage on them.

virtual void makVrv::DtOsgRenderer::removeShadows ( )
protectedvirtual

removes the shadows from the tree and restores any children to the scene root

virtual void makVrv::DtOsgRenderer::createShadowRoots ( )
protectedvirtual

creates a shadowed scene and adds it to the scene root

virtual bool makVrv::DtOsgRenderer::exportTerrainAndProps ( const std::string &  )
protectedvirtual

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

Implements makVrv::DtRenderer.

virtual osg::Group* makVrv::DtOsgRenderer::createModelSetRoot ( int  modelSet)
protectedvirtual

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

virtual osg::Group* makVrv::DtOsgRenderer::createVisualizerRoot ( int  modelSet,
int  visualizer 
)
protectedvirtual

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

virtual osg::Group* makVrv::DtOsgRenderer::createChannelRoot ( int  modelSet,
DtChannel  
)
protectedvirtual

Create a root that is associated with the channel.

virtual osgShadow::ShadowedScene* makVrv::DtOsgRenderer::createModelSetSpecificShadowRootAndScene ( int  modelSet)
protectedvirtual

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

virtual osg::Group* makVrv::DtOsgRenderer::modelSetSpecificShadowRoot ( int  modelSet)
protectedvirtual

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

virtual osgShadow::ShadowedScene* makVrv::DtOsgRenderer::modelSetSpecificShadowScene ( int  modelSet)
protectedvirtual

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

virtual void makVrv::DtOsgRenderer::updateTerrainScaling ( )
protectedvirtual

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

virtual void makVrv::DtOsgRenderer::updateAerodrome ( )
protectedvirtual

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

void makVrv::DtOsgRenderer::swapChildren ( osg::Node *  currentChild,
osg::Node *  newChild 
)
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

virtual void makVrv::DtOsgRenderer::updateRenderMap ( const DtInstanceManager::CullSet cullSet)
protectedvirtual

Update the map of recently rendered element IDs and when they were last rendered.

void makVrv::DtOsgRenderer::postInitialize ( )
protected

Used to connect to the instance manager signal that provides the render set.

Friends And Related Function Documentation

friend class DtSceneGraph
friend
friend class DtOsgRendererCreator
friend
friend class DtSceneGraphTreeLogic
friend

Member Data Documentation

const int makVrv::DtOsgRenderer::SKY_RENDERBIN = -10
static
const int makVrv::DtOsgRenderer::DEFAULT_RENDERBIN = 0
static
const int makVrv::DtOsgRenderer::DEPTH_ONLY_RENDERBIN = 6
static
const int makVrv::DtOsgRenderer::OCEAN_RENDERBIN = 7
static
const int makVrv::DtOsgRenderer::LIGHTPOINT_RENDERBIN = 8
static
const int makVrv::DtOsgRenderer::CLOUD_RENDERBIN = 9
static
const int makVrv::DtOsgRenderer::DEFAULT_TRANSPARENT_RENDERBIN = 10
static
const int makVrv::DtOsgRenderer::COCKPIT_RENDERBIN = 25
static
const std::string makVrv::DtOsgRenderer::SkyBin
static
const std::string makVrv::DtOsgRenderer::DepthOnlyBin
static
const std::string makVrv::DtOsgRenderer::OceanBin
static
const std::string makVrv::DtOsgRenderer::LightPointBin
static
const std::string makVrv::DtOsgRenderer::CloudBin
static
const std::string makVrv::DtOsgRenderer::CockpitBin
static
boost::signal< void ( int modelSet, int visualType ) > makVrv::DtOsgRenderer::signal_visualizerRootAdded
boost::signal< void ( DtChannel* ) > makVrv::DtOsgRenderer::signal_channelRootAdded
DtSceneGraph* makVrv::DtOsgRenderer::mySceneGraph
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

DtFontManager* makVrv::DtOsgRenderer::myFontManager
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

DtEffectManager* makVrv::DtOsgRenderer::myEffectManager
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

DtOsgWindowManager* makVrv::DtOsgRenderer::myOsgWindowManager
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osgViewer::Viewer> makVrv::DtOsgRenderer::myDefaultViewer
protected

This viewer exists so that when there are no displays, windows, or channels, the scene can be updated and kept current.

This way when a display, window, channel is created, the objects in the scene graph are current and will match other IG instances. It only gets updated when there myOsgWindowManager is null. It also never renders.

osg::ref_ptr<osg::Group> makVrv::DtOsgRenderer::myRenderRoot
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osg::Group> makVrv::DtOsgRenderer::myDebugRoot
protected

Group for drawing debug graphics, cleared after each frame.

osg::ref_ptr<osg::Geode> makVrv::DtOsgRenderer::myDebugBox
protected

Shared geometry for debug boxes.

osg::ref_ptr<osg::Group> makVrv::DtOsgRenderer::myEnvironmentRoot
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osg::Group> makVrv::DtOsgRenderer::myTerrainRoot
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osg::Group> makVrv::DtOsgRenderer::myPropsRoot
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<DtFastMatrixTransform> makVrv::DtOsgRenderer::myScaledTerrainRoot
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<DtFastMatrixTransform> makVrv::DtOsgRenderer::myScaledPropsRoot
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::Matrix makVrv::DtOsgRenderer::myScaleMatrix
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

ModelSetRootMap makVrv::DtOsgRenderer::myModelSetMap
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

ModelSetVisualizerTypeRootMap makVrv::DtOsgRenderer::myVisualizerRootMap
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

ChannelRootMap makVrv::DtOsgRenderer::myChannelRootMap
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

ShadowedSceneMap makVrv::DtOsgRenderer::myShadowedSceneMap
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

RootMap makVrv::DtOsgRenderer::myShadowRootMap
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osgUtil::RenderBin> makVrv::DtOsgRenderer::mySkyBin
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osgUtil::RenderBin> makVrv::DtOsgRenderer::myDepthOnlyBin
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osgUtil::RenderBin> makVrv::DtOsgRenderer::myOceanBin
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osgUtil::RenderBin> makVrv::DtOsgRenderer::myLightPointBin
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osgUtil::RenderBin> makVrv::DtOsgRenderer::myCloudBin
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

osg::ref_ptr<osgUtil::RenderBin> makVrv::DtOsgRenderer::myCockpitBin
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

bool makVrv::DtOsgRenderer::myWireframeOn
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

bool makVrv::DtOsgRenderer::myShadowsEnabled
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

DtOsgProfilerOverlay* makVrv::DtOsgRenderer::myProfilerOverlay
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

DtOsgPerformanceStatsOverlay* makVrv::DtOsgRenderer::myPerformanceStatsOverlay
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

double makVrv::DtOsgRenderer::myTerrainScaleFactor
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

bool makVrv::DtOsgRenderer::myTerrainScaleFactorChanged
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

bool makVrv::DtOsgRenderer::myTerrainScalingEnabled
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

bool makVrv::DtOsgRenderer::myTerrainScalingEnabledChanged
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

bool makVrv::DtOsgRenderer::myResourcesReleased
protected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

SceneRoot makVrv::DtOsgRenderer::theRenderRoot
staticprotected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

SceneRoot makVrv::DtOsgRenderer::theEnvironmentRoot
staticprotected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

SceneRoot makVrv::DtOsgRenderer::theTerrainRoot
staticprotected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set

SceneRoot makVrv::DtOsgRenderer::thePropRoot
staticprotected

Under each model set group is another channel group for each visualizer type.

So we have a map of visualizer type groups, one per model set


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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)