Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

osg::Statistics Class Reference

Statistics base class. More...

Inheritance diagram for osg::Statistics:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::pair< unsigned
int, unsigned int > 
PrimitivePair
typedef std::map< GLenum,
PrimitivePair
PrimtiveValueMap
enum  statsType {
  STAT_NONE, STAT_FRAMERATE, STAT_GRAPHS, STAT_PRIMS,
  STAT_PRIMSPERVIEW, STAT_PRIMSPERBIN, STAT_DC, STAT_RESTART
}

Public Methods

 Statistics ()
 ~Statistics ()
void reset ()
void setType (statsType t)
virtual void setVertexArray (unsigned int count, Vec3 *)
virtual void drawArrays (GLenum mode, GLint, GLsizei count)
virtual void drawElements (GLenum mode, GLsizei count, GLubyte *)
virtual void drawElements (GLenum mode, GLsizei count, GLushort *)
virtual void drawElements (GLenum mode, GLsizei count, GLuint *)
virtual void begin (GLenum mode)
virtual void vertex (const Vec3 &)
virtual void vertex (float, float, float)
virtual void end ()
void addDrawable ()
void addMatrix ()
void addLight (const int np)
void addImpostor (const int np)
const int getBins ()
void setDepth (const int d)
void addBins (const int np)
void setBinNo (const int n)

Public Attributes

int numDrawables
int nummat
int nbins
int nlights
int depth
int _binNo
statsType stattype
int nimpostor
unsigned int _vertexCount
PrimtiveValueMap _primitiveCount
GLenum _currentPrimtiveFunctorMode

Detailed Description

Statistics base class.

Used to extract primitive information from the renderBin(s). Add a case of getStats(osgUtil::Statistics *stat) for any new drawable (or drawable derived class) that you generate (eg see Geometry.cpp). There are 20 types of drawable counted - actually only 14 cases can occur in reality. these represent sets of GL_POINTS, GL_LINES GL_LINESTRIPS, LOOPS, TRIANGLES, TRI-fans, tristrips, quads, quadstrips etc The number of triangles rendered is inferred: each triangle = 1 triangle (number of vertices/3) each quad = 2 triangles (nverts/2) each trifan or tristrip = (length-2) triangles and so on.


Member Typedef Documentation

typedef std::pair<unsigned int,unsigned int> osg::Statistics::PrimitivePair
 

typedef std::map<GLenum,PrimitivePair> osg::Statistics::PrimtiveValueMap
 


Member Enumeration Documentation

enum osg::Statistics::statsType
 

Enumeration values:
STAT_NONE 
STAT_FRAMERATE 
STAT_GRAPHS 
STAT_PRIMS 
STAT_PRIMSPERVIEW 
STAT_PRIMSPERBIN 
STAT_DC 
STAT_RESTART 


Constructor & Destructor Documentation

osg::Statistics::Statistics   [inline]
 

osg::Statistics::~Statistics   [inline]
 


Member Function Documentation

void osg::Statistics::addBins const int    np [inline]
 

void osg::Statistics::addDrawable   [inline]
 

void osg::Statistics::addImpostor const int    np [inline]
 

void osg::Statistics::addLight const int    np [inline]
 

void osg::Statistics::addMatrix   [inline]
 

virtual void osg::Statistics::begin GLenum    mode [inline, virtual]
 

Implements osg::Drawable::PrimitiveFunctor.

virtual void osg::Statistics::drawArrays GLenum    mode,
GLint   ,
GLsizei    count
[inline, virtual]
 

Implements osg::Drawable::PrimitiveFunctor.

virtual void osg::Statistics::drawElements GLenum    mode,
GLsizei    count,
GLuint *   
[inline, virtual]
 

Implements osg::Drawable::PrimitiveFunctor.

virtual void osg::Statistics::drawElements GLenum    mode,
GLsizei    count,
GLushort *   
[inline, virtual]
 

Implements osg::Drawable::PrimitiveFunctor.

virtual void osg::Statistics::drawElements GLenum    mode,
GLsizei    count,
GLubyte *   
[inline, virtual]
 

Implements osg::Drawable::PrimitiveFunctor.

virtual void osg::Statistics::end   [inline, virtual]
 

Implements osg::Drawable::PrimitiveFunctor.

const int osg::Statistics::getBins   [inline]
 

void osg::Statistics::reset   [inline]
 

void osg::Statistics::setBinNo const int    n [inline]
 

void osg::Statistics::setDepth const int    d [inline]
 

void osg::Statistics::setType statsType    t [inline]
 

virtual void osg::Statistics::setVertexArray unsigned int    count,
Vec3  
[inline, virtual]
 

Implements osg::Drawable::PrimitiveFunctor.

virtual void osg::Statistics::vertex float   ,
float   ,
float   
[inline, virtual]
 

Implements osg::Drawable::PrimitiveFunctor.

virtual void osg::Statistics::vertex const Vec3   [inline, virtual]
 

Implements osg::Drawable::PrimitiveFunctor.


Member Data Documentation

int osg::Statistics::_binNo
 

GLenum osg::Statistics::_currentPrimtiveFunctorMode
 

PrimtiveValueMap osg::Statistics::_primitiveCount
 

unsigned int osg::Statistics::_vertexCount
 

int osg::Statistics::depth
 

int osg::Statistics::nbins
 

int osg::Statistics::nimpostor
 

int osg::Statistics::nlights
 

int osg::Statistics::numDrawables
 

int osg::Statistics::nummat
 

statsType osg::Statistics::stattype
 


The documentation for this class was generated from the following file:
Generated at Wed Sep 18 13:55:43 2002 for the Open Scene Graph by doxygen 1.2.16.