VR-Forces 4.6 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 | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtStatsHandler Class Reference

osgViewer::StatsHandler derived class used to fix a few problems that class has in VR-Vantage More specifically fixes a problem with stats sizing and multiple windows. More...

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

Public Types

enum  ProfilerStatsType {
  NO_PROFILER_STATS = 0, PERFORMANCE_STATS = 1, FUNCTION_STATS = 2, BOTH_STATS = 3,
  LAST_PROFILER_STATS = 4
}

Public Member Functions

 DtStatsHandler (DtDe &de)
 Default constructor - currently does nothing on purpose.
virtual void addTransform (const osg::Matrix &transform)
virtual void clearTransforms ()
virtual void setKeyEventTogglesProfilerStats (int key)
virtual int getKeyEventTogglesProfilerStats ()
virtual int getStatsType ()
 Accessor for protected _statsType osgViewer::StatsHandler variable.
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
 Override method for handle() in order to fix a few minor bugs with how window size is handled.

Protected Member Functions

virtual ~DtStatsHandler ()
 destructor is protected since it should only be handled by osg::ref_ptr's
osg::Matrix make2DWindowingTransform (osg::Vec2 lowerLeft1, osg::Vec2 upperRight1, osg::Vec2 lowerLeft2, osg::Vec2 upperRight2)
virtual void updateTransformMatrix ()
virtual void initializeTransforms ()
virtual void turnOffOsgStats (osgViewer::View *view)
virtual void turnOffBothProfilerStats (bool sendSettingsToGui)
virtual void createPerformanceStats ()
virtual void deletePerformanceStats ()
virtual void sendPerformanceStatsToGUI (bool enabled)
virtual void turnOffPerformanceStats (bool sendSettingsToGui)
virtual void createProfilerStats ()
virtual void deleteProfilerStats ()
virtual void sendProfilerStatsToGUI (bool enabled)
virtual void turnOffProfilerStats (bool sendSettingsToGui)
virtual void updateProfilerStats (bool sendSettingsToGui)
virtual void setUpProfilerStatsScene ()
virtual void initialize ()
 This will set up the graph we need to diaplay the stats in osg, it will automatically get called When we first toggle the stats.
virtual void passKeyEventToStats (int key, int modifier)
 Pass the key event to the stats so they can handler it.
virtual void setPerformanceStatsOverlayEnabled (bool show, bool sendSettingsToGui=true)
 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, bool sendSettingsToGui=true)
 Set whether IG function profiler overlay is enabled.
virtual bool profilerOverlayEnabled () const
 Get whether IG function profiler overlay is enabled.
virtual void slot_updateDtOsgPerformanceStats (const std::string &string)
 slot when the stats information of the DtOsgPerformanceStats updated
virtual void slot_updateDtOsgProfilerStats (const std::string &string, int numOfLines)
 slot when the stats information of the DtOsgProfilerStats updated
virtual void slot_onPerformanceStatsOverlayOnChanged (bool mode)
 receive signals from the shared state about performance overlays
virtual void slot_onProfilerOverlayOnChanged (bool mode)
 receive signals from the shared state about profiler overlays

Protected Attributes

DtDemyDe
osg::ref_ptr
< osg::MatrixTransform > 
myMatrixTransform
osg::observer_ptr
< osgViewer::View > 
myOsgView
int myTransformType
int myMaximumTransform
std::vector< osg::Matrix > myMatrixs
bool myFixedText
int myKeyEventTogglesProfilerStats
int myProfilerStatsType
float myProfilerStatsTextSize
osg::Vec4 myProfilerStatsTextColor
osg::ref_ptr< osg::Switch > myStatsSwitch
osg::ref_ptr< osg::Switch > myProfilerStatsSwitch
std::string myProfilerStatsFont
osg::ref_ptr< osg::Geode > myPerformanceGeode
osg::ref_ptr< osgText::Text > myPerformanceStatsText
osg::ref_ptr< osg::Geode > myProfilerGeode
osg::ref_ptr< osgText::Text > myProfilerStatsText
unsigned int myOsgStatsChildNum
unsigned int myProfilerStatsSwitchChildNum
unsigned int myPerformanceStatsChildNum
unsigned int myProfilerStatsChildNum
bool mySetUpProfilerStatsScene
DtOsgPerformanceStatsmyDtOsgPerformanceStats
DtOsgProfilerStatsmyDtOsgProfilerStats
bool myNeedEnableOsgPerformanceInStartup
bool myNeedEnableOsgProfilerInStartup

Private Member Functions

 DtStatsHandler (const DtStatsHandler &other)
 Copy Constructor not implemented – Copy Not Allowed.
DtStatsHandleroperator= (const DtStatsHandler &other)
 Assignment Operator Not implemented – Assignment Not Allowed.

Detailed Description

osgViewer::StatsHandler derived class used to fix a few problems that class has in VR-Vantage More specifically fixes a problem with stats sizing and multiple windows.

Also fixes a problem with the event handler and a passthrough switch error. Lastly exposes the _statsType variable to allow recreation of the stats handler while maintaining the current visible stats.

Member Enumeration Documentation

Enumerator:
NO_PROFILER_STATS 
PERFORMANCE_STATS 
FUNCTION_STATS 
BOTH_STATS 
LAST_PROFILER_STATS 

Constructor & Destructor Documentation

makVrv::DtStatsHandler::DtStatsHandler ( DtDe de)

Default constructor - currently does nothing on purpose.

virtual makVrv::DtStatsHandler::~DtStatsHandler ( )
protectedvirtual

destructor is protected since it should only be handled by osg::ref_ptr's

makVrv::DtStatsHandler::DtStatsHandler ( const DtStatsHandler other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

virtual void makVrv::DtStatsHandler::addTransform ( const osg::Matrix &  transform)
virtual
virtual void makVrv::DtStatsHandler::clearTransforms ( )
virtual
virtual void makVrv::DtStatsHandler::setKeyEventTogglesProfilerStats ( int  key)
virtual
virtual int makVrv::DtStatsHandler::getKeyEventTogglesProfilerStats ( )
virtual
osg::Matrix makVrv::DtStatsHandler::make2DWindowingTransform ( osg::Vec2  lowerLeft1,
osg::Vec2  upperRight1,
osg::Vec2  lowerLeft2,
osg::Vec2  upperRight2 
)
protected
virtual void makVrv::DtStatsHandler::updateTransformMatrix ( )
protectedvirtual
virtual void makVrv::DtStatsHandler::initializeTransforms ( )
protectedvirtual
virtual void makVrv::DtStatsHandler::turnOffOsgStats ( osgViewer::View *  view)
protectedvirtual
virtual void makVrv::DtStatsHandler::turnOffBothProfilerStats ( bool  sendSettingsToGui)
protectedvirtual
virtual void makVrv::DtStatsHandler::createPerformanceStats ( )
protectedvirtual
virtual void makVrv::DtStatsHandler::deletePerformanceStats ( )
protectedvirtual
virtual void makVrv::DtStatsHandler::sendPerformanceStatsToGUI ( bool  enabled)
protectedvirtual
virtual void makVrv::DtStatsHandler::turnOffPerformanceStats ( bool  sendSettingsToGui)
protectedvirtual
virtual void makVrv::DtStatsHandler::createProfilerStats ( )
protectedvirtual
virtual void makVrv::DtStatsHandler::deleteProfilerStats ( )
protectedvirtual
virtual void makVrv::DtStatsHandler::sendProfilerStatsToGUI ( bool  enabled)
protectedvirtual
virtual void makVrv::DtStatsHandler::turnOffProfilerStats ( bool  sendSettingsToGui)
protectedvirtual
virtual void makVrv::DtStatsHandler::updateProfilerStats ( bool  sendSettingsToGui)
protectedvirtual
virtual void makVrv::DtStatsHandler::setUpProfilerStatsScene ( )
protectedvirtual
virtual void makVrv::DtStatsHandler::initialize ( )
protectedvirtual

This will set up the graph we need to diaplay the stats in osg, it will automatically get called When we first toggle the stats.

Do not call it twice.

virtual void makVrv::DtStatsHandler::passKeyEventToStats ( int  key,
int  modifier 
)
protectedvirtual

Pass the key event to the stats so they can handler it.

virtual void makVrv::DtStatsHandler::setPerformanceStatsOverlayEnabled ( bool  show,
bool  sendSettingsToGui = true 
)
protectedvirtual

Set whether IG performance stats overlay is enabled.

virtual bool makVrv::DtStatsHandler::performanceStatsOverlayEnabled ( ) const
protectedvirtual

Get whether IG performance stats overlay is enabled.

virtual void makVrv::DtStatsHandler::setProfilerOverlayEnabled ( bool  show,
bool  sendSettingsToGui = true 
)
protectedvirtual

Set whether IG function profiler overlay is enabled.

virtual bool makVrv::DtStatsHandler::profilerOverlayEnabled ( ) const
protectedvirtual

Get whether IG function profiler overlay is enabled.

virtual void makVrv::DtStatsHandler::slot_updateDtOsgPerformanceStats ( const std::string &  string)
protectedvirtual

slot when the stats information of the DtOsgPerformanceStats updated

virtual void makVrv::DtStatsHandler::slot_updateDtOsgProfilerStats ( const std::string &  string,
int  numOfLines 
)
protectedvirtual

slot when the stats information of the DtOsgProfilerStats updated

Parameters
numOfLinesthe number of lines('
') in this string
virtual void makVrv::DtStatsHandler::slot_onPerformanceStatsOverlayOnChanged ( bool  mode)
protectedvirtual

receive signals from the shared state about performance overlays

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

receive signals from the shared state about profiler overlays

DtStatsHandler& makVrv::DtStatsHandler::operator= ( const DtStatsHandler other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

virtual int makVrv::DtStatsHandler::getStatsType ( )
virtual

Accessor for protected _statsType osgViewer::StatsHandler variable.

virtual bool makVrv::DtStatsHandler::handle ( const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  aa 
)
virtual

Override method for handle() in order to fix a few minor bugs with how window size is handled.

Member Data Documentation

DtDe& makVrv::DtStatsHandler::myDe
protected
osg::ref_ptr<osg::MatrixTransform> makVrv::DtStatsHandler::myMatrixTransform
protected
osg::observer_ptr<osgViewer::View> makVrv::DtStatsHandler::myOsgView
protected
int makVrv::DtStatsHandler::myTransformType
protected
int makVrv::DtStatsHandler::myMaximumTransform
protected
std::vector<osg::Matrix> makVrv::DtStatsHandler::myMatrixs
protected
bool makVrv::DtStatsHandler::myFixedText
protected
int makVrv::DtStatsHandler::myKeyEventTogglesProfilerStats
protected
int makVrv::DtStatsHandler::myProfilerStatsType
protected
float makVrv::DtStatsHandler::myProfilerStatsTextSize
protected
osg::Vec4 makVrv::DtStatsHandler::myProfilerStatsTextColor
protected
osg::ref_ptr<osg::Switch> makVrv::DtStatsHandler::myStatsSwitch
protected
osg::ref_ptr<osg::Switch> makVrv::DtStatsHandler::myProfilerStatsSwitch
protected
std::string makVrv::DtStatsHandler::myProfilerStatsFont
protected
osg::ref_ptr<osg::Geode> makVrv::DtStatsHandler::myPerformanceGeode
protected
osg::ref_ptr<osgText::Text> makVrv::DtStatsHandler::myPerformanceStatsText
protected
osg::ref_ptr<osg::Geode> makVrv::DtStatsHandler::myProfilerGeode
protected
osg::ref_ptr<osgText::Text> makVrv::DtStatsHandler::myProfilerStatsText
protected
unsigned int makVrv::DtStatsHandler::myOsgStatsChildNum
protected
unsigned int makVrv::DtStatsHandler::myProfilerStatsSwitchChildNum
protected
unsigned int makVrv::DtStatsHandler::myPerformanceStatsChildNum
protected
unsigned int makVrv::DtStatsHandler::myProfilerStatsChildNum
protected
bool makVrv::DtStatsHandler::mySetUpProfilerStatsScene
protected
DtOsgPerformanceStats* makVrv::DtStatsHandler::myDtOsgPerformanceStats
protected
DtOsgProfilerStats* makVrv::DtStatsHandler::myDtOsgProfilerStats
protected
bool makVrv::DtStatsHandler::myNeedEnableOsgPerformanceInStartup
protected
bool makVrv::DtStatsHandler::myNeedEnableOsgProfilerInStartup
protected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)