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
SceneGraphAnalyzer(void)
SceneGraphAnalyzer(SceneGraphAnalyzer const&) = default
void add_node(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.

void clear(void)

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

LodMode get_lod_mode(SceneGraphAnalyzer::LodMode lod_mode) const

Returns the mode in which LODNodes are analyzed.

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

Specifies the mode in which LODNodes are analyzed.

void write(std::ostream &out, int indent_level = 0) const

Describes all the data collected.