8#ifndef CO_coVRStatsDisplay_h
9#define CO_coVRStatsDisplay_h
11#include <util/coTypes.h>
12#include <osg/AnimationPath>
13#include <osgText/Text>
14#include <osgGA/GUIEventHandler>
15#include <osgGA/AnimationPathManipulator>
17#include <osgViewer/GraphicsWindow>
18#include <osgViewer/Viewer>
35 CAMERA_SCENE_STATS = 3,
36 VIEWER_SCENE_STATS = 4,
42 return _blockMultiplier;
56 void showStats(
int whichStats, osgViewer::ViewerBase *viewer);
58 void enableGpuStats(
bool enable,
const std::string &devname = std::string());
64 virtual void getUsage(osg::ApplicationUsage &usage)
const;
71 osg::Geometry *
createGeometry(
const osg::Vec3 &pos,
float height,
const osg::Vec4 &colour,
unsigned int numBlocks);
73 osg::Geometry *
createFrameMarkers(
const osg::Vec3 &pos,
float height,
const osg::Vec4 &colour,
unsigned int numBlocks);
75 osg::Geometry *
createTick(
const osg::Vec3 &pos,
float height,
const osg::Vec4 &colour,
unsigned int numTicks);
77 osg::Node *
createCameraTimeStats(
const std::string &font, osg::Vec3 &pos,
float startBlocks,
bool acquireGPUStats,
float characterSize, osg::Stats *viewerStats, osg::Camera *camera);
93 bool _finishStats =
true;
94 bool _syncStats =
true;
95 bool _gpuStats =
false;
97 bool _rhrStats =
false;
Definition: ARToolKit.h:33
Definition: coVRStatsDisplay.h:24
void setUpHUDCamera(osgViewer::ViewerBase *viewer)
void enableRhrStats(bool enable)
osg::Camera * getCamera()
Definition: coVRStatsDisplay.h:47
virtual void getUsage(osg::ApplicationUsage &usage) const
unsigned int _rhrDelayChildNum
Definition: coVRStatsDisplay.h:106
unsigned int _rhrSkippedChildNum
Definition: coVRStatsDisplay.h:107
unsigned int _rhrBandwidthChildNum
Definition: coVRStatsDisplay.h:105
virtual ~coVRStatsDisplay()
Definition: coVRStatsDisplay.h:28
void enableGpuStats(bool enable, const std::string &devname=std::string())
osg::ref_ptr< osgText::Text > _threadingModelText
Definition: coVRStatsDisplay.h:91
float _statsHeight
Definition: coVRStatsDisplay.h:116
void setUpScene(osgViewer::ViewerBase *viewer)
unsigned int _gpuUtilChildNum
Definition: coVRStatsDisplay.h:102
int _statsType
Definition: coVRStatsDisplay.h:83
osg::Geometry * createTick(const osg::Vec3 &pos, float height, const osg::Vec4 &colour, unsigned int numTicks)
osg::ref_ptr< osg::Switch > _switch
Definition: coVRStatsDisplay.h:88
const osg::Camera * getCamera() const
Definition: coVRStatsDisplay.h:51
void updateThreadingModelText(osgViewer::ViewerBase::ThreadingModel tm)
unsigned int _rhrFpsChildNum
Definition: coVRStatsDisplay.h:104
std::string _gpuName
Definition: coVRStatsDisplay.h:96
float _statsWidth
Definition: coVRStatsDisplay.h:115
double getBlockMultiplier() const
Definition: coVRStatsDisplay.h:40
unsigned int _gpuClockChildNum
Definition: coVRStatsDisplay.h:101
osg::Geometry * createFrameMarkers(const osg::Vec3 &pos, float height, const osg::Vec4 &colour, unsigned int numBlocks)
osgViewer::ViewerBase::ThreadingModel _threadingModel
Definition: coVRStatsDisplay.h:90
osg::Geometry * createGeometry(const osg::Vec3 &pos, float height, const osg::Vec4 &colour, unsigned int numBlocks)
void showStats(int whichStats, osgViewer::ViewerBase *viewer)
unsigned int _frameRateChildNum
Definition: coVRStatsDisplay.h:98
StatsType
Definition: coVRStatsDisplay.h:31
unsigned int _threadingModelChildNum
Definition: coVRStatsDisplay.h:103
void enableSyncStats(bool enable)
osg::ref_ptr< osg::Camera > _camera
Definition: coVRStatsDisplay.h:86
unsigned int _gpuMemChildNum
Definition: coVRStatsDisplay.h:99
unsigned int _cameraSceneChildNum
Definition: coVRStatsDisplay.h:110
unsigned int _gpuChildNum
Definition: coVRStatsDisplay.h:109
osg::Geometry * createBackgroundRectangle(const osg::Vec3 &pos, const float width, const float height, osg::Vec4 &color)
unsigned int _viewerSceneChildNum
Definition: coVRStatsDisplay.h:111
unsigned int _viewerChildNum
Definition: coVRStatsDisplay.h:108
void enableFinishStats(bool enable)
bool _initialized
Definition: coVRStatsDisplay.h:85
unsigned int _numBlocks
Definition: coVRStatsDisplay.h:112
double _blockMultiplier
Definition: coVRStatsDisplay.h:113
unsigned int _gpuPCIeChildNum
Definition: coVRStatsDisplay.h:100
osg::Node * createCameraTimeStats(const std::string &font, osg::Vec3 &pos, float startBlocks, bool acquireGPUStats, float characterSize, osg::Stats *viewerStats, osg::Camera *camera)
Definition: VRViewer.h:53