Refactored the view stats.

This commit is contained in:
Robert Osfield
2009-01-27 13:23:20 +00:00
parent 1787efc9a3
commit 29157f24d9
13 changed files with 269 additions and 106 deletions

View File

@@ -17,6 +17,7 @@
#include <osg/Matrix>
#include <osg/Matrixd>
#include <osg/Object>
#include <osg/Stats>
#include <osg/View>
// Must undefine IN and OUT macros defined in Windows headers
@@ -74,6 +75,21 @@ BEGIN_OBJECT_REFLECTOR(osg::View)
__void__take__View_R1,
"Take all the settings, Camera and Slaves from the passed in view, leaving it empty. ",
"");
I_Method1(void, setStats, IN, osg::Stats *, stats,
Properties::NON_VIRTUAL,
__void__setStats__osg_Stats_P1,
"Set the Stats object used for collect various frame related timing and scene graph stats. ",
"");
I_Method0(osg::Stats *, getStats,
Properties::NON_VIRTUAL,
__osg_Stats_P1__getStats,
"Get the Viewers Stats object. ",
"");
I_Method0(const osg::Stats *, getStats,
Properties::NON_VIRTUAL,
__C5_osg_Stats_P1__getStats,
"Get the Viewers Stats object. ",
"");
I_Method1(void, setLightingMode, IN, osg::View::LightingMode, lightingMode,
Properties::NON_VIRTUAL,
__void__setLightingMode__LightingMode,
@@ -204,6 +220,9 @@ BEGIN_OBJECT_REFLECTOR(osg::View)
0,
0,
__bool__removeSlave__unsigned_int);
I_SimpleProperty(osg::Stats *, Stats,
__osg_Stats_P1__getStats,
__void__setStats__osg_Stats_P1);
END_REFLECTOR
BEGIN_VALUE_REFLECTOR(osg::View::Slave)

View File

@@ -207,15 +207,25 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::Statistics)
__void__add__C5_Statistics_R1,
"",
"");
I_Method0(osgUtil::Statistics::PrimitiveCountMap &, getPrimitiveCountMap,
Properties::NON_VIRTUAL,
__PrimitiveCountMap_R1__getPrimitiveCountMap,
"",
"");
I_Method0(const osgUtil::Statistics::PrimitiveCountMap &, getPrimitiveCountMap,
Properties::NON_VIRTUAL,
__C5_PrimitiveCountMap_R1__getPrimitiveCountMap,
"",
"");
I_Method0(osgUtil::Statistics::PrimitiveCountMap::iterator, GetPrimitivesBegin,
Properties::NON_VIRTUAL,
__PrimitiveCountMap_iterator__GetPrimitivesBegin,
"",
"deprecated ",
"");
I_Method0(osgUtil::Statistics::PrimitiveCountMap::iterator, GetPrimitivesEnd,
Properties::NON_VIRTUAL,
__PrimitiveCountMap_iterator__GetPrimitivesEnd,
"",
"deprecated ",
"");
I_SimpleProperty(int, BinNo,
0,
@@ -226,6 +236,9 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::Statistics)
I_SimpleProperty(int, Depth,
0,
__void__setDepth__int);
I_SimpleProperty(osgUtil::Statistics::PrimitiveCountMap &, PrimitiveCountMap,
__PrimitiveCountMap_R1__getPrimitiveCountMap,
0);
I_SimpleProperty(osgUtil::Statistics::StatsType, Type,
0,
__void__setType__StatsType);

View File

@@ -16,6 +16,7 @@
#include <osg/CopyOp>
#include <osg/FrameStamp>
#include <osg/Object>
#include <osg/Stats>
#include <osg/Timer>
#include <osgViewer/CompositeViewer>
#include <osgViewer/View>
@@ -75,6 +76,21 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::CompositeViewer)
__bool__readConfiguration__C5_std_string_R1,
"read the viewer configuration from a configuration file. ",
"");
I_Method1(void, setViewerStats, IN, osg::Stats *, stats,
Properties::VIRTUAL,
__void__setViewerStats__osg_Stats_P1,
"Set the Stats object used for collect various frame related timing and scene graph stats. ",
"");
I_Method0(osg::Stats *, getViewerStats,
Properties::VIRTUAL,
__osg_Stats_P1__getViewerStats,
"Get the Viewers Stats object. ",
"");
I_Method0(const osg::Stats *, getViewerStats,
Properties::VIRTUAL,
__C5_osg_Stats_P1__getViewerStats,
"Get the Viewers Stats object. ",
"");
I_Method1(void, addView, IN, osgViewer::View *, view,
Properties::NON_VIRTUAL,
__void__addView__osgViewer_View_P1,
@@ -257,5 +273,8 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::CompositeViewer)
I_SimpleProperty(osg::FrameStamp *, ViewerFrameStamp,
__osg_FrameStamp_P1__getViewerFrameStamp,
0);
I_SimpleProperty(osg::Stats *, ViewerStats,
__osg_Stats_P1__getViewerStats,
__void__setViewerStats__osg_Stats_P1);
END_REFLECTOR

View File

@@ -17,6 +17,7 @@
#include <osg/FrameStamp>
#include <osg/Node>
#include <osg/Object>
#include <osg/Stats>
#include <osg/Timer>
#include <osgViewer/GraphicsWindow>
#include <osgViewer/View>
@@ -77,6 +78,21 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
__void__take__View_R1,
"Take all the settings, Camera and Slaves from the passed in view(er), leaving it empty. ",
"");
I_Method1(void, setViewerStats, IN, osg::Stats *, stats,
Properties::VIRTUAL,
__void__setViewerStats__osg_Stats_P1,
"Set the Stats object used for collect various frame related timing and scene graph stats. ",
"");
I_Method0(osg::Stats *, getViewerStats,
Properties::VIRTUAL,
__osg_Stats_P1__getViewerStats,
"Get the Viewers Stats object. ",
"");
I_Method0(const osg::Stats *, getViewerStats,
Properties::VIRTUAL,
__C5_osg_Stats_P1__getViewerStats,
"Get the Viewers Stats object. ",
"");
I_Method1(bool, readConfiguration, IN, const std::string &, filename,
Properties::VIRTUAL,
__bool__readConfiguration__C5_std_string_R1,
@@ -219,5 +235,8 @@ BEGIN_OBJECT_REFLECTOR(osgViewer::Viewer)
I_SimpleProperty(osg::FrameStamp *, ViewerFrameStamp,
__osg_FrameStamp_P1__getViewerFrameStamp,
0);
I_SimpleProperty(osg::Stats *, ViewerStats,
__osg_Stats_P1__getViewerStats,
__void__setViewerStats__osg_Stats_P1);
END_REFLECTOR

View File

@@ -70,19 +70,19 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgViewer::ViewerBase)
____ViewerBase__C5_ViewerBase_R1,
"",
"");
I_Method1(void, setStats, IN, osg::Stats *, stats,
Properties::NON_VIRTUAL,
__void__setStats__osg_Stats_P1,
I_Method1(void, setViewerStats, IN, osg::Stats *, stats,
Properties::PURE_VIRTUAL,
__void__setViewerStats__osg_Stats_P1,
"Set the Stats object used for collect various frame related timing and scene graph stats. ",
"");
I_Method0(osg::Stats *, getStats,
Properties::NON_VIRTUAL,
__osg_Stats_P1__getStats,
I_Method0(osg::Stats *, getViewerStats,
Properties::PURE_VIRTUAL,
__osg_Stats_P1__getViewerStats,
"Get the Viewers Stats object. ",
"");
I_Method0(const osg::Stats *, getStats,
Properties::NON_VIRTUAL,
__C5_osg_Stats_P1__getStats,
I_Method0(const osg::Stats *, getViewerStats,
Properties::PURE_VIRTUAL,
__C5_osg_Stats_P1__getViewerStats,
"Get the Viewers Stats object. ",
"");
I_Method1(bool, readConfiguration, IN, const std::string &, filename,
@@ -374,9 +374,6 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgViewer::ViewerBase)
I_SimpleProperty(bool, ReleaseContextAtEndOfFrameHint,
__bool__getReleaseContextAtEndOfFrameHint,
__void__setReleaseContextAtEndOfFrameHint__bool);
I_SimpleProperty(osg::Stats *, Stats,
__osg_Stats_P1__getStats,
__void__setStats__osg_Stats_P1);
I_SimpleProperty(osgViewer::ViewerBase::ThreadingModel, ThreadingModel,
__ThreadingModel__getThreadingModel,
__void__setThreadingModel__ThreadingModel);
@@ -389,6 +386,9 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osgViewer::ViewerBase)
I_SimpleProperty(osg::FrameStamp *, ViewerFrameStamp,
__osg_FrameStamp_P1__getViewerFrameStamp,
0);
I_SimpleProperty(osg::Stats *, ViewerStats,
__osg_Stats_P1__getViewerStats,
__void__setViewerStats__osg_Stats_P1);
END_REFLECTOR
STD_VECTOR_REFLECTOR(std::vector< OpenThreads::Thread * >)