Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HModelInfo Class Reference

The HModelInfo class computes and stores model information. More...

#include <HModelInfo.h>

Public Member Functions

virtual void ComputeModelInfo (HC_KEY segment_key=INVALID_KEY, bool recurse=true)
 
int GetTotalCircle (void)
 
int GetTotalCircularArc (void)
 
int GetTotalCircularChord (void)
 
int GetTotalCircularWedge (void)
 
int GetTotalCuttingPlane (void)
 
int GetTotalCylinders (void)
 
int GetTotalDistantLight (void)
 
int GetTotalEllipse (void)
 
int GetTotalEllipticalArc (void)
 
int GetTotalFaces (void)
 
int GetTotalGrid (void)
 
int GetTotalImage (void)
 
int GetTotalIncluders (void)
 
int GetTotalIncludes (void)
 
int GetTotalInfiniteLines (void)
 
int GetTotalInfiniteRays (void)
 
int GetTotalLine (void)
 
int GetTotalLocalLight (void)
 
int GetTotalMarker (void)
 
int GetTotalMatrices (void)
 
int GetTotalMesh (void)
 
int GetTotalNURBSCurves (void)
 
int GetTotalNURBSSurfaces (void)
 
int GetTotalOthers (void)
 
int GetTotalPolyCylinders (void)
 
int GetTotalPolygon (void)
 
int GetTotalPolyline (void)
 
int GetTotalReferences (void)
 
int GetTotalSegments (void)
 
int GetTotalShell (void)
 
int GetTotalSpheres (void)
 
int GetTotalSpotLight (void)
 
int GetTotalStringCursor (void)
 
int GetTotalText (void)
 
int GetTotalTriangles (void)
 
int GetTotalTristrips (void)
 
int GetTotalVertices (void)
 
 HModelInfo (HC_KEY segment_key=INVALID_KEY)
 

Protected Member Functions

virtual void ComputeSegmentContents (HC_KEY the_key, bool recurse=true)
 
virtual void IncrementCounter (char *item_type, HC_KEY item_key)
 
virtual void ResetCounters ()
 

Protected Attributes

HC_KEY m_SegmentKey
 For internal use only
 
int m_TotalCircle
 For internal use only.
 
int m_TotalCircularArc
 For internal use only.
 
int m_TotalCircularChord
 For internal use only.
 
int m_TotalCircularWedge
 For internal use only.
 
int m_TotalCuttingPlane
 For internal use only.
 
int m_TotalCylinders
 For internal use only.
 
int m_TotalDistantLight
 For internal use only.
 
int m_TotalEllipse
 For internal use only.
 
int m_TotalEllipticalArc
 For internal use only.
 
int m_TotalFaces
 For internal use only.
 
int m_TotalGrid
 For internal use only.
 
int m_TotalImage
 For internal use only.
 
int m_TotalIncluders
 For internal use only.
 
int m_TotalIncludes
 For internal use only.
 
int m_TotalInfiniteLines
 For internal use only.
 
int m_TotalInfiniteRays
 For internal use only.
 
int m_TotalLine
 For internal use only.
 
int m_TotalLocalLight
 For internal use only.
 
int m_TotalMarker
 For internal use only.
 
int m_TotalMatrices
 For internal use only.
 
int m_TotalMesh
 For internal use only.
 
int m_TotalNURBSCurves
 For internal use only.
 
int m_TotalNURBSSurfaces
 For internal use only.
 
int m_TotalOthers
 For internal use only.
 
int m_TotalPolyCylinders
 For internal use only.
 
int m_TotalPolygon
 For internal use only.
 
int m_TotalPolyline
 For internal use only.
 
int m_TotalReferences
 For internal use only.
 
int m_TotalSegments
 For internal use only.
 
int m_TotalShell
 For internal use only.
 
int m_TotalSpheres
 For internal use only.
 
int m_TotalSpotLight
 For internal use only.
 
int m_TotalStringCursor
 For internal use only.
 
int m_TotalText
 For internal use only.
 
int m_TotalTriangles
 For internal use only.
 
int m_TotalTristrips
 For internal use only.
 
int m_TotalVertices
 For internal use only.
 

Detailed Description

The HModelInfo class computes and stores model information.

HModelInfo encapusulates information associated with a model. It provides routines that search and compute the contents of a given HOOPS sub-tree. Classes that implement custom model information routines should be derived from HModelInfo.

Constructor & Destructor Documentation

HModelInfo::HModelInfo ( HC_KEY  segment_key = INVALID_KEY)
inline

Constructs an HModelInfo object.

Member Function Documentation

virtual void HModelInfo::ComputeModelInfo ( HC_KEY  segment_key = INVALID_KEY,
bool  recurse = true 
)
virtual

ComputeModelInfo performs a contents search on a Hoops sub-tree. The search begins at the segment passed with the argument list and continues into and all of the direct and included sub-segments, counting each type of geometric primitive in these segments. Geometry totals can be accessed through the HModelInfo Get routines, or manipulated by derived classes.

Parameters
segment_keyThe key of segment where the search should start.
virtual void HModelInfo::ComputeSegmentContents ( HC_KEY  the_key,
bool  recurse = true 
)
protectedvirtual

For internal use only.

int HModelInfo::GetTotalCircle ( void  )
inline
Returns
The sum of all circles in the model.
int HModelInfo::GetTotalCircularArc ( void  )
inline
Returns
The sum of all circular arcs in the model.
int HModelInfo::GetTotalCircularChord ( void  )
inline
Returns
The sum of all circular chords in the model.
int HModelInfo::GetTotalCircularWedge ( void  )
inline
Returns
The sum of all circular wedges in the model.
int HModelInfo::GetTotalCuttingPlane ( void  )
inline
Returns
The sum of all cutting planes in the model.
int HModelInfo::GetTotalCylinders ( void  )
inline
Returns
The sum of all cylinders in the model.
int HModelInfo::GetTotalDistantLight ( void  )
inline
Returns
The sum of all distant lights in the model.
int HModelInfo::GetTotalEllipse ( void  )
inline
Returns
The sum of all ellipses in the model.
int HModelInfo::GetTotalEllipticalArc ( void  )
inline
Returns
The sum of all elliptical arcs in the model.
int HModelInfo::GetTotalFaces ( void  )
inline
Returns
The sum of all faces in meshes and shells plus the polygon total.
int HModelInfo::GetTotalGrid ( void  )
inline
Returns
The sum of all grids in the model.
int HModelInfo::GetTotalImage ( void  )
inline
Returns
The sum of all images in the model.
int HModelInfo::GetTotalIncluders ( void  )
inline
Returns
The sum of all includer of the model.
int HModelInfo::GetTotalIncludes ( void  )
inline
Returns
The sum of all includes in the model.
int HModelInfo::GetTotalInfiniteLines ( void  )
inline
Returns
The sum of all infinite lines in the model.
int HModelInfo::GetTotalInfiniteRays ( void  )
inline
Returns
The sum of all infinite rays in the model.
int HModelInfo::GetTotalLine ( void  )
inline
Returns
The sum of all lines in the model.
int HModelInfo::GetTotalLocalLight ( void  )
inline
Returns
The sum of all local lights in the model.
int HModelInfo::GetTotalMarker ( void  )
inline
Returns
The sum of all markers in the model.
int HModelInfo::GetTotalMatrices ( void  )
inline
Returns
The sum of all modelling matrices in the model.
int HModelInfo::GetTotalMesh ( void  )
inline
Returns
The sum of all meshes in the model.
int HModelInfo::GetTotalNURBSCurves ( void  )
inline
Returns
The sum of all NURBS curves in the model.
int HModelInfo::GetTotalNURBSSurfaces ( void  )
inline
Returns
The sum of all NURBS surfaces in the model.
int HModelInfo::GetTotalOthers ( void  )
inline
Returns
The sum of all other items in the model (SHOULD ALWAYS BE ZERO).
int HModelInfo::GetTotalPolyCylinders ( void  )
inline
Returns
The sum of all polycylinders in the model.
int HModelInfo::GetTotalPolygon ( void  )
inline
Returns
The sum of all polygons in the model.
int HModelInfo::GetTotalPolyline ( void  )
inline
Returns
The sum of all polylines in the model.
int HModelInfo::GetTotalReferences ( void  )
inline
Returns
The sum of all references in the model.
int HModelInfo::GetTotalSegments ( void  )
inline
Returns
The sum of all segments in the model.
int HModelInfo::GetTotalShell ( void  )
inline
Returns
The sum of all shells in the model.
int HModelInfo::GetTotalSpheres ( void  )
inline
Returns
The sum of all spheres in the model.
int HModelInfo::GetTotalSpotLight ( void  )
inline
Returns
The sum of all spot lights in the model.
int HModelInfo::GetTotalStringCursor ( void  )
inline
Returns
The sum of all string cursors in the model.
int HModelInfo::GetTotalText ( void  )
inline
Returns
The sum of all text strings in the model.
int HModelInfo::GetTotalTriangles ( void  )
inline
Returns
The result of (total_vertices/total_faces - 2) * total_faces.
int HModelInfo::GetTotalTristrips ( void  )
inline
Returns
The total tristrip count.
int HModelInfo::GetTotalVertices ( void  )
inline
Returns
The sum of all vertices in meshes, each shell face and all polygons.
virtual void HModelInfo::IncrementCounter ( char *  item_type,
HC_KEY  item_key 
)
protectedvirtual

For internal use only.

Increments the number of primitives in a given count. Used internally by ComputeModelInfo(), but can be used in derived classes.

Parameters
item_typeType of the primitive to increment in the count (see HC_Begin_Contents_Search for types)
item_keyHOOPS key to any geometry. In this case, "key" is used only for polygons, shells, and meshes in order to calculate the sub-primitives and increment their numbers.
virtual void HModelInfo::ResetCounters ( )
protectedvirtual

For internal use only.

Initializes the number of primitives in a the count to zero. Used internally by ComputeModelInfo(), but can be useful in derived classes.


The documentation for this class was generated from the following file: