Class: TSurface3D

Declaration: Graphics3D.h

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.

Member Function: TSurface3D::TSurface3D

  1. TSurface3D ()
  2. 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)
  3. TSurface3D (unsigned long OrderU, unsigned long OrderV, unsigned long NumPointsU, unsigned long NumPointsV, const TGRPoint3DArray & points, const TGLoop & TrimCurve =TGSurface3D :: GetEmptyLoop (), TGrafBundle3D * adoptBundle =NIL)
  4. TSurface3D (unsigned long OrderU, unsigned long OrderV, unsigned long NumPointsU, unsigned long NumPointsV, const TGLoop & TrimCurve =TGSurface3D :: GetEmptyLoop (), TGrafBundle3D * adoptBundle =NIL)
  5. TSurface3D (const TCurveList3D & crv, unsigned long orderV =2, TGSurface3D :: ESurfaceDirection dir =TGSurface3D :: kuDirection, TGrafBundle3D * adoptBundle =NIL)
  6. TSurface3D (const TGCurve3D & c1, const TGCurve3D & c2, TGSurface3D :: ESurfaceDirection dir =TGSurface3D :: kuDirection, TGrafBundle3D * adoptBundle =NIL)
  7. TSurface3D (const TGCurve3D & c0, const TGCurve3D & c1, const TGCurve3D & c2, const TGCurve3D & c3, TGrafBundle3D * adoptBundle =NIL)
  8. TSurface3D (const TGSurface3D & s0, const TGSurface3D & s1, GCoordinate tangent0, GCoordinate tangent1, TGrafBundle3D * adoptBundle =NIL)
  9. TSurface3D (const TGSurface3D & surface, TGrafBundle3D * adoptBundle =NIL)
  10. TSurface3D (const TSurface3D & copy)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a TSurface3D from the specified parameters.
  3. 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.
  4. 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.
  5. Creates a lofted TSurface3D from the specified parameters. It also adopts the specified bundle.
  6. 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.
  7. 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.
  8. 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.
  9. Creates a TSurface3D by copying the specified surface. It also adopts the specified bundle.
  10. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and directly.
  2. Call this function directly.
  3. Call this function directly.
  4. Call this function directly.
  5. Call this function directly.
  6. Call this function directly.
  7. Call this function directly.
  8. Call this function directly.
  9. Call this function directly.
  10. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

  1. Throws no exceptions, passes all exceptions through.
  2. 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).
  3. 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.
  4. 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).
  5. Throws no exceptions, passes all exceptions through.
  6. Throws no exceptions, passes all exceptions through.
  7. Throws no exceptions, passes all exceptions through.
  8. Throws no exceptions, passes all exceptions through.
  9. Throws no exceptions, passes all exceptions through.
  10. 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.

Member Function: TSurface3D::~TSurface3D

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:

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:

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSurface3D::RotateBy

  1. virtual void RotateBy (GDegrees angle, TGrafMatrix3D :: EAxis axis)
  2. virtual void RotateBy (GDegrees angle, const TGLine3D & ray)

Interface Category:

API.

Purpose:

  1. 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.
  2. 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:

  1. Call this function directly.
  2. 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::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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TSurface3D::Evaluate

  1. virtual TGPoint3D Evaluate (GParametric u, GParametric v) const
  2. virtual TGPoint3D Evaluate (GParametric u, GParametric v, TGPoint3D & tangentU, TGPoint3D & tangentV) const

Interface Category:

API.

Purpose:

  1. Returns the point on this TSurface3D at the specified parametric positions.
  2. 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:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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.