Panda3D
|
A handy class that can scrub over a scene graph and collect interesting statistics on it. More...
#include "sceneGraphAnalyzer.h"
Public Types | |
enum | LodMode { LM_lowest, LM_highest, LM_all, LM_none } |
Public Member Functions | |
void | add_node (PandaNode *node) |
Adds a new node to the set of data for analysis. More... | |
void | clear () |
Resets all of the data in the analyzer in preparation for a new run. More... | |
LodMode | get_lod_mode (LodMode lod_mode) const |
Returns the mode in which LODNodes are analyzed. More... | |
int | get_num_colors () const |
int | get_num_geom_nodes () const |
int | get_num_geom_vertex_datas () const |
int | get_num_geom_vertex_formats () const |
int | get_num_geoms () const |
int | get_num_individual_tris () const |
int | get_num_instances () const |
int | get_num_lines () const |
int | get_num_lod_nodes () const |
int | get_num_long_normals () const |
int | get_num_nodes () const |
int | get_num_nodes_with_attribs () const |
int | get_num_normals () const |
int | get_num_patches () const |
int | get_num_points () const |
int | get_num_short_normals () const |
int | get_num_texcoords () const |
int | get_num_transforms () const |
int | get_num_triangles_in_fans () const |
int | get_num_triangles_in_strips () const |
int | get_num_trifans () const |
int | get_num_tris () const |
int | get_num_tristrips () const |
int | get_num_vertices () const |
int | get_num_vertices_in_patches () const |
int | get_texture_bytes () const |
PN_stdfloat | get_total_normal_length () const |
int | get_vertex_data_size () const |
void | set_lod_mode (LodMode lod_mode) |
Specifies the mode in which LODNodes are analyzed. More... | |
void | write (ostream &out, int indent_level=0) const |
Describes all the data collected. More... | |
A handy class that can scrub over a scene graph and collect interesting statistics on it.
Definition at line 39 of file sceneGraphAnalyzer.h.
void SceneGraphAnalyzer::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.
Definition at line 118 of file sceneGraphAnalyzer.cxx.
References write().
Referenced by clear(), and PandaFramework::event_A().
void SceneGraphAnalyzer::clear | ( | ) |
Resets all of the data in the analyzer in preparation for a new run.
Definition at line 63 of file sceneGraphAnalyzer.cxx.
References add_node().
|
inline |
Returns the mode in which LODNodes are analyzed.
Definition at line 32 of file sceneGraphAnalyzer.I.
Referenced by set_lod_mode().
|
inline |
Specifies the mode in which LODNodes are analyzed.
Definition at line 22 of file sceneGraphAnalyzer.I.
References get_lod_mode().
void SceneGraphAnalyzer::write | ( | ostream & | out, |
int | indent_level = 0 |
||
) | const |
Describes all the data collected.
Definition at line 128 of file sceneGraphAnalyzer.cxx.
References PandaNode::get_child(), Texture::get_component_width(), GeomVertexReader::get_data3f(), GeomVertexArrayData::get_data_size_bytes(), GeomNode::get_geom_state(), LODNode::get_highest_switch(), LODNode::get_lowest_switch(), PandaNode::get_num_children(), Texture::get_num_components(), GeomNode::get_num_geoms(), TextureAttrib::get_num_on_stages(), GeomVertexColumn::get_numeric_type(), TextureAttrib::get_on_stage(), TextureAttrib::get_on_texture(), Texture::get_x_size(), Texture::get_y_size(), GeomVertexReader::is_at_end(), PandaNode::is_geom_node(), PandaNode::is_lod_node(), LVecBase3f::length(), and Texture::uses_mipmaps().
Referenced by add_node(), and PandaFramework::event_A().