from panda3d.core import SceneGraphAnalyzer
class SceneGraphAnalyzer


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

Inheritance diagram

Inheritance diagram of SceneGraphAnalyzer

enum LodMode
enumerator LM_lowest = 0
enumerator LM_highest = 1
enumerator LM_all = 2
enumerator LM_none = 3
__init__(param0: SceneGraphAnalyzer)
add_node(node: PandaNode)

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.


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

get_lod_mode(lod_mode: LodMode) LodMode

Returns the mode in which LODNodes are analyzed.

get_num_colors() int
get_num_geom_nodes() int
get_num_geom_vertex_datas() int
get_num_geom_vertex_formats() int
get_num_geoms() int
get_num_individual_tris() int
get_num_instances() int
get_num_lines() int
get_num_lod_nodes() int
get_num_long_normals() int
get_num_nodes() int
get_num_nodes_with_attribs() int
get_num_normals() int
get_num_patches() int
get_num_points() int
get_num_short_normals() int
get_num_texcoords() int
get_num_transforms() int
get_num_triangles_in_fans() int
get_num_triangles_in_strips() int
get_num_trifans() int
get_num_tris() int
get_num_tristrips() int
get_num_vertices() int
get_num_vertices_in_patches() int
get_texture_bytes() int
get_total_normal_length() float
get_vertex_data_size() int
set_lod_mode(lod_mode: LodMode)

Specifies the mode in which LODNodes are analyzed.

write(out: ostream, indent_level: int)

Describes all the data collected.