Class: TRoundedBox3D

Declaration: Sweep3D.h

Taxonomy Categories:

Member Functions:


Member Functions:


Interface Category:

API.

Inherits From:

MGraphic3D

Inherited By:

None.

Purpose:

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Class: TRoundedBox3D

Declaration: Sweep3D.h

Taxonomy Categories:

Member Functions:


Member Functions:


Interface Category:

API.

Inherits From:

MGraphic3D

Inherited By:

None.

Purpose:

TRoundedBox3D is a concrete class derived from MGraphic3D that represents a rectangular prism whose edges are rounded. The box tapers smoothly to its two ends, such that its cross section is a rounded rectangle, not a regular rectangle. Each corner of this rounded rectangle is a quarter-circle arc; all corners are the same size. Member functions are provided to set and get the side length and height of the box, as well as the radius of arc that rounds the edges. In addition, all the standard MGraphic3D member functions are implemented (Draw, GetGeometricBounds, TransformBy, and so on). A rounded box can also be generated by using TSweep3D, but such an object can easily be altered beyond recognition. If you need to manipulate the box in ways not provided by the TRoundedBox3D member functions, you can invoke TRoundedBox3D::CreateSweepSurface to access a TSweep3D with the same geometry and attributes as the TRoundedBox3D.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TRoundedBox3D::TRoundedBox3D

  1. TRoundedBox3D ()
  2. TRoundedBox3D (GCoordinate side, GCoordinate height, GCoordinate roundRadius, TGrafBundle3D * adoptBundle =NIL)
  3. TRoundedBox3D (const TRoundedBox3D & copy)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a TRoundedBox3D from the specified side length and height. Adopts the specified attribute bundle.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and directly
  2. Call this function directly.
  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: TRoundedBox3D::~TRoundedBox3D

virtual ~ TRoundedBox3D ()

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: TRoundedBox3D::Draw

virtual void Draw (TGrafPort & port) const

Interface Category:

API.

Purpose:

Draws this TRoundedBox3D to the specific TGrafPort. Attributes in the graphic's bundle override those already provided in the port (if any).

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: TRoundedBox3D::GetGeometricBounds

virtual TGBox3D GetGeometricBounds () const

Interface Category:

API.

Purpose:

Gets this TRoundedBox3D's bounding box, without considering any effect of the bundle attributes.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the bounding box of the box's geometry.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRoundedBox3D::TransformBy

virtual void TransformBy (const TGrafMatrix3D & matrix)

Interface Category:

API.

Purpose:

Transforms this TRoundedBox3D's shape and position 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: TRoundedBox3D::SetSide

virtual void SetSide (GCoordinate side)

Interface Category:

API.

Purpose:

Sets this TRoundedBox3D's side length to the specified value.

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: TRoundedBox3D::SetHeight

virtual void SetHeight (GCoordinate height)

Interface Category:

API.

Purpose:

Sets this TRoundedBox3D's height to the specified value.

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: TRoundedBox3D::SetRoundRadius

virtual void SetRoundRadius (GCoordinate roundRadius)

Interface Category:

API.

Purpose:

Sets this TRoundedBox3D's rounding radius to the specified value. (The rounding radius is used for rounding the edges of the box.)

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: TRoundedBox3D::GetSide

virtual GCoordinate GetSide () const

Interface Category:

API.

Purpose:

Gets this TRoundedBox3D's side length.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the rounded box's radius.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRoundedBox3D::GetHeight

virtual GCoordinate GetHeight () const

Interface Category:

API.

Purpose:

Gets this TRoundedBox3D's height.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the rounded box's height.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRoundedBox3D::GetRoundRadius

virtual GCoordinate GetRoundRadius () const

Interface Category:

API.

Purpose:

Gets this TCone3D's height.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the cone's height.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRoundedBox3D::CreateSweepSurface

virtual TSweep3D * CreateSweepSurface () const

Interface Category:

API.

Purpose:

Creates and returns a TSweep3D from this TRoundedBox3D. This allows you to manipulate the cone in ways not permitted by its member functions.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a sweep that corresponds to the cylinder.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRoundedBox3D::operator=

TRoundedBox3D & operator =(const TRoundedBox3D & 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: TRoundedBox3D::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: TRoundedBox3D::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.