Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MGraphic3D
Inherited By:
None.
Purpose:
TRoundedCylinder3D is a concrete class derived from MGraphic3D that represents a cylindrical surface whose edges are rounded. The cylinder 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 radius and height of the cylinder, 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 cylinder can also be generated by using TSweep3D, but such an object can easily be altered beyond recognition. If you need to manipulate the cylinder in ways not provided by the TRoundedCylinder3D member functions, you can invoke TRoundedCylinder3D::CreateSweepSurface to access a TSweep3D with the same geometry and attributes as the TRoundedCylinder3D.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TRoundedCylinder3D ()
- TRoundedCylinder3D (GCoordinate radius, GCoordinate height, GCoordinate roundRadius, TGrafBundle3D * adoptBundle =NIL)
- TRoundedCylinder3D (const TRoundedCylinder3D & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TRoundedCylinder3D from the specified radius and height. Adopts the specified attribute bundle.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and directly.
- Call this function directly.
- Called to copy an object.
Parameters:
- Takes no parameters.
- GCoordinate radius -The radius for the new rounded cylinder.
- GCoordinate height -The height for the new rounded cylinder.
- GCoordinate roundRadius -The radius of the rounded edge for the new rounded cylinder.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- const TRoundedCylinder3D & copy -The rounded cylinder to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TRoundedCylinder3D ()
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.
virtual void Draw (TGrafPort & port) const
Interface Category:
API.
Purpose:
Draws this TRoundedCylinder3D 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:
- TGrafPort & port -The port to which drawing should go. The port in turn invokes rendering on a particular TGrafDevice.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TRoundedCylinder3D::GetGeometricBounds
virtual TGBox3D GetGeometricBounds () const
Interface Category:
API.
Purpose:
Returns this TRoundedCylinder3D's bounding box, without considering any volume added by its bundle.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the bounding box of the rounded cylinder'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 this TRoundedCylinder3D's shape and position by applying the specified transformation matrix.
Calling Context:
Call this function directly.
Parameters:
- const TGrafMatrix3D & matrix -The transformation matrix by which the graphic's points are multiplied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetCylinderRadius (GCoordinate radius)
Interface Category:
API.
Purpose:
Sets this TRoundedCylinder3D's radius to the specified value.
Calling Context:
Call this function directly.
Parameters:
- GCoordinate radius -The new value for the rounded cylinder's radius.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetRoundRadius (GCoordinate roundRadius)
Interface Category:
API.
Purpose:
Sets this TRoundedCylinder3D's rounding radius to the specified value. (The rounding radius is used for rounding the edges of the cylinder.)
Calling Context:
Call this function directly.
Parameters:
- GCoordinate roundRadius -The new value for the rounded cylinder's rounding radius.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetHeight (GCoordinate height)
Interface Category:
API.
Purpose:
Sets this TRoundedCylinder3D's height to the specified value.
Calling Context:
Call this function directly.
Parameters:
- GCoordinate height -The new value for the rounded cylinder's height.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual GCoordinate GetCylinderRadius () const
Interface Category:
API.
Purpose:
Gets this TRoundedCylinder3D's radius.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the rounded cylinder's radius.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual GCoordinate GetRoundRadius () const
Interface Category:
API.
Purpose:
Gets this TRoundedCylinder3D's rounding radius. (The rounding radius is used for rounding the edges of the cylinder.)
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the cylinder's rounding radius.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual GCoordinate GetHeight () const
Interface Category:
API.
Purpose:
Gets this TRoundedCylinder3D's height.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the rounded cylinder's height.
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 -Thestream the object streams itself 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.
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 the object streams itself 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.
TRoundedCylinder3D & operator =(const TRoundedCylinder3D & 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: TRoundedCylinder3D::CreateSweepSurface
virtual TSweep3D * CreateSweepSurface () const
Interface Category:
API.
Purpose:
Creates and returns a TSweep3D from this TRoundedCylinder3D. 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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.