Added new osg::Stats class for collecting frame stats of different sorts.

Added s/getStats() to osg::View and osg::Camera.
Added population of View::getStats() with frame stats in osgViewer/Viewer.
Added Basic StatsHandler to osgviewer example.
This commit is contained in:
Robert Osfield
2007-01-19 19:53:23 +00:00
parent a90206bcbb
commit f0e2404541
8 changed files with 351 additions and 16 deletions

View File

@@ -31,6 +31,17 @@ class OSG_EXPORT View : public virtual osg::Referenced
View();
/** Set the Stats object used for collect various frame related timing and scene graph stats.*/
void setStats(osg::Stats* stats) { _stats = stats; }
/** Get the Stats object.*/
osg::Stats* getStats() { return _stats.get(); }
/** Get the const Stats object.*/
const osg::Stats* getStats() const { return _stats.get(); }
/** Set the master camera of the view. */
void setCamera(osg::Camera* camera) { _camera = camera; }
@@ -84,6 +95,8 @@ class OSG_EXPORT View : public virtual osg::Referenced
virtual ~View();
osg::ref_ptr<osg::Stats> _stats;
osg::ref_ptr<osg::Camera> _camera;
typedef std::vector<Slave> Slaves;