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)
 
unsigned long GetTotalCircle ()
 
unsigned long GetTotalCircularArc ()
 
unsigned long GetTotalCircularChord ()
 
unsigned long GetTotalCircularWedge ()
 
unsigned long GetTotalCuttingPlane ()
 
unsigned long GetTotalCylinders ()
 
unsigned long GetTotalDistantLight ()
 
unsigned long GetTotalEllipse ()
 
unsigned long GetTotalEllipticalArc ()
 
unsigned long GetTotalFaces ()
 
unsigned long GetTotalGrid ()
 
unsigned long GetTotalImage ()
 
unsigned long GetTotalIncluders ()
 
unsigned long GetTotalIncludes ()
 
unsigned long GetTotalInfiniteLines ()
 
unsigned long GetTotalInfiniteRays ()
 
unsigned long GetTotalLine ()
 
unsigned long GetTotalLocalLight ()
 
unsigned long GetTotalMarker ()
 
unsigned long GetTotalMatrices ()
 
unsigned long GetTotalMesh ()
 
unsigned long GetTotalNURBSCurves ()
 
unsigned long GetTotalNURBSSurfaces ()
 
unsigned long GetTotalOthers ()
 
unsigned long GetTotalPolyCylinders ()
 
unsigned long GetTotalPolygon ()
 
unsigned long GetTotalPolyline ()
 
unsigned long GetTotalReferences ()
 
unsigned long GetTotalSegments ()
 
unsigned long GetTotalShell ()
 
unsigned long GetTotalSpheres ()
 
unsigned long GetTotalSpotLight ()
 
unsigned long GetTotalStringCursor ()
 
unsigned long GetTotalText ()
 
unsigned long GetTotalTriangles ()
 
unsigned long GetTotalTristrips ()
 
unsigned long GetTotalVertices ()
 
 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 IncrementCounters ()
 
virtual void ResetCounters ()
 

Protected Attributes

HC_KEY m_SegmentKey
 For internal use only
 
unsigned long m_TotalCircle
 For internal use only.
 
unsigned long m_TotalCircularArc
 For internal use only.
 
unsigned long m_TotalCircularChord
 For internal use only.
 
unsigned long m_TotalCircularWedge
 For internal use only.
 
unsigned long m_TotalCuttingPlane
 For internal use only.
 
unsigned long m_TotalCylinders
 For internal use only.
 
unsigned long m_TotalDistantLight
 For internal use only.
 
unsigned long m_TotalEllipse
 For internal use only.
 
unsigned long m_TotalEllipticalArc
 For internal use only.
 
unsigned long m_TotalFaces
 For internal use only.
 
unsigned long m_TotalGrid
 For internal use only.
 
unsigned long m_TotalImage
 For internal use only.
 
unsigned long m_TotalIncluders
 For internal use only.
 
unsigned long m_TotalIncludes
 For internal use only.
 
unsigned long m_TotalInfiniteLines
 For internal use only.
 
unsigned long m_TotalInfiniteRays
 For internal use only.
 
unsigned long m_TotalLine
 For internal use only.
 
unsigned long m_TotalLocalLight
 For internal use only.
 
unsigned long m_TotalMarker
 For internal use only.
 
unsigned long m_TotalMatrices
 For internal use only.
 
unsigned long m_TotalMesh
 For internal use only.
 
unsigned long m_TotalNURBSCurves
 For internal use only.
 
unsigned long m_TotalNURBSSurfaces
 For internal use only.
 
unsigned long m_TotalOthers
 For internal use only.
 
unsigned long m_TotalPolyCylinders
 For internal use only.
 
unsigned long m_TotalPolygon
 For internal use only.
 
unsigned long m_TotalPolyline
 For internal use only.
 
unsigned long m_TotalReferences
 For internal use only.
 
unsigned long m_TotalSegments
 For internal use only.
 
unsigned long m_TotalShell
 For internal use only.
 
unsigned long m_TotalSpheres
 For internal use only.
 
unsigned long m_TotalSpotLight
 For internal use only.
 
unsigned long m_TotalStringCursor
 For internal use only.
 
unsigned long m_TotalText
 For internal use only.
 
unsigned long m_TotalTriangles
 For internal use only.
 
unsigned long m_TotalTristrips
 For internal use only.
 
unsigned long 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::HModelInfo ( HC_KEY  segment_key = INVALID_KEY)
inline

Constructs an HModelInfo object.

Member Function Documentation

◆ ComputeModelInfo()

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.

◆ ComputeSegmentContents()

virtual void HModelInfo::ComputeSegmentContents ( HC_KEY  the_key,
bool  recurse = true 
)
protectedvirtual

For internal use only.

◆ GetTotalCircle()

unsigned long HModelInfo::GetTotalCircle ( )
inline
Returns
The sum of all circles in the model.

◆ GetTotalCircularArc()

unsigned long HModelInfo::GetTotalCircularArc ( )
inline
Returns
The sum of all circular arcs in the model.

◆ GetTotalCircularChord()

unsigned long HModelInfo::GetTotalCircularChord ( )
inline
Returns
The sum of all circular chords in the model.

◆ GetTotalCircularWedge()

unsigned long HModelInfo::GetTotalCircularWedge ( )
inline
Returns
The sum of all circular wedges in the model.

◆ GetTotalCuttingPlane()

unsigned long HModelInfo::GetTotalCuttingPlane ( )
inline
Returns
The sum of all cutting planes in the model.

◆ GetTotalCylinders()

unsigned long HModelInfo::GetTotalCylinders ( )
inline
Returns
The sum of all cylinders in the model.

◆ GetTotalDistantLight()

unsigned long HModelInfo::GetTotalDistantLight ( )
inline
Returns
The sum of all distant lights in the model.

◆ GetTotalEllipse()

unsigned long HModelInfo::GetTotalEllipse ( )
inline
Returns
The sum of all ellipses in the model.

◆ GetTotalEllipticalArc()

unsigned long HModelInfo::GetTotalEllipticalArc ( )
inline
Returns
The sum of all elliptical arcs in the model.

◆ GetTotalFaces()

unsigned long HModelInfo::GetTotalFaces ( )
inline
Returns
The sum of all faces in meshes and shells plus the polygon total.

◆ GetTotalGrid()

unsigned long HModelInfo::GetTotalGrid ( )
inline
Returns
The sum of all grids in the model.

◆ GetTotalImage()

unsigned long HModelInfo::GetTotalImage ( )
inline
Returns
The sum of all images in the model.

◆ GetTotalIncluders()

unsigned long HModelInfo::GetTotalIncluders ( )
inline
Returns
The sum of all includer of the model.

◆ GetTotalIncludes()

unsigned long HModelInfo::GetTotalIncludes ( )
inline
Returns
The sum of all includes in the model.

◆ GetTotalInfiniteLines()

unsigned long HModelInfo::GetTotalInfiniteLines ( )
inline
Returns
The sum of all infinite lines in the model.

◆ GetTotalInfiniteRays()

unsigned long HModelInfo::GetTotalInfiniteRays ( )
inline
Returns
The sum of all infinite rays in the model.

◆ GetTotalLine()

unsigned long HModelInfo::GetTotalLine ( )
inline
Returns
The sum of all lines in the model.

◆ GetTotalLocalLight()

unsigned long HModelInfo::GetTotalLocalLight ( )
inline
Returns
The sum of all local lights in the model.

◆ GetTotalMarker()

unsigned long HModelInfo::GetTotalMarker ( )
inline
Returns
The sum of all markers in the model.

◆ GetTotalMatrices()

unsigned long HModelInfo::GetTotalMatrices ( )
inline
Returns
The sum of all modelling matrices in the model.

◆ GetTotalMesh()

unsigned long HModelInfo::GetTotalMesh ( )
inline
Returns
The sum of all meshes in the model.

◆ GetTotalNURBSCurves()

unsigned long HModelInfo::GetTotalNURBSCurves ( )
inline
Returns
The sum of all NURBS curves in the model.

◆ GetTotalNURBSSurfaces()

unsigned long HModelInfo::GetTotalNURBSSurfaces ( )
inline
Returns
The sum of all NURBS surfaces in the model.

◆ GetTotalOthers()

unsigned long HModelInfo::GetTotalOthers ( )
inline
Returns
The sum of all other items in the model (SHOULD ALWAYS BE ZERO).

◆ GetTotalPolyCylinders()

unsigned long HModelInfo::GetTotalPolyCylinders ( )
inline
Returns
The sum of all polycylinders in the model.

◆ GetTotalPolygon()

unsigned long HModelInfo::GetTotalPolygon ( )
inline
Returns
The sum of all polygons in the model.

◆ GetTotalPolyline()

unsigned long HModelInfo::GetTotalPolyline ( )
inline
Returns
The sum of all polylines in the model.

◆ GetTotalReferences()

unsigned long HModelInfo::GetTotalReferences ( )
inline
Returns
The sum of all references in the model.

◆ GetTotalSegments()

unsigned long HModelInfo::GetTotalSegments ( )
inline
Returns
The sum of all segments in the model.

◆ GetTotalShell()

unsigned long HModelInfo::GetTotalShell ( )
inline
Returns
The sum of all shells in the model.

◆ GetTotalSpheres()

unsigned long HModelInfo::GetTotalSpheres ( )
inline
Returns
The sum of all spheres in the model.

◆ GetTotalSpotLight()

unsigned long HModelInfo::GetTotalSpotLight ( )
inline
Returns
The sum of all spot lights in the model.

◆ GetTotalStringCursor()

unsigned long HModelInfo::GetTotalStringCursor ( )
inline
Returns
The sum of all string cursors in the model.

◆ GetTotalText()

unsigned long HModelInfo::GetTotalText ( )
inline
Returns
The sum of all text strings in the model.

◆ GetTotalTriangles()

unsigned long HModelInfo::GetTotalTriangles ( )
inline
Returns
The result of (total_vertices/total_faces - 2) * total_faces.

◆ GetTotalTristrips()

unsigned long HModelInfo::GetTotalTristrips ( )
inline
Returns
The total tristrip count.

◆ GetTotalVertices()

unsigned long HModelInfo::GetTotalVertices ( )
inline
Returns
The sum of all vertices in meshes, each shell face and all polygons.

◆ IncrementCounter()

virtual void HModelInfo::IncrementCounter ( char *  item_type,
HC_KEY  item_key 
)
protectedvirtual

no longer used internally, 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.

◆ IncrementCounters()

virtual void HModelInfo::IncrementCounters ( )
protectedvirtual

For internal use only. Used internally by ComputeModelInfo(), but can be used in derived classes. Increments the counters for geometry of various types based on the return values of Show_Existence

◆ ResetCounters()

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: