Show
Ignore:
Timestamp:
01/27/09 14:23:20 (6 years ago)
Author:
robert
Message:

Refactored the view stats.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/View

    r8624 r9554  
    1717#include <osg/Camera> 
    1818#include <osg/Light> 
     19#include <osg/Stats> 
    1920 
    2021#include <OpenThreads/Mutex> 
     
    3839        /** Take all the settings, Camera and Slaves from the passed in view, leaving it empty. */ 
    3940        virtual void take(View& rhs); 
     41 
     42 
     43        /** Set the Stats object used for collect various frame related timing and scene graph stats.*/ 
     44        void setStats(osg::Stats* stats) { _stats = stats; } 
     45 
     46        /** Get the Viewers Stats object.*/ 
     47        osg::Stats* getStats() { return _stats.get(); } 
     48 
     49        /** Get the Viewers Stats object.*/ 
     50        const osg::Stats* getStats() const { return _stats.get(); } 
     51 
    4052 
    4153        /** Options for controlling the global lighting used for the view.*/ 
     
    140152        virtual osg::GraphicsOperation* createRenderer(osg::Camera*) { return 0; } 
    141153 
     154        osg::ref_ptr<osg::Stats>        _stats; 
     155 
    142156        LightingMode                    _lightingMode; 
    143157        osg::ref_ptr<osg::Light>        _light;