Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TGraphicHierarchy3D
Inherited By:
None.
Purpose:
TGraphicGroup3D is a concrete class, derived from TGraphicHierarchy3D, that implements a conglomeration of 3-D graphics as a tree structure. TGraphicGroup3D is directly analogous to the 2-D class TGraphicGroup. TGraphicGroup3D does not currently support non-tree data structures, such as Directed Acyclic Graphs (DAGs). A TGraphicGroup3D fully owns all of the MGraphic3Ds in its hierarchy: deleting the TGraphicGroup3D also deletes all its MGraphic3Ds.
TGraphicGroup3D creates a shallow iterator that traverses only one level of a tree structure. To iterate through the entire hierarchy of a TGraphicGroup3D, create the iterators recursively. In other words, use the TGraphicIterator3D member functions to access each node, creating a new iterator and traversing the hierarchy at that node.
TGraphicGroup3D has a transformation matrix that is used for transforming each MGraphic3D in the hierarchy when the MGraphic3D is rendered. Each time you invoke TGraphicGroup3D::TransformBy, the TGraphicGroup3D concatenates the specified matrix with the existing matrix.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TGraphicGroup3D ()
- TGraphicGroup3D (const TGraphicGroup3D & copy)
- TGraphicGroup3D (TGrafBundle3D * adoptedBundle)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
- Creates a new graphics group member with an adopted attribute bundle.
Calling Context:
- Called by the stream-in operators and directly.
- Called to copy an object.
- Called to add to a group a graphic member that has an associated attribute bundle.
Parameters:
- Takes no parameters.
- const TGraphicGroup3D & copy -The graphic group to be copied.
- TGrafBundle3D * adoptedBundle -The graphic attribute to be adopted by the new group member.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TGraphicGroup3D ()
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: TGraphicGroup3D::CreateGraphicIterator
virtual TGraphicIterator3D * CreateGraphicIterator () const
Interface Category:
API.
Purpose:
Creates an iterator for traversing this TGraphicGroup3D, and positions the iterator at the beginning of the hierarchy.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the iterator.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void AdoptFirst (MGraphic3D * child)
Interface Category:
API.
Purpose:
Adds the specified MGraphic3D at the beginning of this TGraphicGroup3D.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void AdoptLast (MGraphic3D * child)
Interface Category:
API.
Purpose:
Adds the specified MGraphic3D at the end of this TGraphicGroup3D.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual MGraphic3D * Orphan (const MGraphic3D & obj)
Interface Category:
API.
Purpose:
Removes the specified MGraphic3D from this TGraphicGroup3D, returning it to the caller.
Calling Context:
Call this function directly.
Parameters:
- const MGraphic3D & obj -The graphic to be orphaned.
Return Value:
Returns the orphaned graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The orphaned MGraphic3D is now the responsibility of the caller.
virtual MGraphic3D * OrphanFirst ()
Interface Category:
API.
Purpose:
Removes the first MGraphic3D in this TGraphicGroup3D, returning it to the caller.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the orphaned graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The orphaned MGraphic3D is now the responsibility of the caller.
virtual MGraphic3D * OrphanLast ()
Interface Category:
API.
Purpose:
Removes the last MGraphic3D in this TGraphicGroup3D, returning it to the caller.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the orphaned graphic.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
The orphaned MGraphic3D is now the responsibility of the caller.
virtual long Count () const
Interface Category:
API.
Purpose:
Determines the number of nodes in this TGraphicGroup3D.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the number of nodes (not just leaves) in this graphic group hierarchy.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void Draw (TGrafPort & port) const
Interface Category:
API.
Purpose:
Draws this TGraphicGroup3D to the specified grafport.
Calling Context:
Call this function directly.
Parameters:
- TGrafPort & port -The port to draw the graphic group to.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGraphicGroup3D::GetGeometricBounds
virtual TGBox3D GetGeometricBounds () const
Interface Category:
API.
Purpose:
Returns the bounding box of this TGraphicGroup3D's geometry, without considering any volume added by the bundle.
Calling Context:
Call this function directly.
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:
None.
virtual void TransformBy (const TGrafMatrix3D & matrix)
Interface Category:
API.
Purpose:
Transforms the shape and position of this TGraphicGroup3D's graphics by applying the specified transformation matrix.
Calling Context:
Call this function directly.
Parameters:
- const TGrafMatrix3D & matrix -The transformation matrix by which the graphic group hierarchy's points are multiplied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetMatrix (const TGrafMatrix3D & matrix)
Interface Category:
API.
Purpose:
Sets this TGraphicGroup3D's transformation matrix to the specified TGrafMatrix3D.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
const TGrafMatrix3D * GetMatrix () const
Interface Category:
API.
Purpose:
Gets this TGraphicGroup3D's transformation matrix.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns this graphic group hierarchy's transformation matrix.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
bool operator ==(const TGraphicGroup3D & source) const
Interface Category:
API.
Purpose:
Tests two TGraphicGroups for equality, by determining whether all the MGraphics in their hierarchies are equal.
Calling Context:
Call this function directly.
Parameters:
- const TGraphicGroup3D & source -The graphic group to be compared with this one.
Return Value:
Returns true if the transformation matrix, the bounds, and all the graphics in the two graphics groups are equal.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
bool operator != (const TGraphicGroup3D & source) const
Interface Category:
API.
Purpose:
Tests two TGraphicGroups for inequality, by determining whether all the MGraphics in their hierarchies are not equal.
Calling Context:
Call this function directly.
Parameters:
- const TGraphicGroup3D & source -The graphic group to be compared with this one.
Return Value:
Returns true if the transformation matrix, the bounds, or any of the graphics in the two graphics groups are not equal.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TGraphicGroup3D & operator =(const TGraphicGroup3D & 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.
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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.