OpenSceneGraph/doc/doc++/osgUtil/Statistics.html
2003-10-02 14:28:30 +00:00

327 lines
14 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>class osgUtil::Statistics</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.10">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class <A HREF="#DOC.DOCU">osgUtil::Statistics</A></H2></H2><BLOCKQUOTE> Statistics base class.</BLOCKQUOTE>
<HR>
<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=65>
<param name=classes value="Mosg::Drawable::PrimitiveFunctor,M,CStatistics,MStatistics.html">
<param name=before value="M,M">
<param name=after value="Md_,M">
<param name=indent value="0,1">
<param name=arrowdir value="down">
</APPLET>
<HR>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.23.28">numDrawables</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.23.29">nummat</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.23.30">nbins</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.23.31">nlights</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.23.32">depth</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.23.33">_binNo</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Statistics.html#DOC.2.23.5">statsType</A> <B><A HREF="#DOC.2.23.34">stattype</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.23.35">nimpostor</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>unsigned int <B><A HREF="#DOC.2.23.36">_vertexCount</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Statistics.html#DOC.2.23.2">PrimtiveValueMap</A> <B><A HREF="#DOC.2.23.37">_primitiveCount</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>GLenum <B><A HREF="#DOC.2.23.38">_currentPrimtiveFunctorMode</A></B>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.23.4">Statistics</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.23.6">reset</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.23.7">setType</A></B>(<!1><A HREF="Statistics.html#DOC.2.23.5">statsType</A> t)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.23.8">setVertexArray</A></B>(unsigned int count, const osg::Vec4*)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.23.9">drawArrays</A></B>(GLenum mode, GLint, GLsizei count)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.23.10">drawElements</A></B>(GLenum mode, GLsizei count, const GLuint*)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.23.11">begin</A></B>(GLenum mode)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.23.12">vertex</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.23.13">vertex</A></B>(float, float, float)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.23.14">vertex</A></B>(const osg::Vec4&amp;)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.23.15">vertex</A></B>(float, float)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.23.16">vertex</A></B>(float, float, float, float)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.23.17">end</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.23.18">addDrawable</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.23.19">addMatrix</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.23.20">addLight</A></B>(int np)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.23.21">addImpostor</A></B>(int np)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline int <B><A HREF="#DOC.2.23.22">getBins</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.23.23">setDepth</A></B>(int d)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.23.24">addBins</A></B>(int np)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.23.25">setBinNo</A></B>(int n)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>PrimtiveCountMap::iterator <B><A HREF="#DOC.2.23.26">GetPrimitivesBegin</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>PrimtiveCountMap::iterator <B><A HREF="#DOC.2.23.27">GetPrimitivesEnd</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline unsigned int <B><A HREF="#DOC.2.23.42">_calculate_primitives_number_by_mode</A></B>(GLenum mode, GLsizei count)
</DL></P>
<P><DL>
<DT><H3>Public Members</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>typedef std::pair&lt;unsigned int,unsigned int&gt; <B><A HREF="#DOC.2.23.1">PrimitivePair</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>typedef std::map&lt;GLenum,<!1><A HREF="Statistics.html#DOC.2.23.1">PrimitivePair</A>&gt; <B><A HREF="#DOC.2.23.2">PrimtiveValueMap</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>typedef std::map&lt;GLenum, unsigned int&gt; <B><A HREF="#DOC.2.23.3">PrimtiveCountMap</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>enum <B><A HREF="#DOC.2.23.5">statsType</A></B>
</DL></P>
</DL>
<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>
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.</BLOCKQUOTE>
<DL>
<A NAME="PrimitivePair"></A>
<A NAME="DOC.2.23.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>typedef std::pair&lt;unsigned int,unsigned int&gt; PrimitivePair</B></TT>
<DL><DT><DD></DL><P>
<A NAME="PrimtiveValueMap"></A>
<A NAME="DOC.2.23.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>typedef std::map&lt;GLenum,<!1><A HREF="Statistics.html#DOC.2.23.1">PrimitivePair</A>&gt; PrimtiveValueMap</B></TT>
<DL><DT><DD></DL><P>
<A NAME="PrimtiveCountMap"></A>
<A NAME="DOC.2.23.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>typedef std::map&lt;GLenum, unsigned int&gt; PrimtiveCountMap</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Statistics"></A>
<A NAME="DOC.2.23.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Statistics()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="statsType"></A>
<A NAME="DOC.2.23.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>enum statsType</B></TT>
<DL><DT><DD></DL><P><DL>
<A NAME="STAT_NONE"></A>
<A NAME="DOC.2.23.5.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> STAT_NONE</B></TT>
<DL><DT><DD></DL><P>
<A NAME="STAT_FRAMERATE"></A>
<A NAME="DOC.2.23.5.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> STAT_FRAMERATE</B></TT>
<DL><DT><DD></DL><P>
<A NAME="STAT_GRAPHS"></A>
<A NAME="DOC.2.23.5.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> STAT_GRAPHS</B></TT>
<DL><DT><DD></DL><P>
<A NAME="STAT_PRIMS"></A>
<A NAME="DOC.2.23.5.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> STAT_PRIMS</B></TT>
<DL><DT><DD></DL><P>
<A NAME="STAT_PRIMSPERVIEW"></A>
<A NAME="DOC.2.23.5.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> STAT_PRIMSPERVIEW</B></TT>
<DL><DT><DD></DL><P>
<A NAME="STAT_PRIMSPERBIN"></A>
<A NAME="DOC.2.23.5.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> STAT_PRIMSPERBIN</B></TT>
<DL><DT><DD></DL><P>
<A NAME="STAT_DC"></A>
<A NAME="DOC.2.23.5.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> STAT_DC</B></TT>
<DL><DT><DD></DL><P>
<A NAME="STAT_RESTART"></A>
<A NAME="DOC.2.23.5.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> STAT_RESTART</B></TT>
<DL><DT><DD></DL><P></DL>
<A NAME="reset"></A>
<A NAME="DOC.2.23.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void reset()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setType"></A>
<A NAME="DOC.2.23.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setType(<!1><A HREF="Statistics.html#DOC.2.23.5">statsType</A> t)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setVertexArray"></A>
<A NAME="DOC.2.23.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void setVertexArray(unsigned int count, const osg::Vec4*)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="drawArrays"></A>
<A NAME="DOC.2.23.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void drawArrays(GLenum mode, GLint, GLsizei count)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="drawElements"></A>
<A NAME="DOC.2.23.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void drawElements(GLenum mode, GLsizei count, const GLuint*)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="begin"></A>
<A NAME="DOC.2.23.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void begin(GLenum mode)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="vertex"></A>
<A NAME="DOC.2.23.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void vertex()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="vertex"></A>
<A NAME="DOC.2.23.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void vertex(float, float, float)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="vertex"></A>
<A NAME="DOC.2.23.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void vertex(const osg::Vec4&amp;)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="vertex"></A>
<A NAME="DOC.2.23.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void vertex(float, float)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="vertex"></A>
<A NAME="DOC.2.23.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void vertex(float, float, float, float)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="end"></A>
<A NAME="DOC.2.23.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void end()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="addDrawable"></A>
<A NAME="DOC.2.23.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void addDrawable()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="addMatrix"></A>
<A NAME="DOC.2.23.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void addMatrix()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="addLight"></A>
<A NAME="DOC.2.23.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void addLight(int np)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="addImpostor"></A>
<A NAME="DOC.2.23.21"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void addImpostor(int np)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="getBins"></A>
<A NAME="DOC.2.23.22"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline int getBins()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setDepth"></A>
<A NAME="DOC.2.23.23"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setDepth(int d)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="addBins"></A>
<A NAME="DOC.2.23.24"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void addBins(int np)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setBinNo"></A>
<A NAME="DOC.2.23.25"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setBinNo(int n)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="GetPrimitivesBegin"></A>
<A NAME="DOC.2.23.26"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>PrimtiveCountMap::iterator GetPrimitivesBegin()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="GetPrimitivesEnd"></A>
<A NAME="DOC.2.23.27"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>PrimtiveCountMap::iterator GetPrimitivesEnd()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="numDrawables"></A>
<A NAME="DOC.2.23.28"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int numDrawables</B></TT>
<DL><DT><DD></DL><P>
<A NAME="nummat"></A>
<A NAME="DOC.2.23.29"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int nummat</B></TT>
<DL><DT><DD></DL><P>
<A NAME="nbins"></A>
<A NAME="DOC.2.23.30"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int nbins</B></TT>
<DL><DT><DD></DL><P>
<A NAME="nlights"></A>
<A NAME="DOC.2.23.31"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int nlights</B></TT>
<DL><DT><DD></DL><P>
<A NAME="depth"></A>
<A NAME="DOC.2.23.32"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int depth</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_binNo"></A>
<A NAME="DOC.2.23.33"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int _binNo</B></TT>
<DL><DT><DD></DL><P>
<A NAME="stattype"></A>
<A NAME="DOC.2.23.34"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Statistics.html#DOC.2.23.5">statsType</A> stattype</B></TT>
<DL><DT><DD></DL><P>
<A NAME="nimpostor"></A>
<A NAME="DOC.2.23.35"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int nimpostor</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_vertexCount"></A>
<A NAME="DOC.2.23.36"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>unsigned int _vertexCount</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_primitiveCount"></A>
<A NAME="DOC.2.23.37"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Statistics.html#DOC.2.23.2">PrimtiveValueMap</A> _primitiveCount</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_currentPrimtiveFunctorMode"></A>
<A NAME="DOC.2.23.38"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>GLenum _currentPrimtiveFunctorMode</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_calculate_primitives_number_by_mode"></A>
<A NAME="DOC.2.23.42"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline unsigned int _calculate_primitives_number_by_mode(GLenum mode, GLsizei count)</B></TT>
<DL><DT><DD></DL><P></DL>
<HR><DL><DT><B>This class has no child classes.</B></DL>
<DL><DT><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>