Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SceneGraphAnalyzer Class Reference

#include <sceneGraphAnalyzer.h>

List of all members.

Public Member Functions

 SceneGraphAnalyzer ()
 ~SceneGraphAnalyzer ()
void clear ()
void add_node (PandaNode *node)
void write (ostream &out, int indent_level=0) const

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)
void collect_statistics (GeomNode *geom_node)
void collect_statistics (Geom *geom)
void collect_statistics (Texture *texture)
void consider_normals (const Normalf *norms, const unsigned short *nindex, int num)

Private Attributes

Nodes _nodes
Textures _textures


Member Typedef Documentation

typedef pmap<PandaNode *, int> SceneGraphAnalyzer::Nodes [private]
 

Definition at line 58 of file sceneGraphAnalyzer.h.

typedef pmap<Texture *, int> SceneGraphAnalyzer::Textures [private]
 

Definition at line 59 of file sceneGraphAnalyzer.h.


Constructor & Destructor Documentation

SceneGraphAnalyzer::SceneGraphAnalyzer  ) 
 

Definition at line 36 of file sceneGraphAnalyzer.cxx.

References clear().

SceneGraphAnalyzer::~SceneGraphAnalyzer  ) 
 

Definition at line 46 of file sceneGraphAnalyzer.cxx.


Member Function Documentation

void SceneGraphAnalyzer::add_node PandaNode node  ) 
 

Definition at line 100 of file sceneGraphAnalyzer.cxx.

References collect_statistics().

void SceneGraphAnalyzer::clear  ) 
 

Definition at line 56 of file sceneGraphAnalyzer.cxx.

References _nodes, _num_geom_nodes, _num_geoms, _num_individual_tris, _num_instances, _num_lines, _num_long_normals, _num_nodes, _num_nodes_with_attribs, _num_normals, _num_points, _num_polys, _num_quads, _num_short_normals, _num_spheres, _num_texcoords, _num_transforms, _num_triangles_in_fans, _num_triangles_in_strips, _num_trifans, _num_tris, _num_tristrips, _num_vertices, _texture_bytes, _textures, and _total_normal_length.

Referenced by SceneGraphAnalyzer().

void SceneGraphAnalyzer::collect_statistics Texture texture  )  [private]
 

Definition at line 359 of file sceneGraphAnalyzer.cxx.

References _texture_bytes, _textures, PixelBuffer::get_component_width(), PixelBuffer::get_num_components(), PixelBuffer::get_xsize(), PixelBuffer::get_ysize(), NULL, pb, and texture.

void SceneGraphAnalyzer::collect_statistics Geom geom  )  [private]
 

Definition at line 263 of file sceneGraphAnalyzer.cxx.

References _num_individual_tris, _num_lines, _num_points, _num_polys, _num_quads, _num_spheres, _num_texcoords, _num_triangles_in_fans, _num_triangles_in_strips, _num_trifans, _num_tris, _num_tristrips, _num_vertices, consider_normals(), G_OFF, G_OVERALL, G_PER_COMPONENT, G_PER_PRIM, G_PER_VERTEX, G_TEXCOORD, GeomBindType, Geom::get_class_type(), Geom::get_length(), Geom::get_normals(), Geom::get_num_more_vertices_than_components(), Geom::get_num_prims(), Geom::get_num_vertices_per_prim(), Geom::get_type(), TypedObject::is_of_type(), and Geom::uses_components().

void SceneGraphAnalyzer::collect_statistics GeomNode geom_node  )  [private]
 

Definition at line 231 of file sceneGraphAnalyzer.cxx.

References _num_geom_nodes, _num_geoms, collect_statistics(), DCAST, RenderState::get_attrib(), TextureAttrib::get_class_type(), GeomNode::get_geom(), GeomNode::get_geom_state(), TextureAttrib::get_texture(), TextureAttrib::is_off(), and NULL.

void SceneGraphAnalyzer::collect_statistics PandaNode node,
bool  under_instance
[private]
 

Definition at line 181 of file sceneGraphAnalyzer.cxx.

References _nodes, _num_instances, _num_nodes, _num_nodes_with_attribs, _num_transforms, DCAST, PandaNode::get_attrib(), PandaNode::get_child(), TextureAttrib::get_class_type(), PandaNode::get_num_children(), PandaNode::get_state(), TextureAttrib::get_texture(), PandaNode::get_transform(), PandaNode::is_geom_node(), TransformState::is_identity(), TextureAttrib::is_off(), and NULL.

Referenced by add_node(), and collect_statistics().

void SceneGraphAnalyzer::consider_normals const Normalf norms,
const unsigned short *  nindex,
int  num
[private]
 

Definition at line 394 of file sceneGraphAnalyzer.cxx.

References _num_long_normals, _num_normals, _num_short_normals, _total_normal_length, IS_THRESHOLD_EQUAL, Normalf, and NULL.

Referenced by collect_statistics().

void SceneGraphAnalyzer::write ostream &  out,
int  indent_level = 0
const
 

Definition at line 110 of file sceneGraphAnalyzer.cxx.

References _num_geom_nodes, _num_geoms, _num_individual_tris, _num_instances, _num_lines, _num_long_normals, _num_nodes, _num_nodes_with_attribs, _num_normals, _num_points, _num_polys, _num_quads, _num_short_normals, _num_spheres, _num_texcoords, _num_transforms, _num_triangles_in_fans, _num_triangles_in_strips, _num_trifans, _num_tris, _num_tristrips, _num_vertices, _texture_bytes, _textures, _total_normal_length, and indent().


Member Data Documentation

Nodes SceneGraphAnalyzer::_nodes [private]
 

Definition at line 61 of file sceneGraphAnalyzer.h.

Referenced by clear(), and collect_statistics().

int SceneGraphAnalyzer::_num_geom_nodes
 

Definition at line 69 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_geoms
 

Definition at line 70 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_individual_tris
 

Definition at line 82 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_instances
 

Definition at line 66 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_lines
 

Definition at line 78 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_long_normals
 

Definition at line 90 of file sceneGraphAnalyzer.h.

Referenced by clear(), consider_normals(), and write().

int SceneGraphAnalyzer::_num_nodes
 

Definition at line 65 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_nodes_with_attribs
 

Definition at line 68 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_normals
 

Definition at line 73 of file sceneGraphAnalyzer.h.

Referenced by clear(), consider_normals(), and write().

int SceneGraphAnalyzer::_num_points
 

Definition at line 79 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_polys
 

Definition at line 77 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_quads
 

Definition at line 76 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_short_normals
 

Definition at line 91 of file sceneGraphAnalyzer.h.

Referenced by clear(), consider_normals(), and write().

int SceneGraphAnalyzer::_num_spheres
 

Definition at line 80 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_texcoords
 

Definition at line 74 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_transforms
 

Definition at line 67 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_triangles_in_fans
 

Definition at line 86 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_triangles_in_strips
 

Definition at line 84 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_trifans
 

Definition at line 85 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_tris
 

Definition at line 75 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_tristrips
 

Definition at line 83 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_num_vertices
 

Definition at line 72 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

int SceneGraphAnalyzer::_texture_bytes
 

Definition at line 88 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

Textures SceneGraphAnalyzer::_textures [private]
 

Definition at line 62 of file sceneGraphAnalyzer.h.

Referenced by clear(), collect_statistics(), and write().

float SceneGraphAnalyzer::_total_normal_length
 

Definition at line 92 of file sceneGraphAnalyzer.h.

Referenced by clear(), consider_normals(), and write().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:13:32 2003 for Panda by doxygen1.3