Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Types | Public Member Functions
SceneGraphAnalyzer Class Reference

A handy class that can scrub over a scene graph and collect interesting statistics on it. More...

List of all members.

Public Types

enum  LodMode { LMLowest = 0, LMHighest = 1, LMAll = 2, LMNone = 3 }

Public Member Functions

 SceneGraphAnalyzer ()
 addNode (PandaNode node)
 Adds a new node to the set of data for analysis.
 clear ()
 Resets all of the data in the analyzer in preparation for a new run.
LodMode getLodMode (LodMode lod_mode)
 Returns the mode in which LODNodes are analyzed.
int getNumColors ()
int getNumGeomNodes ()
int getNumGeoms ()
int getNumGeomVertexDatas ()
int getNumGeomVertexFormats ()
int getNumIndividualTris ()
int getNumInstances ()
int getNumLines ()
int getNumLodNodes ()
int getNumLongNormals ()
int getNumNodes ()
int getNumNodesWithAttribs ()
int getNumNormals ()
int getNumPoints ()
int getNumShortNormals ()
int getNumTexcoords ()
int getNumTransforms ()
int getNumTrianglesInFans ()
int getNumTrianglesInStrips ()
int getNumTrifans ()
int getNumTris ()
int getNumTristrips ()
int getNumVertices ()
int getTextureBytes ()
float getTotalNormalLength ()
int getVertexDataSize ()
 setLodMode (LodMode lod_mode)
 Specifies the mode in which LODNodes are analyzed.
 write (ostream out, int indent_level)
 Describes all the data collected.
 write (ostream out)
 Describes all the data collected.

Detailed Description

A handy class that can scrub over a scene graph and collect interesting statistics on it.


Member Enumeration Documentation

enum LodMode
Enumerator:
LMLowest 
LMHighest 
LMAll 
LMNone 

Constructor & Destructor Documentation


Member Function Documentation

addNode ( PandaNode  node)

Adds a new node to the set of data for analysis.

Normally, this would only be called once, and passed the top of the scene graph, but it's possible to repeatedly pass in subgraphs to get an analysis of all the graphs together.

clear ( )

Resets all of the data in the analyzer in preparation for a new run.

LodMode getLodMode ( LodMode  lod_mode)

Returns the mode in which LODNodes are analyzed.

setLodMode ( LodMode  lod_mode)

Specifies the mode in which LODNodes are analyzed.

write ( ostream  out,
int  indent_level 
)

Describes all the data collected.

write ( ostream  out)

Describes all the data collected.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties