Panda3D
Public Types | Public Member Functions | List of all members
SceneGraphAnalyzer Class Reference

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

Public Types

enum  LodMode { LM_lowest = 0, LM_highest = 1, LM_all = 2, LM_none = 3 }
 

Public Member Functions

 __init__ ()
 
 __init__ (const SceneGraphAnalyzer)
 
 addNode (PandaNode node)
 Adds a new node to the set of data for analysis. More...
 
 clear ()
 Resets all of the data in the analyzer in preparation for a new run. More...
 
SceneGraphAnalyzer::LodMode getLodMode (SceneGraphAnalyzer::LodMode lod_mode)
 Returns the mode in which LODNodes are analyzed. More...
 
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 getNumPatches ()
 
int getNumPoints ()
 
int getNumShortNormals ()
 
int getNumTexcoords ()
 
int getNumTransforms ()
 
int getNumTrianglesInFans ()
 
int getNumTrianglesInStrips ()
 
int getNumTrifans ()
 
int getNumTris ()
 
int getNumTristrips ()
 
int getNumVertices ()
 
int getNumVerticesInPatches ()
 
int getTextureBytes ()
 
float getTotalNormalLength ()
 
int getVertexDataSize ()
 
 setLodMode (SceneGraphAnalyzer::LodMode lod_mode)
 Specifies the mode in which LODNodes are analyzed. More...
 
 write (Ostream out, int indent_level)
 Describes all the data collected. More...
 

Detailed Description

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

Member Enumeration Documentation

◆ LodMode

enum LodMode
Enumerator
LM_lowest 
LM_highest 
LM_all 
LM_none 

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

◆ __init__() [2/2]

__init__ ( const  SceneGraphAnalyzer)

◆ addNode()

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()

clear ( )

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

◆ getLodMode()

Returns the mode in which LODNodes are analyzed.

◆ getNumColors()

int getNumColors ( )

◆ getNumGeomNodes()

int getNumGeomNodes ( )

◆ getNumGeoms()

int getNumGeoms ( )

◆ getNumGeomVertexDatas()

int getNumGeomVertexDatas ( )

◆ getNumGeomVertexFormats()

int getNumGeomVertexFormats ( )

◆ getNumIndividualTris()

int getNumIndividualTris ( )

◆ getNumInstances()

int getNumInstances ( )

◆ getNumLines()

int getNumLines ( )

◆ getNumLodNodes()

int getNumLodNodes ( )

◆ getNumLongNormals()

int getNumLongNormals ( )

◆ getNumNodes()

int getNumNodes ( )

◆ getNumNodesWithAttribs()

int getNumNodesWithAttribs ( )

◆ getNumNormals()

int getNumNormals ( )

◆ getNumPatches()

int getNumPatches ( )

◆ getNumPoints()

int getNumPoints ( )

◆ getNumShortNormals()

int getNumShortNormals ( )

◆ getNumTexcoords()

int getNumTexcoords ( )

◆ getNumTransforms()

int getNumTransforms ( )

◆ getNumTrianglesInFans()

int getNumTrianglesInFans ( )

◆ getNumTrianglesInStrips()

int getNumTrianglesInStrips ( )

◆ getNumTrifans()

int getNumTrifans ( )

◆ getNumTris()

int getNumTris ( )

◆ getNumTristrips()

int getNumTristrips ( )

◆ getNumVertices()

int getNumVertices ( )

◆ getNumVerticesInPatches()

int getNumVerticesInPatches ( )

◆ getTextureBytes()

int getTextureBytes ( )

◆ getTotalNormalLength()

float getTotalNormalLength ( )

◆ getVertexDataSize()

int getVertexDataSize ( )

◆ setLodMode()

setLodMode ( SceneGraphAnalyzer::LodMode  lod_mode)

Specifies the mode in which LODNodes are analyzed.

◆ write()

write ( Ostream  out,
int  indent_level 
)

Describes all the data collected.