ShapeHierarchy Class Reference
 
 
 
ShapeHierarchy Class Reference

This reference page is linked to from the following overview topics: Capping a Shape with a Mesh, Capping a Shape with a Patch.


#include <shphier.h>

Inheritance diagram for ShapeHierarchy:
MaxHeapOperators

Class Description

See also:
Class GenericHierarchy, Class BitArray.

Description:
This class stores the hierarchy tree of a shape object. In addition it stores a BitArray with an entry for each polygon in the shape which indicates whether that polygon should be reversed in order to provide the proper clockwise/counterclockwise ordering for the nested shapes. All methods of this class are implemented by the system.
Data Members:
GenericHierarchy hier;

Describes the hierarchy.

BitArray reverse;

Indicates whether that polygon should be reversed in order to provide the proper clockwise / counterclockwise ordering for the nested shapes. There is one bit in the bit array for every polygon in the shape. For example, if you pass in two nested circles and they are both clockwise, the outermost circle will have its reverse bit set to indicate it should be reversed in order to be properly extruded or lofted. This is because for nested shapes the outermost circle should be counterclockwise.

Public Member Functions

  ShapeHierarchy ()
  ShapeHierarchy (int polys)
void  New (int polys=0)
ShapeHierarchy operator= (ShapeHierarchy &from)

Public Attributes

GenericHierarchy  hier
BitArray  reverse

Constructor & Destructor Documentation

ShapeHierarchy ( ) [inline]
Remarks:
Constructor. No initialization is performed.
{}
ShapeHierarchy ( int  polys ) [inline]
Remarks:
Constructor. This constructor clears out the hierarchy, sets the number of polygons to poly and clears all the bits in the BitArray.
Parameters:
int polys

The number of polygons in the hierarchy.
{ New(polys); }

Member Function Documentation

void New ( int  polys = 0 ) [inline]
Remarks:
This methods clears out the hierarchy, sets the number of polygons to poly and clears all the bits in the BitArray.
Parameters:
int polys = 0

The number of polygons in the hierarchy.
Operators:
{ hier.New(); reverse.SetSize(polys); reverse.ClearAll(); }
ShapeHierarchy& operator= ( ShapeHierarchy from ) [inline]
Remarks:
Assignment operator.
Parameters:
ShapeHierarchy &from

The source shape hierarchy.
{ hier=from.hier; reverse=from.reverse; return *this; }

Member Data Documentation