Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MGraphic3D
Inherited By:
None.
Purpose:
TExtrusion3D is a concrete class derived from MGraphic3D that generates a 3-D surface from a 2-D extrusion curve. The extrusion curve is any 2-D curve in the x-y plane and is extruded in a direction parallel to the z-axis of the world coordinate system. The result is a surface whose shape can resemble a cookie cutter. For example, a circular extrusion curve generates a cylinder. The resulting shape can be reoriented by applying a transformation matrix.
This mechanism is very similar to TSweep3D, but is less general because a TSweep3D trajectory can be any 3-D curve, and because TSweep3D provides means to warp the shape beyond recognition. If you need to manipulate the shape in ways not provided by the TExtrusion3D member functions, you can invoke TExtrusion3D::CreateSweepSurface to access a TSweep3D with the same geometry and attributes as the TExtrusion3D.
Member functions are provided to set and get the extrusion curve and the height. In addition, all the standard MGraphic3D member functions are implemented (Draw, GetGeometricBounds, TransformBy, and so on).
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TExtrusion3D ()
- TExtrusion3D (const TGCurve & extrusionCurve, GCoordinate height, TGrafBundle3D * adoptBundle =NIL)
- TExtrusion3D (const TExtrusion3D & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TExtrusion3D from the specified curve 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.
- const TGCurve & extrusionCurve -The curve to be extruded.
- GCoordinate height -The height of the extrusion. This is analogous to the trajectory in a TSweep3D, but it is pointing straight up at the z-coordinate.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- const TExtrusion3D & copy -The extrusion to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TExtrusion3D ()
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 TExtrusion3D 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 extrusion to.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TExtrusion3D::GetGeometricBounds
virtual TGBox3D GetGeometricBounds () const
Interface Category:
API.
Purpose:
Gets this TExtrusion3D'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 extrusion's geometry.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TExtrusion3D::TransformBy
virtual void TransformBy (const TGrafMatrix3D & matrix)
Interface Category:
API.
Purpose:
Transforms this TExtrusion3D'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: TExtrusion3D::SetExtrusionCurve
virtual void SetExtrusionCurve (const TGCurve & extrusionCurve)
Interface Category:
API.
Purpose:
Sets this TExtrusion3D's extrusion curve to the specified value.
Calling Context:
Call this function directly.
Parameters:
- const TGCurve & extrusionCurve -The curve to be used in the extrusion.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TExtrusion3D::SetHeight
virtual void SetHeight (GCoordinate height)
Interface Category:
API.
Purpose:
Sets this TExtrusion3D's height to the specified value.
Calling Context:
Call this function directly.
Parameters:
- GCoordinate height -The new height for the extrusion.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TExtrusion3D::GetExtrusionCurve
virtual const TGCurve * GetExtrusionCurve () const
Interface Category:
API.
Purpose:
Gets this TExtrusion3D's extrusion curve.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the extrusion curve.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TExtrusion3D::GetHeight
virtual GCoordinate GetHeight () const
Interface Category:
API.
Purpose:
Gets this TExtrusion3D's height.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the height of the extrusion.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TExtrusion3D::CreateSweepSurface
virtual TSweep3D * CreateSweepSurface () const
Interface Category:
API.
Purpose:
Creates and returns a TSweep3D from this TExtrusion3D. 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 extrusion.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TExtrusion3D::operator=
TExtrusion3D & operator =(const TExtrusion3D & 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: TExtrusion3D::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: TExtrusion3D::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.