Class ShapeHierarchy
See Also: Class GenericHierarchy, Class BitArray.
class ShapeHierarchy
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:
public:
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.
Methods:
Prototype:
ShapeHierarchy();
Remarks:
Constructor. No initialization is performed.
Prototype:
ShapeHierarchy(int polys);
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.
Prototype:
void New(int polys = 0);
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:
Prototype:
ShapeHierarchy &operator=(ShapeHierarchy &from);
Remarks:
Assignment operator.
Parameters:
ShapeHierarchy &from
The source shape hierarchy.