I totally agree with your suggestions, I think it will be great to have the possibility to get the stats from our application and display it the way we want. Just one question, with a osg::CameraStats (or osg::Camera::Stats) it will be possible to have to stats for each osg::Camera separately ? If yes, it will be great. :)
On 1/19/07, Robert Osfield <[EMAIL PROTECTED]> wrote:
I will try again to get some debate about what stats you would find useful and how you'd like to get access them, and suggestions on good ways to present them. My current thought would be to have a based osg::Stats class that has some general purpose access methods for setting what stats are available, and have subclasses from osg::Stats that do the actual hard work, such as osg::CameraStats (or osg::Camera::Stats), osg::GraphicsStats, osgViewer::ViewStats etc. The Stats would have a record of the stats quantities for each frame for a fix number of frames, and recycle around this structure so that the stats structure isn't be reallocated on each frame, and you can get the history of the last n frames. osg:Stats { typedef std::map<std::string, double> AttributeMap; typedef std::vector<unsigned int, AttributeMap> AttributeMap& getAttributes(unsigned int frameNum); void setAttribute(unsgined int frameNum, const std:string& attributeName, double value); bool getAttribute(unsigned int frameNum, const std:string& attributeName, double& value); } ; I am also wondering about nesting of Stats structures, so one would have a from of CompositeStats class, but perhaps one needn't have a general purpose mechansim for this. What I'd like is for end users to be able to add their own stats in easily and also be able to go an query what stats are available and print them out/display them on screen. Thoughts? Suggestions? Robert. _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
-- Serge Lages http://www.magrathea-engine.org
_______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/