Class: TGraphicHierarchy3D

Declaration: Graphics3D.h

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.

Member Function: TGraphicHierarchy3D::~TGraphicHierarchy3D

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.

Member Function: TGraphicHierarchy3D::Draw

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function.

Member Function: TGraphicHierarchy3D::GetGeometricBounds

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.

Member Function: TGraphicHierarchy3D::TransformBy

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function.

Member Function: TGraphicHierarchy3D::operator>>=

virtual TStream & operator >>=(TStream & towhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

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.

Member Function: TGraphicHierarchy3D::operator<<=

virtual TStream & operator <<= (TStream & fromwhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

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.

Member Function: TGraphicHierarchy3D::TGraphicHierarchy3D

  1. TGraphicHierarchy3D ()
  2. TGraphicHierarchy3D (TGrafBundle3D * adoptBundle)
  3. TGraphicHierarchy3D (const TGraphicHierarchy3D & copy)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a TGraphicHierarchy3D and adopts the specified attribute bundle.
  3. Copy constructor.

Calling Context:

  1. 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.
  2. Call this function directly. Note that this applies only to concrete derived classes because this class is abstract.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGraphicHierarchy3D::operator=

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.