Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MGraphic3D
Inherited By:
None.
Purpose:
TCone3D is a concrete class derived from MGraphic3D that represents a conical surface. Member functions are provided to set and get the radius and height. In addition, all the standard MGraphic3D member functions are implemented (Draw, GetGeometricBounds, TransformBy, and so on).
A cone can also be generated using TSweep3D, but such an object can easily be altered beyond recognition. If you need to manipulate the cone in ways not provided by the TCone3D member functions, you can invoke TCone3D::CreateSweepSurface to access a TSweep3D with the same geometry and attributes as the TCone3D.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TCone3D ()
- TCone3D (GCoordinate baseRadius, GCoordinate height, TGrafBundle3D * adoptBundle =NIL)
- TCone3D (const TCone3D & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TCone3D from the specified radius and height and 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 baseRadius -The radius of the base for the new cone.
- GCoordinate height -The height of the cone.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- const TCone3D & copy -The cone to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TCone3D ()
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: TCone3D::Draw
virtual void Draw (TGrafPort & port) const
Interface Category:
API.
Purpose:
Draws this TCone3D 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 draw the cone to.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TCone3D::GetGeometricBounds
virtual TGBox3D GetGeometricBounds () const
Interface Category:
API.
Purpose:
Gets this TCone3D'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 cone's geometry.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TCone3D::TransformBy
virtual void TransformBy (const TGrafMatrix3D & matrix)
Interface Category:
API.
Purpose:
Transforms this TCone3D'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: TCone3D::SetBaseRadius
virtual void SetBaseRadius (GCoordinate baseRadius)
Interface Category:
API.
Purpose:
Sets this TCone3D's base radius to the specified value.
Calling Context:
Call this function directly.
Parameters:
- GCoordinate baseRadius -The new value for the cone's base radius.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TCone3D::SetHeight
virtual void SetHeight (GCoordinate height)
Interface Category:
API.
Purpose:
Sets this TCone3D's height to the specified value.
Calling Context:
Call this function directly.
Parameters:
- GCoordinate height -The new value for the cone's height.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TCone3D::GetBaseRadius
virtual GCoordinate GetBaseRadius () const
Interface Category:
API.
Purpose:
Gets this TCone3D's base radius.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the cone's base radius.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TCone3D::GetHeight
virtual GCoordinate GetHeight () 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: TCone3D::CreateSweepSurface
virtual TSweep3D * CreateSweepSurface () const
Interface Category:
API.
Purpose:
Creates and returns a TSweep3D from this TCone3D. 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 cone.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TCone3D::operator=
TCone3D & operator =(const TCone3D & source)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
- const TCone3D & source -The cone to be copied.
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: TCone3D::operator>>=
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.
Member Function: TCone3D::operator<<=
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.