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

# osgUtil::Statistics Class Reference

Statistics base class. More...

Inheritance diagram for osgUtil::Statistics:

[legend]
List of all members.

## Public Types
typedef std::pair< unsigned int, unsigned int > | PrimitivePair
typedef std::map< GLenum, PrimitivePair > | PrimitiveValueMap
typedef std::map< GLenum, unsigned int > | PrimitiveCountMap
enum | statsType { STAT_NONE, STAT_FRAMERATE, STAT_GRAPHS, STAT_PRIMS, STAT_PRIMSPERVIEW, STAT_PRIMSPERBIN, STAT_DC, STAT_RESTART }
## Public Member Functions
| Statistics ()
void | reset ()
void | setType (statsType t)
virtual void | setVertexArray (unsigned int count, const osg::Vec3 *)
virtual void | setVertexArray (unsigned int count, const osg::Vec2 *)
virtual void | setVertexArray (unsigned int count, const osg::Vec4 *)
virtual void | drawArrays (GLenum mode, GLint, GLsizei count)
virtual void | drawElements (GLenum mode, GLsizei count, const GLubyte *)
virtual void | drawElements (GLenum mode, GLsizei count, const GLushort *)
virtual void | drawElements (GLenum mode, GLsizei count, const GLuint *)
virtual void | begin (GLenum mode)
void | vertex ()
virtual void | vertex (float, float, float)
virtual void | vertex (const osg::Vec3 &)
virtual void | vertex (const osg::Vec2 &)
virtual void | vertex (const osg::Vec4 &)
virtual void | vertex (float, float)
virtual void | vertex (float, float, float, float)
virtual void | end ()
void | addDrawable ()
void | addMatrix ()
void | addLight (int np)
void | addImpostor (int np)
int | getBins ()
void | setDepth (int d)
void | addBins (int np)
void | setBinNo (int n)
PrimitiveCountMap::iterator | GetPrimitivesBegin ()
PrimitiveCountMap::iterator | GetPrimitivesEnd ()
## Public Attributes
int | numDrawables
int | nummat
int | nbins
int | nlights
int | depth
int | _binNo
statsType | stattype
int | nimpostor
unsigned int | _vertexCount
PrimitiveValueMap | _primitiveCount
GLenum | _currentPrimitiveFunctorMode

## 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::map<GLenum, unsigned int> osgUtil::Statistics::PrimitiveCountMap

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

typedef std::map<GLenum,PrimitivePair> osgUtil::Statistics::PrimitiveValueMap

## Member Enumeration Documentation

enum osgUtil::Statistics::statsType

  | Enumeration values:
  STAT_NONE |
  STAT_FRAMERATE |
  STAT_GRAPHS |
  STAT_PRIMS |
  STAT_PRIMSPERVIEW |
  STAT_PRIMSPERBIN |
  STAT_DC |
  STAT_RESTART |

## Constructor & Destructor Documentation

osgUtil::Statistics::Statistics | ( |  | ) | `[inline]`

## Member Function Documentation

void osgUtil::Statistics::addBins | ( | int | np | ) | `[inline]`

void osgUtil::Statistics::addDrawable | ( |  | ) | `[inline]`

void osgUtil::Statistics::addImpostor | ( | int | np | ) | `[inline]`

void osgUtil::Statistics::addLight | ( | int | np | ) | `[inline]`

void osgUtil::Statistics::addMatrix | ( |  | ) | `[inline]`

virtual void osgUtil::Statistics::begin | ( | GLenum | mode | ) | `[inline, virtual]`

| Implements osg::PrimitiveFunctor.

virtual void osgUtil::Statistics::drawArrays | ( | GLenum | mode,
|  | GLint | ,
|  | GLsizei | count
| ) | `[inline, virtual]`

| Implements osg::PrimitiveFunctor.

virtual void osgUtil::Statistics::drawElements | ( | GLenum | mode,
|  | GLsizei | count,
|  | const GLuint * |
| ) | `[inline, virtual]`

| Implements osg::PrimitiveFunctor.

virtual void osgUtil::Statistics::drawElements | ( | GLenum | mode,
|  | GLsizei | count,
|  | const GLushort * |
| ) | `[inline, virtual]`

| Implements osg::PrimitiveFunctor.

virtual void osgUtil::Statistics::drawElements | ( | GLenum | mode,
|  | GLsizei | count,
|  | const GLubyte * |
| ) | `[inline, virtual]`

| Implements osg::PrimitiveFunctor.

virtual void osgUtil::Statistics::end | ( |  | ) | `[inline, virtual]`

| Implements osg::PrimitiveFunctor.

int osgUtil::Statistics::getBins | ( |  | ) | `[inline]`

PrimitiveCountMap::iterator osgUtil::Statistics::GetPrimitivesBegin | ( |  | ) | `[inline]`

PrimitiveCountMap::iterator osgUtil::Statistics::GetPrimitivesEnd | ( |  | ) | `[inline]`

void osgUtil::Statistics::reset | ( |  | ) | `[inline]`

void osgUtil::Statistics::setBinNo | ( | int | n | ) | `[inline]`

void osgUtil::Statistics::setDepth | ( | int | d | ) | `[inline]`

void osgUtil::Statistics::setType | ( | statsType | t | ) | `[inline]`

virtual void osgUtil::Statistics::setVertexArray | ( | unsigned int | count,
|  | const osg::Vec4 * |
| ) | `[inline, virtual]`

virtual void osgUtil::Statistics::setVertexArray | ( | unsigned int | count,
|  | const osg::Vec2 * |
| ) | `[inline, virtual]`

virtual void osgUtil::Statistics::setVertexArray | ( | unsigned int | count,
|  | const osg::Vec3 * |
| ) | `[inline, virtual]`

virtual void osgUtil::Statistics::vertex | ( | float | ,
|  | float | ,
|  | float | ,
|  | float |
| ) | `[inline, virtual]`

| Implements osg::PrimitiveFunctor.

virtual void osgUtil::Statistics::vertex | ( | float | ,
|  | float |
| ) | `[inline, virtual]`

| Implements osg::PrimitiveFunctor.

virtual void osgUtil::Statistics::vertex | ( | const osg::Vec4 & |  | ) | `[inline, virtual]`

virtual void osgUtil::Statistics::vertex | ( | const osg::Vec2 & |  | ) | `[inline, virtual]`

virtual void osgUtil::Statistics::vertex | ( | const osg::Vec3 & |  | ) | `[inline, virtual]`

virtual void osgUtil::Statistics::vertex | ( | float | ,
|  | float | ,
|  | float |
| ) | `[inline, virtual]`

| Implements osg::PrimitiveFunctor.

void osgUtil::Statistics::vertex | ( |  | ) | `[inline]`

## Member Data Documentation

int osgUtil::Statistics::_binNo

GLenum osgUtil::Statistics::_currentPrimitiveFunctorMode

PrimitiveValueMap osgUtil::Statistics::_primitiveCount

unsigned int osgUtil::Statistics::_vertexCount

int osgUtil::Statistics::depth

int osgUtil::Statistics::nbins

int osgUtil::Statistics::nimpostor

int osgUtil::Statistics::nlights

int osgUtil::Statistics::numDrawables

int osgUtil::Statistics::nummat

statsType osgUtil::Statistics::stattype

The documentation for this class was generated from the following file:

- Statistics