#include <sceneGraphAnalyzer.h>
Public Member Functions | |
SceneGraphAnalyzer () | |
~SceneGraphAnalyzer () | |
void | clear () |
Resets all of the data in the analyzer in preparation for a new run. | |
void | add_node (PandaNode *node) |
Adds a new node to the set of data for analysis. | |
void | write (ostream &out, int indent_level=0) const |
Describes all the data collected. | |
Public Attributes | |
int | _num_nodes |
int | _num_instances |
int | _num_transforms |
int | _num_nodes_with_attribs |
int | _num_geom_nodes |
int | _num_geoms |
int | _num_vertices |
int | _num_normals |
int | _num_texcoords |
int | _num_tris |
int | _num_quads |
int | _num_polys |
int | _num_lines |
int | _num_points |
int | _num_spheres |
int | _num_individual_tris |
int | _num_tristrips |
int | _num_triangles_in_strips |
int | _num_trifans |
int | _num_triangles_in_fans |
int | _texture_bytes |
int | _num_long_normals |
int | _num_short_normals |
float | _total_normal_length |
Private Types | |
typedef pmap< PandaNode *, int > | Nodes |
typedef pmap< Texture *, int > | Textures |
Private Member Functions | |
void | collect_statistics (PandaNode *node, bool under_instance) |
Recursively visits each node, counting up the statistics. | |
void | collect_statistics (GeomNode *geom_node) |
Recursively visits each node, counting up the statistics. | |
void | collect_statistics (Geom *geom) |
Recursively visits each node, counting up the statistics. | |
void | collect_statistics (Texture *texture) |
Recursively visits each node, counting up the statistics. | |
void | consider_normals (const Normalf *norms, const unsigned short *nindex, int num) |
Examines the indicated set of normals. | |
Private Attributes | |
Nodes | _nodes |
Textures | _textures |
Definition at line 46 of file sceneGraphAnalyzer.h.
|
Definition at line 65 of file sceneGraphAnalyzer.h. |
|
Definition at line 66 of file sceneGraphAnalyzer.h. |
|
Definition at line 41 of file sceneGraphAnalyzer.cxx. |
|
Definition at line 53 of file sceneGraphAnalyzer.cxx. References _nodes, _num_geom_nodes, _num_geoms, _num_instances, _num_nodes, _num_nodes_with_attribs, _num_transforms, _textures, and PointerToArray< PointerTo< Texture > >::clear(). |
|
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 _num_nodes, and _num_nodes_with_attribs. |
|
Resets all of the data in the analyzer in preparation for a new run.
Definition at line 67 of file sceneGraphAnalyzer.cxx. References _num_individual_tris, _num_lines, _num_long_normals, _num_normals, _num_points, _num_polys, _num_quads, _num_short_normals, _num_spheres, _num_texcoords, _num_triangles_in_fans, _num_triangles_in_strips, _num_trifans, _num_tris, _num_tristrips, _num_vertices, _texture_bytes, and _total_normal_length. |
|
Recursively visits each node, counting up the statistics.
Definition at line 396 of file sceneGraphAnalyzer.cxx. References _num_long_normals, _num_normals, _num_short_normals, _total_normal_length, IS_THRESHOLD_EQUAL, Normalf, and NULL. |
|
Recursively visits each node, counting up the statistics.
Definition at line 296 of file sceneGraphAnalyzer.cxx. References G_OFF, G_PER_COMPONENT, and G_PER_VERTEX. |
|
Recursively visits each node, counting up the statistics.
Definition at line 260 of file sceneGraphAnalyzer.cxx. References _num_vertices, consider_normals(), G_OVERALL, G_PER_PRIM, GeomBindType, Geom::get_length(), Geom::get_normals(), Geom::get_num_more_vertices_than_components(), Geom::get_num_prims(), Geom::get_num_vertices_per_prim(), and Geom::uses_components(). |
|
Recursively visits each node, counting up the statistics.
Definition at line 206 of file sceneGraphAnalyzer.cxx. |
|
Examines the indicated set of normals.
Definition at line 434 of file sceneGraphAnalyzer.cxx. Referenced by collect_statistics(). |
|
Describes all the data collected.
Definition at line 131 of file sceneGraphAnalyzer.cxx. References _num_long_normals, _num_normals, _num_short_normals, _total_normal_length, and indent(). |
|
Definition at line 68 of file sceneGraphAnalyzer.h. Referenced by ~SceneGraphAnalyzer(). |
|
Definition at line 76 of file sceneGraphAnalyzer.h. Referenced by ~SceneGraphAnalyzer(). |
|
Definition at line 77 of file sceneGraphAnalyzer.h. Referenced by ~SceneGraphAnalyzer(). |
|
Definition at line 89 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 73 of file sceneGraphAnalyzer.h. Referenced by ~SceneGraphAnalyzer(). |
|
Definition at line 85 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 97 of file sceneGraphAnalyzer.h. Referenced by clear(), collect_statistics(), and write(). |
|
Definition at line 72 of file sceneGraphAnalyzer.h. Referenced by add_node(), and ~SceneGraphAnalyzer(). |
|
Definition at line 75 of file sceneGraphAnalyzer.h. Referenced by add_node(), and ~SceneGraphAnalyzer(). |
|
Definition at line 80 of file sceneGraphAnalyzer.h. Referenced by clear(), collect_statistics(), and write(). |
|
Definition at line 86 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 84 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 83 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 98 of file sceneGraphAnalyzer.h. Referenced by clear(), collect_statistics(), and write(). |
|
Definition at line 87 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 81 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 74 of file sceneGraphAnalyzer.h. Referenced by ~SceneGraphAnalyzer(). |
|
Definition at line 93 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 91 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 92 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 82 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 90 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 79 of file sceneGraphAnalyzer.h. Referenced by clear(), and collect_statistics(). |
|
Definition at line 95 of file sceneGraphAnalyzer.h. Referenced by clear(). |
|
Definition at line 69 of file sceneGraphAnalyzer.h. Referenced by ~SceneGraphAnalyzer(). |
|
Definition at line 99 of file sceneGraphAnalyzer.h. Referenced by clear(), collect_statistics(), and write(). |