Class: TGraphicGroup3D

Declaration: Graphics3D.h

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.

Member Function: TGraphicGroup3D::TGraphicGroup3D

  1. TGraphicGroup3D ()
  2. TGraphicGroup3D (const TGraphicGroup3D & copy)
  3. TGraphicGroup3D (TGrafBundle3D * adoptedBundle)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.
  3. Creates a new graphics group member with an adopted attribute bundle.

Calling Context:

  1. Called by the stream-in operators and directly.
  2. Called to copy an object.
  3. Called to add to a group a graphic member that has an associated attribute bundle.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGraphicGroup3D::~TGraphicGroup3D

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.

Member Function: TGraphicGroup3D::AdoptFirst

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.

Member Function: TGraphicGroup3D::AdoptLast

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.

Member Function: TGraphicGroup3D::Orphan

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:

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.

Member Function: TGraphicGroup3D::OrphanFirst

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.

Member Function: TGraphicGroup3D::OrphanLast

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.

Member Function: TGraphicGroup3D::Count

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.

Member Function: TGraphicGroup3D::Draw

virtual void Draw (TGrafPort & port) const

Interface Category:

API.

Purpose:

Draws this TGraphicGroup3D to the specified grafport.

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.

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.

Member Function: TGraphicGroup3D::TransformBy

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGraphicGroup3D::SetMatrix

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.

Member Function: TGraphicGroup3D::GetMatrix

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.

Member Function: TGraphicGroup3D::operator==

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:

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.

Member Function: TGraphicGroup3D::operator!=

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:

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.

Member Function: TGraphicGroup3D::operator=

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.

Member Function: TGraphicGroup3D::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: TGraphicGroup3D::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.