![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MGraphic3D
Inherited By:
None.
Purpose:
TSurface3D provides a wrapper for the TGSurface3D geometry class, to which it adds the facilities inherited from MGraphic: an attribute bundle, matrix transformations, and hit detection. TSurface3D has a, not is a, TGSurface3D. A TGSurface3D defines a 3-D tensor product NURB surface of arbitrary order. Each of the TSurface3D member functions is straightforward, either because it overrides the MGraphic3D function of the same name, or because it simply invokes the TGSurface3D function of the same name.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TSurface3D ()
- TSurface3D (unsigned long OrderU, unsigned long OrderV, unsigned long NumPointsU, unsigned long NumPointsV, const TGRPoint3DArray & points, const TRawArray < GParametric > & knotsU, const TRawArray < GParametric > & knotsV, const TGLoop & TrimCurve =TGSurface3D :: GetEmptyLoop (), TGrafBundle3D * adoptBundle =NIL)
- TSurface3D (unsigned long OrderU, unsigned long OrderV, unsigned long NumPointsU, unsigned long NumPointsV, const TGRPoint3DArray & points, const TGLoop & TrimCurve =TGSurface3D :: GetEmptyLoop (), TGrafBundle3D * adoptBundle =NIL)
- TSurface3D (unsigned long OrderU, unsigned long OrderV, unsigned long NumPointsU, unsigned long NumPointsV, const TGLoop & TrimCurve =TGSurface3D :: GetEmptyLoop (), TGrafBundle3D * adoptBundle =NIL)
- TSurface3D (const TCurveList3D & crv, unsigned long orderV =2, TGSurface3D :: ESurfaceDirection dir =TGSurface3D :: kuDirection, TGrafBundle3D * adoptBundle =NIL)
- TSurface3D (const TGCurve3D & c1, const TGCurve3D & c2, TGSurface3D :: ESurfaceDirection dir =TGSurface3D :: kuDirection, TGrafBundle3D * adoptBundle =NIL)
- TSurface3D (const TGCurve3D & c0, const TGCurve3D & c1, const TGCurve3D & c2, const TGCurve3D & c3, TGrafBundle3D * adoptBundle =NIL)
- TSurface3D (const TGSurface3D & s0, const TGSurface3D & s1, GCoordinate tangent0, GCoordinate tangent1, TGrafBundle3D * adoptBundle =NIL)
- TSurface3D (const TGSurface3D & surface, TGrafBundle3D * adoptBundle =NIL)
- TSurface3D (const TSurface3D & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a TSurface3D from the specified parameters.
- Creates a TSurface3D from the specified parameters. The knot vectors for each parametric direction are set to TGCurve3D::kPinned. It also adopts the specified bundle.
- Creates a TSurface3D from the specified parameters. The control points are automatically generated along a rectilinear grid that ranges from (0, 0, 0) to (1, 1, 0). The knot vectors for each parametric direction are set to TGCurve3D::kPinned. It also adopts the specified bundle.
- Creates a lofted TSurface3D from the specified parameters. It also adopts the specified bundle.
- Creates a ruled surface, where the two specified opposing boundary curves are given for one direction, and they are connected with straight lines in the other direction. The curves are made compatible before forming the surface (that is, all orders are raised until they are equal, and the curves are refined so that their knot vectors are equivalent). The specified ESurfaceDirection parameter determines which parametric direction is connected with the straight lines. It also adopts the specified bundle.
- Creates a TSurface3D from the four specified boundary curves. This is sometimes referred to as a Boolean Sum or Coons patch. The curves are assumed to meet at the corner points. (The surface shape is unpredictable if this condition is not met.) The four curves are made compatible before forming the surface (that is, all orders are raised until they are equal, and the curves are refined so that their knot vectors are equivalent). It also adopts the specified bundle.
- Creates a TSurface3D by constructing a boundary curve between the two specified surfaces. The tangent parameters control the amount of continuity between the respective surface and the (new) joining surface. The joining surface can range from curvature continuous or only position continuous. In between these two extremes are only tangent, but not curvature, continuous. Join surface continuity can be specified independently for both the surface parameters. If the continuity parameter is 1, you get a curvature continuous surface join. More precisely, a four-point curve is constructed at regular intervals around the boundary of both surfaces. A sweep then connects these curves to create the boundary surface. Two of the four points on each curve are surface endpoints. The other two are offsets from the surface boundary along the unit-normal vectors at the boundaries, scaled by the specified tangent parameters. It also adopts the specified bundle.
- Creates a TSurface3D by copying the specified surface. It also adopts the specified bundle.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and directly.
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Called to copy an object.
Parameters:
- Takes no parameters.
- unsigned long OrderU -The order for the new surface's kuDirection.
- unsigned long OrderV -The order for the new surface's kvDirection.
- unsigned long NumPointsU -The number of control points in the new surface's kuDirection.
- unsigned long NumPointsV -The number of control points in the new surface's kvDirection.
- const TGRPoint3DArray & points -The control points for the new surface.
- const TRawArray < GParametric > & knotsU -The knot vector for the new surface's kuDirection.
- const TRawArray < GParametric > & knotsV -The knot vector for the new surface's kvDirection.
- const TGLoop & TrimCurve =TGSurface3D :: GetEmptyLoop () -The trimming loop for the new surface.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- unsigned long OrderU -The order for the new surface's kuDirection.
- unsigned long OrderV -The order for the new surface's kvDirection.
- unsigned long NumPointsU -The number of control points in the new surface's kuDirection.
- unsigned long NumPointsV -The number of control points in the new surface's kvDirection.
- const TGRPoint3DArray & points -The control points for the new surface.
- const TGLoop & TrimCurve =TGSurface3D :: GetEmptyLoop () -The trimming loop for the new surface.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- unsigned long OrderU -The order for the new surface's kuDirection.
- unsigned long OrderV -The order for the new surface's kvDirection.
- unsigned long NumPointsU -The number of control points in the new surface's kuDirection.
- unsigned long NumPointsV -The number of control points in the new surface's kvDirection.
- const TGLoop & TrimCurve =TGSurface3D :: GetEmptyLoop () -The trimming loop for the new surface.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- const TCurveList3D & crv -The list of curves to be used in the new lofted curve.
- unsigned long orderV =2 -The order of the new curve.
- TGSurface3D :: ESurfaceDirection dir =TGSurface3D :: kuDirection -The parametric direction that is to be connected with straight lines.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- const TGCurve3D & c1 -The first curve to be joined.
- const TGCurve3D & c2 -The second curve to be joined.
- TGSurface3D :: ESurfaceDirection dir =TGSurface3D :: kuDirection -The parametric direction that is to be connected with straight lines.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- const TGCurve3D & c0 -The first boundary curve of the new Boolean Sum surface.
- const TGCurve3D & c1 -The second boundary curve of the new Boolean Sum surface.
- const TGCurve3D & c2 -The third boundary curve of the new Boolean Sum surface.
- const TGCurve3D & c3 -The fourth boundary curve of the new Boolean Sum surface.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- const TGSurface3D & s0 -The first surface to be joined.
- const TGSurface3D & s1 -The second surface to be joined.
- GCoordinate tangent0 -The amount of continuity between the two surfaces.
- GCoordinate tangent1 -The amount of continuity between the two surfaces.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- const TGSurface3D & surface -The surface to be copied.
- TGrafBundle3D * adoptBundle =NIL -The attribute bundle to be adopted.
- const TSurface3D & copy -The surface to be copied.
Return Value:
None.
Exceptions:
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, but the analogous TGSurface3D::TGSurface3D calls two parameter assertions. The first one fails if either of the two orders is less than 2. The second fails if either of the specified number of points is less than the order (in the same direction).
- Throws no exceptions, but the analogous TGSurface3D::TGSurface3D calls three parameter assertions. The first one fails if either of the two orders is less than 2. The second one fails if either of the specified number of points is less than the order (in the same direction). The third one fails if the number of control points in the specified point array does not equal the number of points for each direction multiplied by one another.
- Throws no exceptions, but the analogous TGSurface3D::TGSurface3D calls five parameter assertions. The first one fails if either of the two orders is less than 2. The second one fails if either of the specified number of points is less than the order (in the same direction). The third one fails if the number of control points in the specified point array does not equal the number of points for each direction multiplied by one another. The fourth one fails if the number of knots in the knot vector (for the U parametric direction) is not equal to the specified number of points (for the U parametric direction), plus the specified order (for the U parametric direction). Similarly, the fifth one fails if the number of knots in the knot vector (for the V parametric direction) is not equal to the specified number of points (for the V parametric direction), plus the specified order (for the V parametric direction).
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, passes all exceptions through.
- Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Note: The number of elements in a TSurface3D's knot vector must equal the corresponding order, plus the number of points, and the number of items in the control mesh must equal.
virtual ~ TSurface3D ()
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: TSurface3D::Draw
virtual void Draw (TGrafPort & port) const
Interface Category:
API.
Purpose:
Draws this TSurface3D 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: TSurface3D::GetGeometricBounds
virtual TGBox3D GetGeometricBounds () const
Interface Category:
API.
Purpose:
Returns the bounding box of the TSurface3D's geometry, without considering any volume added by its 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: TSurface3D::TransformBy
virtual void TransformBy (const TGrafMatrix3D & matrix)
Interface Category:
API.
Purpose:
Transforms this TSurface3D'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.
Member Function: TSurface3D::TranslateBy
virtual void TranslateBy (const TGPoint3D & delta)
Interface Category:
API.
Purpose:
Moves the TLine3D's position by the specified vector.
Calling Context:
Call this function directly.
Parameters:
- const TGPoint3D & delta -The vector whose x-, y-, and z-coordinates are to be added to those of each point in the line's geometry.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::ScaleBy
virtual void ScaleBy (const TGPoint3D & scaleFactor, const TGPoint3D & centerOfScale =TGPoint3D :: kOrigin)
Interface Category:
API.
Purpose:
Changes the size of this TSurface3D by multiplying the coordinates by the specified scaling factor. It scales the graphic about the specified center of scale. The factor parameter is a vector of type TGPoint3D that allows non-uniform scaling using x-, y-, and z-coordinates of different values. For uniform scaling, the x-, y-, and z-coordinates should be the same.
The effect of negative scaling factors is the same as mirroring. Scaling by -1.0 in the x-coordinate is like mirroring about the Y-Z plane.
Calling Context:
Call this function directly.
Parameters:
- const TGPoint3D & scaleFactor -A vector of three values that determines the amount each coordinate is to be scaled.
- const TGPoint3D & centerOfScale =TGPoint3D :: kOrigin -The center of the scaling.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::RotateBy
- virtual void RotateBy (GDegrees angle, TGrafMatrix3D :: EAxis axis)
- virtual void RotateBy (GDegrees angle, const TGLine3D & ray)
Interface Category:
API.
Purpose:
- Rotates this TSurface3D counterclockwise around the specified axis by the specified angle. The right-handed coordinate system determines the orientation. That is, when you look from the positive axis towards the 3-D origin, a 90 degree counterclockwise rotation transforms one positive axis into the other.
- Rotates this TSurface3D around the specified (arbitrary) axis by the specified angle. The direction of the vector (the axis parameter) determines the orientation of the rotation. The first point of the TGLine3D parameter is the origin; the second point determines the direction of the vector. The orientation of the rotation is counterclockwise around the vector.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- GDegrees angle -The degree of the specified rotation.
- TGrafMatrix3D :: EAxis axis -Determines which axis the specified rotation is to take place about. There are three enumerated types: kAboutXAxis, kAboutYAxis, or kAboutZAxis.
- GDegrees angle -The degree of the specified rotation.
- const TGLine3D & ray -The arbitrary axis of rotation.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::ClearTrim
virtual void ClearTrim ()
Interface Category:
API.
Purpose:
Sets this TSurface3D's trim loop to empty.
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: TSurface3D::GetKnots
virtual void GetKnots (TGSurface3D :: ESurfaceDirection Dir, TRawArray < GParametric > & knots) const
Interface Category:
API.
Purpose:
Returns, by reference in its parameter, this TSurface3D's knot vector in the specified direction.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection Dir -The parametric direction.
- TRawArray < GParametric > & knots -The array in which the the knot vector is returned.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::Evaluate
- virtual TGPoint3D Evaluate (GParametric u, GParametric v) const
- virtual TGPoint3D Evaluate (GParametric u, GParametric v, TGPoint3D & tangentU, TGPoint3D & tangentV) const
Interface Category:
API.
Purpose:
- Returns the point on this TSurface3D at the specified parametric positions.
- Returns the point on this TSurface3D at the specified parametric positions. It returns (in the specified parameters) the surface's tangent vectors. It also returns (in the specified parameters) the curve's tangent vectors.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- GParametric u -The parametric position on the surface.
- GParametric v -The parametric position on the surface.
- GParametric u -The parametric position on the surface.
- GParametric v -The parametric position on the surface.
- TGPoint3D & tangentU -The tangent at the specified parametric location.
- TGPoint3D & tangentV -The tangent at the specified parametric location.
Return Value:
Returns the point on the surface at the specified parametric value.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetKnot
virtual GParametric GetKnot (TGSurface3D :: ESurfaceDirection Dir, long i) const
Interface Category:
API.
Purpose:
Gets this TSurface3D parametric value corresponding to the specified knot in the specified direction.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection Dir -The parametric direction.
- long i -The index (into the knot vector) of the desired knot.
Return Value:
Returns the parametric value corresponding to the specified knot.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetIsocurve
virtual void GetIsocurve (TGSurface3D :: ESurfaceDirection dir, GParametric u, TGCurve3D & curve) const
Interface Category:
API.
Purpose:
Returns (in the specified parameter) the isocurve on this TSurface3D at the specified parametric value in the specified direction.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- GParametric u -The parametric value.
- TGCurve3D & curve -The curve at the parametric value.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetMinParameter
GParametric GetMinParameter (TGSurface3D :: ESurfaceDirection dir) const
Interface Category:
API.
Purpose:
Gets the minimum value for this TSurface3D's parametric range in the specified direction. (This is determined by the knot vectors.)
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
Returns the minimum parametric value of the surface.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetMaxParameter
GParametric GetMaxParameter (TGSurface3D :: ESurfaceDirection dir) const
Interface Category:
API.
Purpose:
Gets the maximum value for this TSurface3D's parametric range in the specified direction. (This is determined by the knot vectors.)
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
Returns the maximum parametric value of the surface.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetNumberOfPoints
unsigned long GetNumberOfPoints (TGSurface3D :: ESurfaceDirection dir) const
Interface Category:
API.
Purpose:
Gets the number of control points in this TSurface3D for the specified parametric direction.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
Returns the number of control points for the direction.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetOrder
unsigned long GetOrder (TGSurface3D :: ESurfaceDirection dir) const
Interface Category:
API.
Purpose:
Gets the order of this TSurface3D for the specified parametric direction.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
Returns the order of the surface for the direction.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetPoint
TGRPoint3D GetPoint (unsigned long row, unsigned long col) const
Interface Category:
API.
Purpose:
Gets this TSurface3D's control point at the specified indexes.
Calling Context:
Call this function directly.
Parameters:
- unsigned long row -The row of the control point.
- unsigned long col -The column of the control point.
Return Value:
Returns the control point for the direction.
Exceptions:
Throws no exceptions, but TGSurface3D::GetPoint calls a parameter assertion that fails if either of the indexes is out of range.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetPoints
void GetPoints (TGRPoint3DArray & pts) const
Interface Category:
API.
Purpose:
Copies, into its parameter, the complete array of this TSurface3D's control points.
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: TSurface3D::GetNumberOfKnots
unsigned long GetNumberOfKnots (TGSurface3D :: ESurfaceDirection dir) const
Interface Category:
API.
Purpose:
Gets the size of the TSurface3D's knot vector (that is, the order, plus the number of control points) for the specified direction.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
Returns the size of the knot vector.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetTrim
void GetTrim (TGLoop & trimCurve) const
Interface Category:
API.
Purpose:
Returns, in the specified parameter, this TSurface3D's trimming loop.
Calling Context:
Call this function directly.
Parameters:
- TGLoop & trimCurve -The trimming loop.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::GetSectionOfSurface
virtual void GetSectionOfSurface (GParametric Umin, GParametric Umax, GParametric Vmin, GParametric Vmax, TGSurface3D & surface) const
Interface Category:
API.
Purpose:
Gets a portion of this TSurface3D bounded in parametric space by the specified parameters.
Calling Context:
Call this function directly.
Parameters:
- GParametric Umin -The minimum parametric value in the kuDirection.
- GParametric Umax -The maximum parametric value in the kuDirection.
- GParametric Vmin -The minimum parametric value in the kvDirection.
- GParametric Vmax -The maximum parametric value in the kvDirection.
- TGSurface3D & surface -The section of the surface desired.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::IsBezier
virtual bool IsBezier (TGSurface3D :: ESurfaceDirection dir) const
Interface Category:
API.
Purpose:
Determines whether this TSurface3D's knot vector represents a Bezier surface in the specified direction.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
Returns true if the knot vector defines a Bezier surface.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::IsPinned
virtual bool IsPinned (TGSurface3D :: ESurfaceDirection dir) const
Interface Category:
API.
Purpose:
Determines whether this TSurface3D reaches the boundary curve defined by the edge of the control mesh in the specified direction.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
Returns true if the surface reaches the boundary curve defined by the edge of the control mesh in the specified direction.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::MakeCompatible
virtual void MakeCompatible (TGSurface3D :: ESurfaceDirection dir, const TGCurve3D & crv)
Interface Category:
API.
Purpose:
Makes this TSurface3D compatible (that is, all orders are raised until they are equal, and the curves are refined so that their knot vectors are equivalent). The specified ESurfaceDirection parameter determines which parametric direction is connected with the straight lines.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- const TGCurve3D & crv -The curve that the surface is to make compatible.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::InsertKnot
virtual void InsertKnot (TGSurface3D :: ESurfaceDirection dir, GParametric u)
Interface Category:
API.
Purpose:
Inserts a single row or column of knots at the specified parametric value.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- GParametric u -The parametric value.
Return Value:
None.
Exceptions:
Throws no exceptions. However, TGSurface3D::InsertKnot calls a parameter assertion that fails if the specified parametric value is out of range (that is, it is less than the first knot in the vector or greater than the last one).
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::MakeDiscontinuity
virtual void MakeDiscontinuity (TGSurface3D :: ESurfaceDirection dir, GParametric u, TGCurve3D :: EDiscontinuity cont)
Interface Category:
API.
Purpose:
Adds a C0, C1, or C2 discontinuity to this TSurface3D at the specified parametric value and in the specified direction.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- GParametric u -The parametric value.
- TGCurve3D :: EDiscontinuity cont -The kind of discontinuity: kBreak (n=0), which adds a break to the curve; kKink (n=1), which adds a kink to the curve; or kJerk (n=2), which changes the parametric speed.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::MoveKnot
virtual void MoveKnot (TGSurface3D :: ESurfaceDirection dir, unsigned long index, GParametric u)
Interface Category:
API.
Purpose:
Moves the specified knot to the point that has the specified parametric value. If u < knot[index -1] or u >knot[index + 1], the knot vector is sorted to accommodate the new value. This changes the shape of the surface.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- unsigned long index -The index, into the knot vector, of the knot to be moved.
- GParametric u -The parametric value.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through, but calls an parameter assertion if parameters are out of range.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::RaiseOrder
virtual void RaiseOrder (TGSurface3D :: ESurfaceDirection dir, unsigned long newOrder)
Interface Category:
API.
Purpose:
Raises the order of this TSurface3D, in the specified parametric direction, to a new order. The shape is preserved, but additional control points are added.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- unsigned long newOrder -The new order for the surface.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::Refine
virtual void Refine (TGSurface3D :: ESurfaceDirection dir, const TRawArray < GParametric > & knots)
Interface Category:
API.
Purpose:
Inserts additional knots into this TSurface3D, adding new control points without modifying the shape, though the control mesh might. This is used to increase the flexibility of a surface.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- const TRawArray < GParametric > & knots -The knots to be inserted.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::RefineToBeziers
virtual void RefineToBeziers (TGSurface3D :: ESurfaceDirection dir)
Interface Category:
API.
Purpose:
Inserts additional knots into this TSurface3D so that all knots have multiplicity order -1 in the specified parametric direction. This turns the surface into a piecewise Bezier definition. The shape of the surface is not changed.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::RefineUniform
virtual void RefineUniform (TGSurface3D :: ESurfaceDirection dir)
Interface Category:
API.
Purpose:
Adds a new knot at the midpoint of each nonzero interval in the knot vector. No knots are inserted between the first n or the last n knots in the vector, where n is the order of the curve. This function does not change the shape of the curve, nor does it change the continuity of the curve.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::RefineToPinned
virtual void RefineToPinned (TGSurface3D :: ESurfaceDirection dir)
Interface Category:
API.
Purpose:
Adds knots to the beginning and the end of the knot vector so that the control mesh is pinned to the ends of the surface (in other words, so that the surface intersects the first and last control points). The shape of the surface is not changed. This only applies to floating end condition curves.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::ReverseDirection
virtual void ReverseDirection (TGSurface3D :: ESurfaceDirection dir =TGSurface3D :: kvDirection)
Interface Category:
API.
Purpose:
Reverses the direction of this TSurface3D's parameterization by reversing the order of the control points and the intervals in the knot vector for the specified parametric direction.
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: TSurface3D::SetKnotScheme
virtual void SetKnotScheme (TGSurface3D :: ESurfaceDirection dir, TGCurve3D :: EndConditions endcond =TGCurve3D :: kPinned)
Interface Category:
API.
Purpose:
Resets the knot vector in the specified direction, using one of the following, common schemes: kPinned, kFloating, or kBezier, as specified.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- TGCurve3D :: EndConditions endcond =TGCurve3D :: kPinned -The scheme to use. TGCurve3D::kPinned specifies knots with a multiplicity equal to the order at each end of the parametric range. This forces the surface to meet the edge of the control mesh in the specified direction. TGCurve3D::kFloating uses uniform knot spacing, and the surface does not reach the edge of the control mesh. TGCurve3D::kBezier creates a piecewise Bezier knot vector.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Note: Calling this member function usually changes the shape of the surface.
Member Function: TSurface3D::SetKnots
virtual void SetKnots (TGSurface3D :: ESurfaceDirection dir, const TRawArray < GParametric > & knots)
Interface Category:
API.
Purpose:
Resets the knot vector in the specified parametric direction to the specified knots. The data are copied into this TSurface3D and must have the same number of knots as the surface's current knot vector. No refinement or consistency checking is performed on the knot vector.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- const TRawArray < GParametric > & knots -The new knots for the knot vector.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::SetPoint
virtual void SetPoint (unsigned long iv, unsigned long iu, const TGRPoint3D & p)
Interface Category:
API.
Purpose:
Replaces the control point at the parametric location (specified by the row and column parameters) with a copy of the specified TGPoint3D.
Calling Context:
Call this function directly.
Parameters:
- unsigned long iv -The row of the control point.
- unsigned long iu -The column of the control point.
- const TGRPoint3D & p -The new control point.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::SetPoints
virtual void SetPoints (const TGRPoint3DArray & controlPoints)
Interface Category:
API.
Purpose:
Replaces all the control points with a copy of the specified TGRPoint3DArray.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, but TGSurface3D::SetPoints calls a parameter assertion that fails if the number of points in the parameter is not equal to the number of points in this TSurface3D.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::SetOrder
virtual void SetOrder (TGSurface3D :: ESurfaceDirection dir, unsigned long order)
Interface Category:
API.
Purpose:
Sets the order of this TSurface3D in the specified parametric direction. This changes the surface's shape.
Calling Context:
Call this function directly.
Parameters:
- TGSurface3D :: ESurfaceDirection dir -The parametric direction.
- unsigned long order -The new order.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::SetTrim
virtual void SetTrim (const TGLoop & trim)
Interface Category:
API.
Purpose:
Sets this TSurface3D's trimming loop.
Calling Context:
Call this function directly.
Parameters:
- const TGLoop & trim -The new trim loop.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::SwapUandV
virtual void SwapUandV ()
Interface Category:
API.
Purpose:
Swaps the column and row parameterizations.
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: TSurface3D::IsConsistent
virtual bool IsConsistent () const
Interface Category:
API.
Purpose:
Checks this TSurface3D for invalid knot vectors, nonpositive values of w, excessive values for the order of the curve, and too many or too few control points. If any offending condition is encountered, an error message is printed and the function returns false. Duplicate successive points cause a warning to be printed, but do not cause the function to return false.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if no offending condition is found.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::operator==
bool operator ==(const TSurface3D & source) const
Interface Category:
API.
Purpose:
Tests two TSurface3Ds for equality.
Calling Context:
Call this operator directly.
Parameters:
- const TSurface3D & source -The surface to be compared with this one.
Return Value:
Returns true if the number of points in both the parameterizations is the same, the points themselves are equal, and the orders and the knot vectors are equal. It also tests the attribute bundle.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::operator!=
bool operator != (const TSurface3D & source) const
Interface Category:
API.
Purpose:
Tests two TSurface3Ds for inequality.
Calling Context:
Call this operator directly.
Parameters:
- const TSurface3D & source -The surface to be compared with this one.
Return Value:
Returns true if the number of points in both the parameterizations is not the same, the points themselves are unequal, and the orders and the knot vectors are unequal. It also tests the attribute bundle.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSurface3D::operator=
TSurface3D & operator =(const TSurface3D & source)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
- const TSurface3D & source -The object to be copied.
Return Value:
Returns a 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: TSurface3D::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: TSurface3D::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.