class SceneGraphAnalyzer

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

Inheritance diagram

Inheritance diagram of SceneGraphAnalyzer

__init__() → None
__init__(param0: SceneGraphAnalyzer) → None
setLodMode(lod_mode: LodMode) → None

Specifies the mode in which LODNodes are analyzed.

getLodMode(lod_mode: LodMode) → LodMode

Returns the mode in which LODNodes are analyzed.

Return type


clear() → None

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

addNode(node: PandaNode) → None

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.

write(out: ostream, indent_level: int) → None

Describes all the data collected.

getNumNodes() → int
getNumInstances() → int
getNumTransforms() → int
getNumNodesWithAttribs() → int
getNumLodNodes() → int
getNumGeomNodes() → int
getNumGeoms() → int
getNumGeomVertexDatas() → int
getNumGeomVertexFormats() → int
getVertexDataSize() → size_t
Return type


getNumVertices() → int
getNumNormals() → int
getNumColors() → int
getNumTexcoords() → int
getNumTris() → int
getNumLines() → int
getNumPoints() → int
getNumPatches() → int
getNumIndividualTris() → int
getNumTristrips() → int
getNumTrianglesInStrips() → int
getNumTrifans() → int
getNumTrianglesInFans() → int
getNumVerticesInPatches() → int
getTextureBytes() → size_t
Return type


getNumLongNormals() → int
getNumShortNormals() → int
getTotalNormalLength() → float
enum LodMode
enumerator LM_lowest = 0
enumerator LM_highest = 1
enumerator LM_all = 2
enumerator LM_none = 3