VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions
DtVrfOsgRenderer Class Reference
Inheritance diagram for DtVrfOsgRenderer:
Inheritance graph
[legend]

Classes

class  Creator
 

Public Member Functions

osg::Node * terrainNode ()
 
osg::Node * propNode ()
 
 DtVrfOsgRenderer (makVrv::DtDe &)
 
- Public Member Functions inherited from makVrv::DtOsgRenderer
virtual ~DtOsgRenderer ()
 DTOR. More...
 
virtual void update ()
 Add functionality to update, update dynamic objects. More...
 
virtual void render ()
 Render. More...
 
virtual bool viewExists () const
 Returns whether or not a view (typically a window) exists. More...
 
virtual void resetSceneGraph ()
 Removes all nodes from the scene graph. More...
 
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. More...
 
virtual bool isSceneRootEmpty (const DtSceneRoot &sr)
 Checks to see if the specified sceneRoot currently has any children. More...
 
virtual void addNodeToRoot (osg::Node *node, const DtSceneRoot &sr, bool createOnAccess=true)
 Add a node to the specified SceneRoot. More...
 
virtual void addSceneRootToRoot (const DtSceneRoot &childRoot, const DtSceneRoot &parentRoot, bool createOnAccess=true)
 Add a (child) SceneRoot to the specified SceneRoot. More...
 
virtual void removeNodeFromRoot (osg::Node *node, const DtSceneRoot &sr)
 Remove a node from the specified SceneRoot. More...
 
virtual void removeSceneRootFromRoot (const DtSceneRoot &childRoot, const DtSceneRoot &parentRoot)
 Remove a (child) SceneRoot from the specified SceneRoot. More...
 
virtual void traverseRoot (osg::NodeVisitor &nv, const DtSceneRoot &sr)
 Traverse from the specified SceneRoot with the given visitor. More...
 
virtual void setSceneRootNodeMask (const DtSceneRoot &sr, osg::Node::NodeMask nodemask)
 Set the nodemask of a SceneRoot. More...
 
virtual osg::Node::NodeMask sceneRootNodeMask (const DtSceneRoot &sr)
 Get the nodemask of a SceneRoot. More...
 
virtual osg::BoundingSphere sceneRootBound (const DtSceneRoot &sr)
 Get the bounding sphere of sceneRoot. More...
 
virtual osg::BoundingSphere sceneRootListBound (const DtSceneRootList &srList)
 Get the bounding sphere of list of sceneRoots. More...
 
virtual void addChannelToModelSetRoot (int modelSetId, DtChannel *channel)
 Set the specified channel to render a modelSet root. More...
 
virtual void removeChannelFromModelSetRoot (int modelSetId, DtChannel *channel)
 Stop the specified channel from rendering a modelSet root. More...
 
virtual void addChannelToVisualizerRoot (int modelSetId, int visualizerType, DtChannel *channel)
 Set the specified channel to render a visualizer type root. More...
 
virtual void removeChannelFromVisualizerRoot (int modelSetId, int visualizerType, DtChannel *channel)
 Stop the specified channel from rendering a visualizer type root. More...
 
virtual void setSceneDataToRenderRoot (osgViewer::View &view)
 Set the sceneData of a view to the top of the scene graph. More...
 
virtual void addSceneToCamera (osg::Camera *camera)
 Add the scene to the specified camera. More...
 
virtual void addSceneRootToNode (const DtSceneRoot &sr, osg::Group *node, bool createOnAccess=true)
 Add the specified SceneRoot to an OSG group node. More...
 
virtual osg::Group * findSceneRootChildByName (const DtSceneRoot &parent, const std::string &rootName)
 Look up a root by name in the parent specified by SceneRoot. More...
 
virtual bool matchesSceneRoot (const DtSceneRoot &sr, osg::Group *group)
 Does this group match the given scene root. More...
 
virtual void releaseResources ()
 Release all openGL objects in the scene graph. More...
 
virtual void releaseResources (osg::State *state)
 Release all openGL objects in the scene graph. More...
 
void setRootNode (osg::Group *, bool copyChildrenFromOldRoot)
 Set the new scene root node, and optionally copy the old root children. More...
 
void resetRoot ()
 Reset the scene root node back to the original node. More...
 
void registerPagedLODs (osg::Node *node)
 Register any paged LOD's with all of the existing database pagers. More...
 
void clearPagedLODs ()
 Register any paged LOD's with all of the existing database pagers. More...
 
virtual void setWireframeRendering (bool enabled)
 Turn on/off wireframe mode rendering. More...
 
virtual void setDdsFlip (bool flip)
 Turn on/off dds flip. More...
 
virtual bool wireframeRendering () const
 Check wireframe status. More...
 
virtual void setShadowState (bool enabled)
 Set the global shadow mode. More...
 
virtual bool shadowsEnabled () const
 Get global shadow mode. More...
 
virtual bool multiViewVrEnabled () const
 
virtual void setMultiViewVrEnabled (bool enabled)
 
virtual DtMultiViewDatamultiViewData ()
 
void setTerrainScalingEnabled (bool enabled)
 Set whether terrain scaling is on. More...
 
void setTerrainScaleFactor (double scaleFactor)
 Set the terrain scale factor (only used if scaling is on) More...
 
virtual bool makeContextCurrent ()
 Attempt to make a context current. More...
 
DtFontManagerfontManager ()
 Get the font manager. More...
 
const DtFontManagerfontManager () const
 
DtEffectManagereffectManager ()
 Get the font manager. More...
 
const DtEffectManagereffectManager () const
 
virtual void debugDrawBox (const osg::Vec3 &center, const osg::Vec3 &extents)
 Draw a box in the next frame. More...
 
virtual void debugDrawBox (const osg::Vec3 &center, const osg::Vec3 &extents, const osg::Quat &orientation)
 Draw a box in the next frame. More...
 
virtual void setChannelShadowState (DtOsgChannel *osgChannel, bool enable)
 Set the shadow mode for channels. More...
 
virtual bool channelShadowSettings (DtOsgChannel *osgChannel, DtShadowSettingsObject **shadowSettingObject, bool *isPlanView) const
 Gets the shadow settings for this channel. More...
 
virtual bool channelCloudShadowMap (DtOsgChannel *osgChannel, unsigned int *textureIndex, osg::Matrix *textureViewProjMatrix, unsigned int *textureIndex2, osg::Matrix *textureViewProjMatrix2) const
 Gets the cloud shadow map for this channel. More...
 
virtual bool cameraCloudShadowMap (osg::Camera *camera, unsigned int *textureIndex, osg::Matrix *textureViewProjMatrix, unsigned int *textureIndex2, osg::Matrix *textureViewProjMatrix2) const
 Gets the cloud shadow map for this camera. More...
 
osg::StateSet * sgRenderRootStateSet ()
 Gets the stateset for the main render group root node. More...
 
void clearStateGraphForAllChannels (void)
 osg maintains an internal cache of StateSets in a StateGraph More...
 
virtual void addMainThreadPersistantJob (osg::Operation *opp)
 add an operation that will run every frame in the main thread while the cull thread is happening. More...
 
virtual void removeMainThreadPersistantJob (osg::Operation *opp)
 removes an operation that will run in the main thread while the cull thread is happening. More...
 
virtual void addMainThreadPreDrawJob (osg::Operation *opp)
 adds an operation that will run before rendering occurs. More...
 
virtual void addParallelThreadCullJob (osg::Operation *opp)
 adds an operation that will run before rendering occurs. More...
 
virtual void removeParallelThreadCullJob (osg::Operation *opp)
 remove a parallel thread cull job from the list More...
 
virtual void addParallelThreadSwapBufferJob (osg::Operation *opp)
 adds an operation that will run while swap buffers happen . More...
 
virtual bool addMainThreadTransientJob (osg::Operation *operation, bool requiredThisFrame)
 adds a jobs for doing work during cull see DtMainThreadJobManager More...
 
virtual void launchPreCullTasks (DtOsgCullVisitor *cv)
 runs precull jobs, run by DtOsgCullVistorCallback More...
 
virtual void launchSwapBufferTasks ()
 run tasks in parallel to swap buffers and main thread job More...
 
virtual DtMainThreadJobsManagercreateJobsManager ()
 creates the job manager can be overloaded More...
 
virtual int alphaToCoverageRenderBin ()
 get the render bin number being used for the alpha to coverage bin. More...
 
osg::Group * sgRenderRoot ()
 Get the scene graph render root. More...
 
osg::Group * sgEnvironmentRoot ()
 Get the environment root which controls the scene's lighting and other global state. More...
 
osg::Group * sgPropsRoot ()
 Get the props root node. More...
 
osg::Group * sgTerrainRoot ()
 Get the terrains root node. More...
 
osg::Group * sgScaledTerrainRoot ()
 Get the active terrain root when terrain scaling is on. More...
 
osg::Group * sgScaledPropsRoot ()
 Get the active props root when terrain scaling is on. More...
 
osg::Group * sgMinimapTerrainRoot ()
 Get the minimap terrains root node. More...
 
osg::Group * sgMinimapFallbackTerrainRoot ()
 Get the minimap fallback terrain root node. More...
 
osg::Group * sgStatic2dDebugRoot ()
 Get the debug graphics root node. More...
 
osg::Group * sgStatic3dDebugRoot ()
 Get the debug graphics root node. More...
 
osg::Group * sgOceanRoot ()
 Get the ocean root node. More...
 
virtual osg::Group * modelSetSpecificShadowRoot (int modelSet)
 Get ShadowRoot Group for the modelSet. More...
 
virtual osgShadow::ShadowedScene * modelSetSpecificShadowScene (int modelSet)
 Get ShadowScene for the modelSet. More...
 
virtual osgViewer::ViewerBase & viewer ()
 Returns the current OSG viewer. More...
 
virtual void clearMainThreadJobsManager ()
 
virtual DtImGuiLoaderStatsDatagetLoaderStatsData ()
 access to the loader stats More...
 
DtMainThreadJobsManagermainThreadJobsManager ()
 access to the main thread jobs manager. More...
 
virtual void addIntStat (const std::string &name, int value)
 brief imgui loader stats currently added to loader perf page toplevel int stat More...
 
virtual void addFloatStat (const std::string &name, float value)
 brief imgui loader stats currently added to loader perf page subcatagory float stat More...
 
virtual void addIntStat (const std::string &subsystem, const std::string &name, int value)
 brief imgui loader stats currently added to loader perf page toplevel int stat More...
 
virtual void addFloatStat (const std::string &subsystem, const std::string &name, float value)
 brief imgui loader stats currently added to loader perf page subcatagory float stat More...
 
virtual DtImguiHelperimGuiHelper ()
 
virtual unsigned int numActiveThreads ()
 gets the number of reported active threads from the file cache and the pagers. More...
 
- Public Member Functions inherited from makVrv::DtRenderer
 DtRenderer (DtDe &de)
 CTOR. More...
 
virtual ~DtRenderer ()
 DTOR. 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
 
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...
 

Additional Inherited Members

- 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. More...
 
- Static Public Member Functions inherited from makVrv::DtOsgRenderer
static DtOsgRendererfindInstance (DtDe &de)
 Attempt to get the Osg renderer for the de. More...
 
static DtSceneRoot renderRoot ()
 
static DtSceneRoot environmentRoot ()
 
static DtSceneRoot terrainRoot ()
 
static DtSceneRoot minimapTerrainRoot ()
 
static DtSceneRoot minimapFallbackTerrainRoot ()
 
static DtSceneRoot propRoot ()
 
static DtSceneRoot oceanRoot ()
 
static DtSceneRoot modelSetRoot (int modelSet)
 
static DtSceneRoot visualizerTypeRoot (int modelSet, int visualizerType)
 
static DtSceneRoot channelRoot (int modelSet, DtChannel *channel)
 
static const std::string & shadowedSceneName (void)
 
- Public Attributes inherited from makVrv::DtOsgRenderer
boost::signal< void(int
modelSet, int visualType) > 
signal_visualizerRootAdded
 
boost::signal< void(DtChannel *) > signal_channelRootAdded
 
boost::signal< void(bool active) > signal_treeProfilingChanged
 
boost::signal< void(bool active) > signal_diguyProfilingChanged
 
boost::signal< void() > signal_shadowsRemoved
 
- Public Attributes inherited from makVrv::DtRenderer
boost::signal< void(double
simTime)> 
signal_update
 Signal used to update systems. More...
 
boost::signal< void(double
simTime)> 
signal_preObserverUpdate
 Signal used to update systems. More...
 
boost::signal< void(double
simTime)> 
signal_postUpdate
 Signal used to update systems. More...
 
boost::signal< void()> signal_releaseResources
 Signal used to update systems. More...
 
- Static Public Attributes inherited from makVrv::DtOsgRenderer
static const int SKY_RENDERBIN = -10
 
static const int DEFAULT_RENDERBIN = 0
 
static const int DEPTH_ONLY_RENDERBIN = 5
 
static const int OCEAN_RENDERBIN = 6
 
static const int LIGHTPOINT_RENDERBIN = 7
 
static const int CLOUD_RENDERBIN = 8
 
static const int OCCLUSION_RENDERBIN = 9
 
static const int DEFAULT_TRANSPARENT_RENDERBIN = 10
 
static const int COCKPIT_RENDERBIN = 25
 
static const std::string AlphaToCoverageBin
 
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 OcclusionRenderBin
 
static const std::string CockpitBin
 
- Protected Types inherited from makVrv::DtOsgRenderer
typedef boost::unordered_map
< int, osg::ref_ptr
< osg::Group > > 
RootMap
 
typedef boost::unordered_map
< int, osg::ref_ptr
< osgShadow::ShadowedScene > > 
ShadowedSceneMap
 
typedef int ModelSet
 
typedef int VisualizerType
 
typedef boost::unordered_map
< ModelSet, osg::ref_ptr
< osg::Group > > 
ModelSetRootMap
 
typedef boost::unordered_map
< VisualizerType, osg::ref_ptr
< osg::Group > > 
VisualizerTypeRootMap
 
typedef boost::unordered_map
< ModelSet,
VisualizerTypeRootMap
ModelSetVisualizerTypeRootMap
 Under each model set group is another channel group for each visualizer type. More...
 
typedef boost::unordered_map
< DtChannel *, ModelSetRootMap
ChannelRootMap
 DtChannelSpecificGroup that contains only the channel it represents. More...
 
typedef osg::ref_ptr
< osg::Operation > 
OperationRef
 
typedef std::vector< OperationRefOperationVector
 
- Protected Member Functions inherited from makVrv::DtOsgRenderer
virtual void moveRootToShadowRoot (const DtSceneRoot &targetRoot, osg::Group *shadowRoot, osg::Group *modelSetRoot)
 Move a target root out of its model set root and into the shadow root. More...
 
 DtOsgRenderer (DtDe &de)
 CTOR This is protected, use the creator instead. More...
 
osg::Group * sgModelSetRoot (int modelSet)
 Get the root for a given modelSet. More...
 
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. More...
 
osg::Group * sgChannelRoot (int modelSet, DtChannel *channel, bool createOnAccess=true)
 Get the root for the given channel. More...
 
void slot_onViewCreated ()
 When a window is created, the fill out its myOsgWindowManager pointer. More...
 
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. More...
 
void slot_onWireframeModeChanged (bool mode)
 receive signals from the shared state about wireframe mode More...
 
void slot_onDdsFlipChanged (bool flip)
 receive signals from the shared state about dds flip mode More...
 
void slot_onOcclusionCullingChanged (bool enabled)
 receive signals from the shared state about occlusion culling state More...
 
void slot_onShadowStateChanged (bool shadowMode)
 receive signals from the shared state abotu the shadow state More...
 
void slot_onTerrainScalingEnabledChanged (bool enabled)
 receive signals from the shared state about the terrain scaling state More...
 
void slot_onTerrainScaleFactorChanged (double scaleFactor)
 receive signals from the shared state about the terrain scale factor More...
 
void slot_onCoordinateSystemChanged (const std::string &coordinateSystemType)
 receive signals from the shared state about coordinate system changes More...
 
void advanceTime ()
 Advance time, necessary when running as a slave. More...
 
void updateSceneGraph ()
 
void clearEmptyWindows ()
 This method checks for windows that exist but have no channels. More...
 
void clearFrameBufferIfChannelChanged ()
 This method calls clearFrameBufferIfChanged on all the channels. More...
 
virtual void removeShadows ()
 removes the shadows from the tree and restores any children to the scene root More...
 
virtual void createShadowRoots ()
 creates a shadowed scene and adds it to the scene root More...
 
virtual bool exportTerrainAndProps (const std::string &)
 Saves terrain geometry and props to specified file. More...
 
virtual osg::Group * createModelSetRoot (int modelSet)
 
virtual osg::Group * createVisualizerRoot (int modelSet, int visualizer)
 
virtual osg::Group * createChannelRoot (int modelSet, DtChannel *)
 Create a root that is associated with the channel. More...
 
virtual osgShadow::ShadowedScene * createModelSetSpecificShadowRootAndScene (int modelSet)
 Create a ShadowRoot and ShadowScene for the model set. More...
 
virtual void updateTerrainScaling ()
 
virtual void initAerodromeManagers ()
 
virtual void updateAerodrome ()
 
void swapChildren (osg::Node *currentChild, osg::Node *newChild)
 
virtual void updateRenderMap (const CullSet &cullSet)
 Update the map of recently rendered element IDs and when they were last rendered. More...
 
void postInitialize ()
 Used to connect to the instance manager signal that provides the render set. More...
 
void setupAtcVirtualProgram ()
 Used to setup the dither shader for the alpha to coverage bin. More...
 
virtual void processBackgroundLoaderIcoTasks ()
 moves asynchronously loaded compile sets to the ICO More...
 
virtual void runMainThreadJobs (double timeBudget)
 run the main thead job and ico for as long as specified, runs at the end of rendering if there is remainging time 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...
 
- Static Protected Member Functions inherited from makVrv::DtOsgRenderer
static int numDatabasePagerThreads (osgViewer::CompositeViewer &viewer)
 Get the current number of database pagers a composite viewer has. More...
 
static void plotHistogram (float frame_duration, int paging_threads, int mipthreads)
 plotHistogram is used to plot a database pager thread graph in our IMGUI debug window More...
 
- Protected Attributes inherited from makVrv::DtOsgRenderer
DtSceneGraphmySceneGraph
 
DtFontManagermyFontManager
 
DtEffectManagermyEffectManager
 
DtOsgWindowManagermyOsgWindowManager
 
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. More...
 
osg::ref_ptr< osg::Group > myRenderRoot
 
osg::ref_ptr< osg::Group > myDebugRoot
 Group for drawing debug graphics, cleared after each frame. More...
 
osg::ref_ptr< osg::Group > myStatic2dDebugRoot
 Group for drawing debug graphics left alone each frame. More...
 
osg::ref_ptr< osg::Group > myStatic3dDebugRoot
 Group for drawing debug graphics left alone each frame. More...
 
osg::ref_ptr< osg::Geode > myDebugBox
 Shared geometry for debug boxes. More...
 
osg::ref_ptr< osg::Group > myEnvironmentRoot
 
osg::ref_ptr< osg::Group > myTerrainRoot
 
osg::ref_ptr< osg::Group > myMinimapTerrainRoot
 
osg::ref_ptr< osg::Group > myMinimapFallbackTerrainRoot
 
osg::ref_ptr< osg::Group > myPropsRoot
 
osg::ref_ptr< osg::Group > myOceanRoot
 
osg::ref_ptr
< DtFastMatrixTransform
myScaledTerrainRoot
 
osg::ref_ptr
< DtFastMatrixTransform
myScaledPropsRoot
 
osg::Matrix myScaleMatrix
 
ModelSetRootMap myModelSetMap
 
ModelSetVisualizerTypeRootMap myVisualizerRootMap
 
ChannelRootMap myChannelRootMap
 
ShadowedSceneMap myShadowedSceneMap
 
RootMap myShadowRootMap
 
osg::ref_ptr< osgUtil::RenderBin > myAlphaToCoverageBin
 
osg::ref_ptr< osgUtil::RenderBin > mySkyBin
 
osg::ref_ptr< osgUtil::RenderBin > myDepthOnlyBin
 
osg::ref_ptr< osgUtil::RenderBin > myOceanBin
 
osg::ref_ptr< osgUtil::RenderBin > myLightPointBin
 
osg::ref_ptr< osgUtil::RenderBin > myCloudBin
 
osg::ref_ptr< osgUtil::RenderBin > myCockpitBin
 
osg::ref_ptr< osgUtil::RenderBin > myOcclusionNodeBin
 
bool myWireframeOn
 
bool myShadowsEnabled
 
bool myMultiViewVrEnabled
 
DtMultiViewData myMultiViewData
 
DtTaxiwaySignManagermyTaxiwaySignManager
 
DtRunwayMarkingManagermyRunwayMarkingManager
 
DtLightIndicatorManagermyLightIndicatorManager
 
double myTerrainScaleFactor
 
bool myTerrainScaleFactorChanged
 
bool myTerrainScalingEnabled
 
bool myTerrainScalingEnabledChanged
 
bool myResourcesReleased
 
int myAlphaToCoverageRenderBin
 
DtMainThreadJobsManagermyMainThreadJobsManager
 system for doing work during cull More...
 
bool myReaddJobSystem
 
bool myInitializedInRender
 
unsigned int myActiveThreads
 
class DtImguiHelpermyImGuiHelper
 
osg::ref_ptr
< DtOsgGlobalShaderComponent
myGlobalShaderComponent
 
OperationVector myParallelCullJobs
 
OperationVector myParallelSwapBufferJobs
 
- Protected Attributes inherited from makVrv::DtRenderer
DtDemyDe
 
DtObserverObjectManagermyObserverObjectManager
 
DtTickableManagerInterfacemyTickableManager
 
DtOverlayManagermyOverlayManager
 
DtRenderMap myRenderMap
 
DtSignalConnectionManager myConnections
 
- Static Protected Attributes inherited from makVrv::DtOsgRenderer
static DtSceneRoot theRenderRoot
 
static DtSceneRoot theEnvironmentRoot
 
static DtSceneRoot theTerrainRoot
 
static DtSceneRoot theMinimapTerrainRoot
 
static DtSceneRoot theMinimapFallbackTerrainRoot
 
static DtSceneRoot thePropRoot
 
static DtSceneRoot theOceanRoot
 
static std::string theShadowedSceneName
 

Constructor & Destructor Documentation

DtVrfOsgRenderer::DtVrfOsgRenderer ( makVrv::DtDe )
explicit

Member Function Documentation

osg::Node* DtVrfOsgRenderer::terrainNode ( )
osg::Node* DtVrfOsgRenderer::propNode ( )

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)