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.
- TGCurve3D ()
- TGCurve3D (const TGPoint3D & p0, const TGPoint3D & p1, const TGPoint3D & p2)
- TGCurve3D (const TGPoint3D & p0, const TGPoint3D & p1, const TGPoint3D & p2, const TGPoint3D & p3)
- TGCurve3D (unsigned long order, unsigned long numberPoints)
- TGCurve3D (unsigned long order, unsigned long numberPoints, const TRawArray < GParametric > & knots)
- TGCurve3D (unsigned long order, const TGRPoint3DArray & points)
- TGCurve3D (unsigned long order, const TGRPoint3DArray & points, const TRawArray < GParametric > & knots)
- TGCurve3D (const TGCurve3D & curve)
- TGCurve3D (const TGLine3D & line)
- TGCurve3D (const TGPolyline3D & pline)
- TGCurve3D (const TGCurve & curve)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a three-point quadratic Bezier TGCurve3D.
- Creates a simple four-point cubic Bezier TGCurve3D.
- 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.
- 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.
- 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).
- 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.
- Copy constructor.
- Creates a TCurve3D from the specified TGLine3D.
- Creates a TCurve3D from the specified TGPolyline3D.
- Creates a TCurve3D from the specified TGCurve.
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.
- Called to copy an object.
- Call this function directly.
- Call this function directly.
- Call this function directly.
Parameters:
- Takes no parameters.
- const TGPoint3D & p0 -The first control point.
- const TGPoint3D & p1 -The second control point.
- const TGPoint3D & p2 -The third control point.
- const TGPoint3D & p0 -The first control point.
- const TGPoint3D & p1 -The second control point.
- const TGPoint3D & p2 -The third control point.
- const TGPoint3D & p3 -The fourth control point.
- unsigned long order -The order for the new curve.
- unsigned long numberPoints -The number of control points for the new curve.
- unsigned long order -The order for the new curve.
- unsigned long numberPoints -The number of control points for the new curve.
- const TRawArray < GParametric > & knots -The knot vector for the new curve.
- unsigned long order -The order for the new curve.
- const TGRPoint3DArray & points -The control points for the new curve.
- unsigned long order -The order for the new curve.
- const TGRPoint3DArray & points -The control points for the new curve.
- const TRawArray < GParametric > & knots -The knot vector for the new curve.
- const TGCurve3D & curve -The curve to be copied.
- const TGLine3D & line -The line to be converted into a curve.
- const TGPolyline3D & pline -The line to be converted into a curve.
- const TGCurve & curve -The curve to be converted into a curve.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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
- TGPoint3D Evaluate (GParametric u) const
- TGPoint3D Evaluate (GParametric u, TGPoint3D & tangent) const
- TGPoint3D Evaluate (GParametric u, TGPoint3D & tangent, TGPoint3D & deriv2) const
- TGPoint3D Evaluate (GParametric u, TGPoint3D & tangent, TGPoint3D & deriv2, GCoordinate & curvature) const
Interface Category:
API.
Purpose:
- Returns the point on this TGCurve3D at the specified parameter.
- Returns the point on this TGCurve3D at the specified parameter and also returns (in the specified parameter) the curve's tangent.
- 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 ).
- 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:
- Call this function directly.
- Call this function directly.
- Call this function directly.
- Call this function directly.
Parameters:
- GParametric u -The parametric position on the curve.
- GParametric u -The parametric position on the curve.
- TGPoint3D & tangent -The tangent of the curve.
- GParametric u -The parametric position on the curve.
- TGPoint3D & tangent -The tangent of the curve.
- TGPoint3D & deriv2 -The second derivative of the curve.
- GParametric u -The parametric position on the curve.
- TGPoint3D & tangent -The tangent of the curve.
- TGPoint3D & deriv2 -The second derivative of the curve.
- GCoordinate & curvature -The curvature of the curve.
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:
- GParametric u -The parametric position on the curve.
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:
- TGPolyline3D & polyline -The curve's control points as a polyline.
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:
- const TGrafMatrix3D & mat -The transformation matrix that the graphic's points are multiplied by.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TGCurve3D::MakeCompatible
- static void MakeCompatible (TGCurve3D & curve1, TGCurve3D & curve2)
- static void MakeCompatible (TCurveList3D & curveList)
Interface Category:
API.
Purpose:
- 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.
- 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:
- Call this function directly.
- Call this function directly.
Parameters:
- TGCurve3D & curve1 -The first curve to be made compatible.
- TGCurve3D & curve2 -The second curve to be made compatible.
- TCurveList3D & curveList -The list of curves to be made compatible.
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.