Class: TGCurve3D

Declaration: Curve3D.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TGHermiteSpline3D TGTensionSpline3D

Purpose:

TGCurve3D is a general 3-D curve primitive that can implement free-form curves and path geometry containing discontinuities (breaks or kinks in the smoothness of the curve). TGCurve3Ds can represent the geometry of all the other geometric types; the TGCurve3D class provides constructors that accept 2-D curves, TGLine3Ds, and TGPolyline3Ds. A TGCurve3D can be used to collect other geometries into a single path object. A TGCurve3D is implemented with a Non-Uniform Rational B-Spline (NURB) of arbitrary degree. NURBS are a generalization of Bezier curves; they allow an arbitrary number of points, exact representation of conic sections, full control over continuity, and arbitrary order. TGCurve3D has many member functions. TGCurve3D's member functions correspond almost exactly to those of the 2-D class, TGCurve.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from this class. Provided classes include TGCardinalSpline3D, TGHermiteSpline3D, and TGTensionSpline3D.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TGCurve3D::TGCurve3D

  1. TGCurve3D ()
  2. TGCurve3D (const TGPoint3D & p0, const TGPoint3D & p1, const TGPoint3D & p2)
  3. TGCurve3D (const TGPoint3D & p0, const TGPoint3D & p1, const TGPoint3D & p2, const TGPoint3D & p3)
  4. TGCurve3D (unsigned long order, unsigned long numberPoints)
  5. TGCurve3D (unsigned long order, unsigned long numberPoints, const TRawArray < GParametric > & knots)
  6. TGCurve3D (unsigned long order, const TGRPoint3DArray & points)
  7. TGCurve3D (unsigned long order, const TGRPoint3DArray & points, const TRawArray < GParametric > & knots)
  8. TGCurve3D (const TGCurve3D & curve)
  9. TGCurve3D (const TGLine3D & line)
  10. TGCurve3D (const TGPolyline3D & pline)
  11. TGCurve3D (const TGCurve & curve)

Interface Category:

API.

Purpose:

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

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. Called to copy an object.
  9. Call this function directly.
  10. Call this function directly.
  11. 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: TGCurve3D::~TGCurve3D

virtual ~ TGCurve3D ()

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

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

Interface Category:

API.

Purpose:

  1. Returns the point on this TGCurve3D at the specified parameter.
  2. Returns the point on this TGCurve3D at the specified parameter and also returns (in the specified parameter) the curve's tangent.
  3. Returns the point on this TGCurve3D 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:

None.

Member Function: TGCurve3D::EvaluateW

TGRPoint3D EvaluateW (GParametric u) const

Interface Category:

API.

Purpose:

Gets the TGRPoint3D on this TGCurve3D 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:

None.

Member Function: TGCurve3D::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: TGCurve3D::GetBounds

TGBox3D GetBounds () const

Interface Category:

API.

Purpose:

Gets the box that bounds this TGCurve3D.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the bounding box that contains the curve.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGCurve3D::Intersects

bool Intersects (const TGBox3D & g) const

Interface Category:

API.

Purpose:

Determines whether this TGCurve3D intersects the specified box.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the surface intersects the box.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TGCurve3D::TransformBy

void TransformBy (const TGrafMatrix3D & mat)

Interface Category:

API.

Purpose:

Transforms this TGCurve3D'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: TGCurve3D::MakeCompatible

  1. static void MakeCompatible (TGCurve3D & curve1, TGCurve3D & curve2)
  2. static void MakeCompatible (TCurveList3D & curveList)

Interface Category:

API.

Purpose:

  1. Modifies both curves to have the same order, the same number of points, and the same knot vector, without changing the shape of either curve. This is accomplished by raising the order and refining the knot vectors as necessary.
  2. Modifies all the curves in the TGCurveList to have the same order, the same number of points, and the same knot vector, without changing the shape of either curve. This is accomplished by raising the order and refining the knot vectors as necessary.

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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.