Class: TCurve3D

Declaration: Graphics3D.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MGraphic3D

Inherited By:

None.

Purpose:

TCurve3D provides a wrapper for the TGCurve3D geometry class, to which it adds the facilities inherited from MGraphic: an attribute bundle, matrix transformations, and hit detection. TCurve3D has a, not is a, TGCurve3D. A TGCurve3D is a Non-Uniform Rational B-Spline (NURB) of arbitrary degree. Each of the TCurve3D member functions is straightforward, either because it overrides the MGraphic3D function of the same name, or because it simply invokes the TGCurve3D function of the same name.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TCurve3D::TCurve3D

  1. TCurve3D ()
  2. TCurve3D (const TGPoint3D & p0, const TGPoint3D & p1, const TGPoint3D & p2, TGrafBundle3D * adoptBundle =NIL)
  3. TCurve3D (const TGPoint3D & p0, const TGPoint3D & p1, const TGPoint3D & p2, const TGPoint3D & p3, TGrafBundle3D * adoptBundle =NIL)
  4. TCurve3D (unsigned long order, unsigned long numberPoints, TGrafBundle3D * adoptBundle =NIL)
  5. TCurve3D (unsigned long order, unsigned long numberPoints, const TRawArray < GParametric > & knots, TGrafBundle3D * adoptBundle =NIL)
  6. TCurve3D (unsigned long order, const TGRPoint3DArray & points, TGrafBundle3D * adoptBundle =NIL)
  7. TCurve3D (unsigned long order, const TGRPoint3DArray & points, const TRawArray < GParametric > & knots, TGrafBundle3D * adoptBundle =NIL)
  8. TCurve3D (const TGLine3D & line, TGrafBundle3D * adoptBundle =NIL)
  9. TCurve3D (const TGPolyline3D & polyline, TGrafBundle3D * adoptBundle =NIL)
  10. TCurve3D (const TGCurve & curve, TGrafBundle3D * adoptBundle =NIL)
  11. TCurve3D (const TGCurve3D & curve, TGrafBundle3D * adoptBundle =NIL)
  12. TCurve3D (const TCurve3D & copy)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Creates a three-point quadratic Bezier TCurve3D with the specified TGrafBundle.
  3. Creates a simple four-point cubic Bezier TCurve3D with the specified TGrafBundle.
  4. Creates a general NURB (Non-Uniform Rational B-Spline) of the specified order and with the specified number of control points. All the points are set to the origin (w=1). The knot vector created is kPinned. The specified TGrafBundle is adopted.
  5. Creates a general NURB (Non-Uniform Rational B-Spline) of the specified order, with the specified array of control points, and with the knot vector of the specified array of parametric values. The specified TGrafBundle is adopted.
  6. Creates a general NURB (Non-Uniform Rational B-Spline) with the specified number of control points, all of which are set to the origin (w=1). The specified TGrafBundle is adopted.
  7. Creates a general NURB (Non-Uniform Rational B-Spline) of the specified order, with the specified array of control points, and with the knot vector of the specified array of parametric values. The specified TGrafBundle is adopted.
  8. Creates a TCurve3D from the specified TGLine3D with the specified TGrafBundle.
  9. Creates a TCurve3D from the specified TGPolyline3D with the specified TGrafBundle.
  10. Creates a TCurve3D from the specified TGCurve with the specified TGrafBundle.
  11. Creates a TCurve3D from the specified TGCurve3D with the specified TGrafBundle.
  12. 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. Call this function directly.
  11. Call this function directly.
  12. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::~TCurve3D

virtual ~ TCurve3D ()

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: TCurve3D::Draw

virtual void Draw (TGrafPort & port) const

Interface Category:

API.

Purpose:

Draws this TCurve3D to the specified grafport. 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: TCurve3D::GetGeometricBounds

virtual TGBox3D GetGeometricBounds () const

Interface Category:

API.

Purpose:

Gets the bounding box of this TCurve3D's geometry, without considering any volume added by the bundle.

Calling Context:

Called during hit detection. You can also 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: TCurve3D::TransformBy

virtual void TransformBy (const TGrafMatrix3D & matrix)

Interface Category:

API.

Purpose:

Transforms this TCurve3D's shape and position by applying the specified transformation matrix.

Calling Context:

Called by the Graphics system. You can also 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: TCurve3D::TranslateBy

virtual void TranslateBy (const TGPoint3D & delta)

Interface Category:

API.

Purpose:

Moves this TCurve3D's position by the specified vector relative to its current position.

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: TCurve3D::ScaleBy

virtual void ScaleBy (const TGPoint3D & scaleFactor, const TGPoint3D & centerOfScale =TGPoint3D :: kOrigin)

Interface Category:

API.

Purpose:

Changes the size of this TCurve3D 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. (For example, 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: TCurve3D::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 TCurve3D 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 TCurve3D 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: TCurve3D::Concatenate

virtual void Concatenate (const TGCurve3D & curve, bool glue =true)

Interface Category:

API.

Purpose:

Adds the specified TCurve3D to the end of this one. If the glue parameter is true, then the endpoint of this curve is merged with the starting point of the parameter curve; otherwise, a double control point is created.

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: TCurve3D::Evaluate

  1. virtual TGPoint3D Evaluate (GParametric u) const
  2. virtual TGPoint3D Evaluate (GParametric u, TGPoint3D & tangent) const
  3. virtual TGPoint3D Evaluate (GParametric u, TGPoint3D & tangent, TGPoint3D & deriv2) const
  4. virtual TGPoint3D Evaluate (GParametric u, TGPoint3D & tangent, TGPoint3D & deriv2, GCoordinate & curvature) const

Interface Category:

API.

Purpose:

  1. Returns the point on this TCurve3D at the specified parameter.
  2. Returns the point on this TCurve3D at the specified parameter and also returns (in the specified parameter) the curve's tangent.
  3. Returns the point on this TCurve3D at the specified parameter and also returns (in the specified parameter) the curve's tangent and the second derivative (that is, the change in speed ).
  4. Returns the point on this TCurve3D at the specified parameter and also returns (in the specified parameter) the curve's tangent, the second derivative (that is, the change in speed ), and the curvature.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.
  3. Call this function directly.
  4. Call this function directly.

Parameters:

Return Value:

Returns the point on the curve at the specified parametric value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The parametric value must be within the parameter range of this curve (found by calling GetMinParameter and GetMaxParameter). If the specified parameter is outside this range, the value returned may not be valid (that is, a NaN, or not a number ).

Member Function: TCurve3D::EvaluateW

virtual TGRPoint3D EvaluateW (GParametric u) const

Interface Category:

API.

Purpose:

Gets the TGRPoint3D on this TCurve3D at the specified parametric value.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the point on the curve at the specified parametric value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The parametric value must be within the parameter range of this curve (found by calling GetMinParameter and GetMaxParameter). If the specified parameter is outside this range, the value returned may not be valid (that is, a NaN, or not a number ).

Member Function: TCurve3D::GetOrder

unsigned long GetOrder () const

Interface Category:

API.

Purpose:

Gets the order of this TCurve3D (for example, 4 for cubic curves).

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the order of the curve.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::IsEmpty

bool IsEmpty () const

Interface Category:

API.

Purpose:

Determines whether this TCurve3D's geometry is empty (that is, when the curve is created with the default constructor).

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the order of the curve is zero.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::GetNumberOfPoints

unsigned long GetNumberOfPoints () const

Interface Category:

API.

Purpose:

Gets the number of control points in this TCurve3D.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the number of control points.

Exceptions:

Throws no exceptions, but TGCurve3D::GetNumberOfPoints calls an assertion that fails if the curve is uninitialized.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::GetPoint

TGRPoint3D GetPoint (unsigned long i) const

Interface Category:

API.

Purpose:

Gets the control point at the specified index.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the control point.

Exceptions:

Throws no exceptions, but TGCurve3D::GetPoint calls an assertion that fails if the index is out of range.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::GetPoints

void GetPoints (TGRPoint3DArray & pts) const

Interface Category:

API.

Purpose:

Copies, into its parameter, the complete array of control points.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, but TGCurve3D::GetPoints calls an assertion that fails if the curve is uninitialized.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::GetControlPolyline

void GetControlPolyline (TGPolyline3D & polyline) const

Interface Category:

API.

Purpose:

Returns, in its parameter, this TCurve3D's set of control points as a polyline.

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: TCurve3D::GetMinParameter

GParametric GetMinParameter () const

Interface Category:

API.

Purpose:

Gets the parametric value that has been associated with this TCurve3D's starting point. (This is not necessarily zero; it can be any value.)

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the minimum parametric value of the curve.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::GetMaxParameter

GParametric GetMaxParameter () const

Interface Category:

API.

Purpose:

Returns the parametric value that has been associated with this TCurve3D's endpoint.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the maximum parametric value of the curve.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::GetNumberOfKnots

unsigned long GetNumberOfKnots () const

Interface Category:

API.

Purpose:

Gets the number of knots in this TCurve3D's knot vector. This is equal to the number of control points, plus the order of the curve.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the number of the curve's knots.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::IsPinned

virtual bool IsPinned () const

Interface Category:

API.

Purpose:

Determines whether this TCurve3D's knot vector is pinned (that is, that the first and last control points are on the curve).

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the knot vector is pinned.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::IsBezier

virtual bool IsBezier () const

Interface Category:

API.

Purpose:

Determines whether this TCurve3D represents a piecewise Bezier curve.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the knot vector defines a piecewise Bezier curve.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::GetNextDiscontinuity

virtual unsigned long GetNextDiscontinuity (unsigned long startIndex, unsigned long discontinuity =0) const

Interface Category:

API.

Purpose:

Returns the knot vector index of the next discontinuity following the specified knot. The default is the next C0 discontinuity (a break in the curve), but you can specify discontinuities of a higher order. GetNextDiscontinuity returns the index of the first knot in a sequence of identical knots. (The order of the discontinuity determines how many identical knots are required.) Call GetKnot on the returned value to find the parameter of the curve at the discontinuity. Note that for a C0 break in the curve, the value returned by GetKnot(GetNextDiscontinuity()) is the start of the section of the curve after the break. Subtracting any amount from that parameter jumps to the section before the break. To find the control point associated with a C1 discontinuity, subtract 1 from the value returned by GetNextDiscontinuity. For a C0 discontinuity, GetNextDiscontinuity()-1 is the point before the break, and the following point is after the break. To skip from one discontinuity to the next, pass the value returned from the last call as the startIndex parameter.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the index (into the knot vector) of the next discontinuity. If no more discontinuities are found. The return value is the index of the last knot (in other words, GetNumberOfKnots()-1).

Exceptions:

Throws no exceptions, but TGCurve3D::GetNextDiscontinuity calls an assertion that fails if no more discontinuities are found. The return value is the index of the last knot (in other words, GetNumberOfKnots()-1).

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::GetKnot

GParametric GetKnot (unsigned long i) const

Interface Category:

API.

Purpose:

Gets the parametric value corresponding to the specified knot.

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: TCurve3D::GetKnots

void GetKnots (TRawArray < GParametric > & knots) const

Interface Category:

API.

Purpose:

Returns, by reference in its parameter, 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: TCurve3D::NearestParametric

virtual GParametric NearestParametric (const TGPoint3D & test) const

Interface Category:

API.

Purpose:

Gets the parametric value of the point on this TCurve3D that is nearest to the specified point.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the parametric value closest to the specified point.

Exceptions:

Throws no exceptions, but TGCurve3D::NearestParametric calls an assertion that fails if the curve is uninitialized.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::GetSectionOfCurve

virtual void GetSectionOfCurve (GParametric from, GParametric to, TGCurve3D & section) const

Interface Category:

API.

Purpose:

Returns the section of this TCurve3D between the two specified parametric values.

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: TCurve3D::DragPosition

virtual void DragPosition (GParametric u, const TGPoint3D & toPoint, GParametric segmentMinimum =0.2, GParametric segmentMaximum =0.8)

Interface Category:

API.

Purpose:

Changes this TCurve3D's shape so that at the specified parameter, it passes through the given point. Parts of the curve that lie outside the parametric range from segmentMinimum to segmentMaximum are not affected.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, but TGCurve3D::DragPosition calls an initialized assertion that fails if the curve is uninitialized.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::DragTangent

virtual void DragTangent (GParametric u, const TGPoint3D & toTangent, GParametric segmentMinimum =0.2, GParametric segmentMaximum =0.8)

Interface Category:

API.

Purpose:

Changes the curve's shape so that at the specified parameter, this TCurve3D has the specified tangent. This function can simulate the rocker arm curve adjuster used in some illustration applications, with the added advantage that the adjustment can be made anywhere along the curve.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, but TGCurve3D::DragTangent calls an initialized assertion that fails if the curve is uninitialized and a parameter assertion fails if the order is less than 2.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::ReverseDirection

virtual void ReverseDirection ()

Interface Category:

API.

Purpose:

Flips the orientation of this TCurve3D's parameterization, by reversing the numbering of the control points and the intervals in the knot vector. In other words, the minimum parameter becomes the maximum parameter and vice versa.

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: TCurve3D::SetOrder

virtual void SetOrder (unsigned long order)

Interface Category:

API.

Purpose:

Sets the order of this TCurve3D (for example, 4 for cubic curves). This changes the shape, but leaves the number of points intact.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, but TGCurve3D::SetOrder calls an initialization assertion that fails if the curve is empty, and then a parameter assertion if the curve's order is less than 2 and the curve's order is greater than the curve's number of control points.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::RaiseOrder

virtual void RaiseOrder (unsigned long newOrder)

Interface Category:

API.

Purpose:

Raises the degree of this TCurve3D to the specified order. This does not change the shape, but increases the number of control points and knots.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, but TGCurve3D::ApproximateLowerOrder calls a parameter assertion that fails if new order is out of range.

Concurrency:

Not multithread safe.

Other Considerations:

This procedure generates spurious control points for splines that do not have closed end conditions (k-fold knots at each end).

Member Function: TCurve3D::SetPoint

virtual void SetPoint (unsigned long i, const TGRPoint3D & p)

Interface Category:

API.

Purpose:

Replaces the control point i with the specified point.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, but TGCurve3D::SetPoint calls an initialization assertion that fails if the curve is empty.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::SetPoints

virtual void SetPoints (const TGRPoint3DArray & controlPoints)

Interface Category:

API.

Purpose:

Replaces this TCurve3D's control points with the specified ones. If the specified array does not have the same number of points as the existing curve, the knot vector is reset. Also, if the new number of points is less than the existing order of the curve, the order is lowered to the new number of points.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, but TGCurve3D::SetPoints calls an initialization assertion that fails if the specified array of control points has fewer than two points.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::SetKnotScheme

virtual void SetKnotScheme (TGCurve3D :: EndConditions theType =TGCurve3D :: kPinned)

Interface Category:

API.

Purpose:

Sets the knot vector to one of three standard schemes (pinned, floating, or Bezier), without doing any refinement. This usually changes the shape of this TCurve3D.

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: TCurve3D::SetKnots

virtual void SetKnots (const TRawArray < GParametric > & knots)

Interface Category:

API.

Purpose:

Resets this TCurve3D's knot vector to the specified array. The data are copied into the curve, and must have the same number of knots as the curve's existing knot vector. No refinement or consistency checking is performed on this 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: TCurve3D::MakeDiscontinuity

virtual void MakeDiscontinuity (GParametric u, TGCurve3D :: EDiscontinuity cont)

Interface Category:

API.

Purpose:

Adds a Cn discontinuity at the specified parametric location. The values for n are determined by the EDiscontinuity parameter. If a discontinuity already exists at the parametric location, it is either left as is (if its n value is already correct) or raised to the desired one. Note: this member function just introduces the discontinuity into the knot vector, it does not change the shape of the curve.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, but TGCurve3D::MakeDiscontinuity calls a parameter assertion that fails if the specified parametric location is less than the knot in the orderth place in the knot vector or if it is greater than the last knot in the curve's knot vector.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::MoveKnot

virtual void MoveKnot (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 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: TCurve3D::InsertKnot

virtual void InsertKnot (GParametric u)

Interface Category:

API.

Purpose:

Inserts a single new knot (and the corresponding control point) at the specified parametric location.

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: TCurve3D::RefineUniform

virtual void RefineUniform ()

Interface Category:

API.

Purpose:

Adds a new knot at the midpoint of each nonzero interval in 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: TCurve3D::RefineToBeziers

virtual void RefineToBeziers ()

Interface Category:

API.

Purpose:

Inserts additional knots so that all interior knots have a multiplicity equal to the order, minus 1. This turns this TGCurve3D into a piecewise Bezier curve, but the shape of the curve 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: TCurve3D::Refine

virtual void Refine (const TRawArray < GParametric > & knots)

Interface Category:

API.

Purpose:

Insert the given knots into this TCurve3D, adding new control points without modifying the curve's shape. This increases the flexibility of a 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: TCurve3D::RefineToPinned

virtual void RefineToPinned ()

Interface Category:

API.

Purpose:

Adds knots to the beginning and end of the knot vector so that the control polygon is pinned to the ends of this TCurve3D (in other words, so that the curve intersects the first and last control points). This function is only applicable to curves with floating end conditions. The shape of the curve 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: TCurve3D::MakeCompatible

static void MakeCompatible (TCurve3D & curve1, TCurve3D & curve2)

Interface Category:

API.

Purpose:

Gives the specified curves the same order, number of points, and knot vectors, without changing their shapes.

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: TCurve3D::operator==

bool operator ==(const TCurve3D & source) const

Interface Category:

API.

Purpose:

Tests two TCurve3Ds for equality, by seeing whether the geometries are equal and the bundles are equal.

Calling Context:

Call this operator by using it in an expression.

Parameters:

Return Value:

Returns true if this curve and the argument have equal geometries and bundles.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::operator!=

bool operator != (const TCurve3D & source) const

Interface Category:

API.

Purpose:

Tests two TCurve3Ds for inequality, by seeing whether their geometries and bundles are unequal.

Calling Context:

Call this operator by using it in an expression.

Parameters:

Return Value:

Returns true if the geometries or bundles of this curve and the argument are not equal. geometries or bundles.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TCurve3D::operator=

TCurve3D & operator =(const TCurve3D & 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: TCurve3D::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: TCurve3D::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.