Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MGraphic3D
Inherited By:
TGraphicGroup3D
Purpose:
TGraphicHierarchy3D is an abstract base class that defines a hierarchy protocol for 3-D graphics that are grouped into a conglomerate graphic. This protocol creates an iterator that allows hierarchies of graphics to traverse themselves, accessing the MGraphic3D at each node. TGraphicHierarchy3D corresponds directly to the 2-D class TGraphicHierarchy.
All that TGraphicHierarchy3D adds to its base class, MGraphic3D, is the pure virtual function CreateIterator. Derived classes override CreateIterator to return an iterator object (itself derived from TGraphicIterator3D). The iterator implements a standard set of member functions needed to access the MGraphic3Ds in the hierarchy.
TGraphicHierarchy3D has a concrete derived class, TGraphicGroup3D, which implements a graphic's hierarchy as a tree structure. If necessary, you can create other derived classes of TGraphicHierarchy3D to implement hierarchies using other sorts of data structures, with corresponding iterators.
Instantiation:
Abstract class; do not allocate.
Deriving Classes:
Provided class: TGraphicGroup3D.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ TGraphicHierarchy3D ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicHierarchy3D::CreateGraphicIterator
virtual TGraphicIterator3D * CreateGraphicIterator () const
Interface Category:
API.
Purpose:
Creates a TGraphicIterator3D that can traverse the hierarchy.
Calling Context:
Call this function directly. Note that this applies only to concrete derived classes because this function is pure virtual.
Parameters:
Return Value:
Returns a TGraphicIterator3D.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This is a pure virtual function.
virtual void Draw (TGrafPort & port) const
Interface Category:
API.
Purpose:
Draws this TGraphicHierarchy3D to the specified grafport.
Calling Context:
Call this function directly. Note that this applies only to concrete derived classes because this function is pure virtual.
Parameters:
- TGrafPort & port -The port to draw the object to.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This is a pure virtual function.
virtual TGBox3D GetGeometricBounds () const
Interface Category:
API.
Purpose:
Returns the bounding box of this TGraphicHierarchy3D's geometry, without considering any volume added by the bundle.
Calling Context:
Call this function directly. Note that this applies only to concrete derived classes because this function is pure virtual.
Parameters:
Return Value:
Returns the bounding box of the graphic's geometry.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This is a pure virtual function.
virtual void TransformBy (const TGrafMatrix3D & matrix)
Interface Category:
API.
Purpose:
Transforms the shape and position of this TGraphicHierarchy's graphics by applying the specified transformation matrix.
Calling Context:
Call this function directly. Note that this applies only to concrete derived classes because this function is pure virtual.
Parameters:
- const TGrafMatrix3D & matrix -The transformation matrix by which the graphic hierarchy's points are multiplied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This is a pure virtual function.
virtual TStream & operator >>=(TStream & towhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & towhere -The stream that the object is streamed out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream & fromwhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromwhere -The stream that the object is streamed in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TGraphicHierarchy3D ()
- TGraphicHierarchy3D (TGrafBundle3D * adoptBundle)
- TGraphicHierarchy3D (const TGraphicHierarchy3D & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TGraphicHierarchy3D and adopts the specified attribute bundle.
- Copy constructor.
Calling Context:
- Called by the stream-in operators. You can also call this function directly. Note that this applies only to concrete derived classes because this class is abstract.
- Call this function directly. Note that this applies only to concrete derived classes because this class is abstract.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TGraphicHierarchy3D & operator =(const TGraphicHierarchy3D & source)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.