### IBaseCurve

  IBaseCurve is the base templatized class for IGCurve2D.

### IBaseCurve - Member Functions and Data by Group

### Constructors & Destructor

Use the constructors and destructor in this group to create or destroy objects of class IBaseCurve.

~IBaseCurve

      public:
      virtual ~IBaseCurve()

  Destroys the object of class IBaseCurve.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IBaseCurve

  Overload 1
  Constructs a curve/loop with the given order and the points.

      public:
      IBaseCurve( unsigned long order,
                  const IRawArray < RPointType >& points )

  Note that IRawArray does not check whether allocation is successful. Before construction, one should check if there is enough memory and use a reasonable size.

  order
    The order of the loop.
  points
    The array of control points.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2
  Constructs a four-point quadratic bezier curve.

      public:
      IBaseCurve( const PointType& p0,
                  const PointType& p1,
                  const PointType& p2,
                  const PointType& p3 )

  p0
    The first control point.
  p1
    The second control point.
  p2
    The third control point.
  p3
    The forth control point.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3
  Copy constructor.

      public:
      IBaseCurve( const IBaseCurve < RPointType,
                  PointType >& curve )

  Use this constructor to create an IBaseCurve object that is copied from the given curve. Note: IRawArray does not check whether allocation is successful. Before construction, one should check if there is enough memory and use a reasonable size.

  curve
    The curve to be copied.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4
  Constructs a curve/loop with the given order, number of points, and the knot vector.

      public:
      IBaseCurve( unsigned long order,
                  unsigned long numberPoints,
                  const IRawArray < GParametric >& knots )

  Note that IRawArray does not check whether allocation is successful. Before construction, one should check if there is enough memory and use a reasonable size.

  order
    The order of the loop.
  numberPoints
    The number of control points.
  knots
    The knot vector.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 5
  Constructs a curve/loop with the given order, points, and the knot vector.

      public:
      IBaseCurve( unsigned long order,
                  const IRawArray < RPointType >& points,
                  const IRawArray < GParametric >& knots )

  Note that IRawArray does not check whether allocation is successful. Before construction, one should check if there is enough memory and use a reasonable size.

  order
    The order of the loop.
  points
    The array of control points.
  knots
    The knot vector.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 6
  Constructs a curve with a given order and the number of points. The points are set later.

      public:
      IBaseCurve(unsigned long order, unsigned long numberPoints)

  Note that IRawArray does not check whether allocation is successful. Before construction, one should check if there is enough memory and use a reasonable size.

  order
    The order of the loop.
  numberPoints
    The number of control points.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 7
  Constructs a three-point quadratic bezier curve.

      public:
      IBaseCurve( const PointType& p0,
                  const PointType& p1,
                  const PointType& p2 )

  Constructs a three-point quadratic bezier curve.

  p0
    The first control point.
  p1
    The second control point.
  p2
    The third control point.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 8
  Default constructor

      public:
      IBaseCurve()

  Use this constructor to create an empty curve with order zero and no point.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Assignment Operator

Use the operator in this group to assign the given curve to the target one.

operator =

      public:
      IBaseCurve < RPointType , PointType >&
        operator =( const IBaseCurve < RPointType,
                    PointType >& Crv )

  Assignment operator.

  Crv
    The curve to be copied.

Return
  A non-const reference to the left-hand side object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Comparing Two Curves for Equality or Inequality

Use the operators in this group to test two curves for equality or inequality.

operator !=

      public:
      bool
        operator !=( const IBaseCurve < RPointType,
                     PointType >& ) const

  Tests two curves for inequality.

  IBaseCurve
    A constant reference to the curve to be compared with this one.

Return
  True if the two curves have different orders, different numbers of control points, or their knot vectors are not equal.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator ==

      public:
      bool
        operator ==( const IBaseCurve < RPointType,
                     PointType >& ) const

  Tests two curves for equality.

  IBaseCurve
    A constant reference to the curve to be compared with this one.

Return
  True if the two curves have the same order, the same number of control points, and identical knot vectors.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Evaluating a Point on the Curve

Use the functions in this group to identify a point on the curve.

evaluate
  Returns the point on the IBasicCurve at the specified parametric value and a known breakpoint.

  Overload 1
  Returns the point on the IBasicCurve at the specified parametric value.

      public:
      PointType evaluate(GParametric u) const

  The parameter u has a range defined by the knot vector. The valid limits on this range are: IBaseCurve::minParameter() >= u > IBaseCurve::maxParameter(). Evaluation outside these limits falls off towards zero as you get further outside of the range. For pinned knot vectors(the usual case), there is a c0 discontinuity between the curve within the valid range and zero outside of it. Since the W component also falls to zero, the result becomes a NaN when the W's get divided out.

  u
    The parametric value at which to evaluate the curve. (IGCurve2D::minParameter() >=u> IGCurve2D::maxParameter())

Return
  The point on the curve that corresponds to the specified parametric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2
  Returns the point on the IBasicCurve at the specified parametric value.

      public:
      PointType evaluate(GParametric u, PointType& tangent) const

  Use this function to obtain the point on the IBasicCurve at the specified parametric value; also computes the tangent at this point.

  u
    The parametric value at which to evaluate the curve. (IGCurve2D::minParameter() >=u> IGCurve2D::maxParameter())
  tangent
    A vector representing the tangent of the curve at this point; computed by this function.

Return
  The point on the curve that corresponds to the specified parametric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 3
  Returns the point on the IBasicCurve at the specified parametric value.

      public:
      PointType
        evaluate( GParametric u,
                  PointType& tangent,
                  PointType& deriv2 ) const

  Use this function to obtain the point on the IBasicCurve at the specified parametric value; also computes the tangent and second derivative at this point.

  u
    The parametric value at which to evaluate the curve. (IGCurve2D::minParameter() >=u> IGCurve2D::maxParameter())
  tangent
    A vector representing the tangent of the curve at this point; computed by this function.
  deriv2
    The second derivative of the curve at this point; computed by this function.

Return
  The point on the curve that corresponds to the specified parametric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 4

      protected:
      PointType
        evaluate( GParametric u,
                  unsigned long delta ) const

  Use this function to obtain the point on the IBasicCurve at the specified parametric value and a known breakpoint. Internal version used only by derived classes.

  u
    The parametric value at which to evaluate the curve. (IGCurve2D::minParameter() >=u> IGCurve2D::maxParameter())
  delta
    The breakpoint index.

Return
  The point on the curve that corresponds to the specified parametric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

evaluateW

      public:
      RPointType evaluateW(GParametric u) const

  Obtains the point on the IBasicCurve at the specified parametric value without dividing out W.

  u
    The parametric value at which to evaluate the curve. (IGCurve2D::minParameter() >=u> IGCurve2D::maxParameter())

Return
  The point on the curve that corresponds to the specified parametric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Generating a Curve that Translates Arc Length

Use this function to generate a reparameterization curve.

approximateArcLengthReparameterizationCurve

      public:
      void
        approximateArcLengthReparameterizationCurve( IGCurve2D& reparamCurve,
                                                     unsigned long maxPts = 0,
                                                     GCoordinate tolerance = 0.01 )

  Generates a reparameterization curve that translates arc length to parameter.

  reparamCurve
    The generated reparameterization curve.
  maxPts
    The total number of control points allowed in the reparameterization curve.
  tolerance
    Tolerance used for the accuracy of the root finder.

Return
  Parameter

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Getting the Arc Length

Use these functions to obtain the length of an arc of the curve.

arcLength
  Use the functions in this group to identify an arc on the curve.

  Overload 1
  Returns arc length of (optionally specified) section of the loop.

      public:
      GCoordinate
        arcLength( GParametric uFrom,
                   GParametric uTo ) const

  Use this function to obtain the arc length of (optionally specified) section of the loop. Note that the current implementation is likely to have accuracy problems for curves with order higher than 5.

  uFrom
    Start of section.
  uTo
    End of section.

Return
  Arc length along curve.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2
  Returns arc length of section of the loop.

      public:
      GCoordinate arcLength() const

  Use this function to obtain the arc length of section of the loop. Works over entire parameter range.

  None

Return
  Arc length along curve.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Manipulating Points on the Curve

Use the functions in this group to manipulate points.

approximateLowerOrder

      public:
      void
        approximateLowerOrder( unsigned long newOrder,
                               GCoordinate tolerance = 0.2 )

  Approximates a higher-order curve with a lower-order one. Control points are added to the lower order curve until the approximation falls within "tolerance". The curve in question is Bezified first. You can't lower something to linear (newOrder must be > 2) or "lower" it to an order higher than it already is(doing so fails an assertion). The tolerance is specified in absolute coordinates(not relative to the size of the curve).

  newOrder
    The order of the new curve; must be greater than 2, but not greater than the current order.
  tolerance
    The tolerance, specified in absolute coordinates (not relative to the size of the curve).

Exception

  | A parameter assertion fails if the new order is less than or equal to the curve's current order, or greater than 2.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setPoint

      public:
      void setPoint(unsigned long i, const RPointType& p)

  Replaces this curve's control point at the specified index with the specified point.

  i
    The index (into the array of control points) of the point to be replaced.
  p
    The new control point.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setPoints

      public:
      void
        setPoints( const IRawArray < RPointType >& controlPoints )

  Copies points in from your heap block. (The heap block must have same number of points).

  controlPoints
    The new set of control points. There must be at least two points in the array.

Exception

  | An assertion fails if the number of points passed in is less than or equal to 2.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Manipulating the Knots

Use the functions in this group to manipulate knots.

insertKnot

      public:
      void insertKnot(GParametric u)

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

  u
    The parametric value of the point at which the knot is inserted. It must be greater than the parametric value of the curve's start point and less than the parametric value of the end point.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

moveKnot

      public:
      void moveKnot(unsigned long index, GParametric u)

  Moves the knot at index i to u. May re-sort knots to ensure knot(i+1)>=knot(i) for all i.

  index
    The index (into the knot vector) of the knot to be moved.
  u
    The parametric location to which the knot is moved.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

refine

      public:
      void refine(const IRawArray < GParametric >& newKnots)

  Insert the given knots into this IBaseCurve, adding new control points without modifying the curve's shape.

  newKnots
    The parametric values of the locations at which the new knots are to be inserted.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

refineToPinned

      public:
      void refineToPinned()

  Adds knots to the beginning and end of the knot vector so that the control polygon is pinned to the ends of the curve. This function is only applicable to curves with floating end conditions. The shape of the curve is not changed.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

refineUniform

      public:
      void refineUniform()

  Adds a new knot midway between every nonzero interval in the knot vector.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setKnots

      public:
      void setKnots(const IRawArray < GParametric >& knots)

  Resets this curve's knot vector to the specified array. The data is 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.

  knots
    The array to be copied into the knot vector.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setKnotScheme

      public:
      void setKnotScheme(EndConditions theType = kPinned)

  Sets the knot vector to one of three standard schemes (pinned, floating, or Bezier), without any refinement.

  theType
    The knot scheme. The default value is kPinned.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Modifying the Curve

Use the functions in this group to modify the curve in various ways.

concatenate

      public:
      void
        concatenate( const IBaseCurve < RPointType,
                     PointType >& p,
                     bool glue = true )

  Appends the given curve at the end of the current curve. Glue parameter determines whether joining beginning and end points should be merged(glue==true) or left as double control points.

  p
    The curve to be joined to this one.
  glue
    Determines whether joining beginning and endpoints should be merged (glue==true) or left as double control points.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

dragPosition

      public:
      void
        dragPosition( GParametric u,
                      const PointType& toPoint,
                      GParametric segmentMinimum = 0.2,
                      GParametric segmentMaximum = 0.8 )

  Changes the curve shape so that at parameter u, it goes through ToPoint.

  u
    The parametric position to be dragged to the new location.
  toPoint
    The new location.
  segmentMinimum
    The parametric value below which a point on the curve will not be moved.
  segmentMaximum
    The parametric value above which a point on the curve will not be moved.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

dragTangent

      public:
      void
        dragTangent( GParametric u,
                     const PointType& toTangent,
                     GParametric segmentMinimum = 0.2,
                     GParametric segmentMaximum = 0.8 )

  Change curve shape so that at parameter u, it has the specified tangent. Like dragCurve, but instead modifies the -tangent- at the u parameter given. i.e., Adobe rocker arms you can put anyplace on the curve.

  u
    The parametric position to be dragged to the new location.
  toTangent
    The new tangent.
  segmentMinimum
    The parametric value below which a point on the curve will not be moved.
  segmentMaximum
    The parametric value above which a point on the curve will not be moved.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

makeCompatible

      public:
      static void
        makeCompatible( IBaseCurve < RPointType,
                        PointType >& curve1,
                        IBaseCurve < RPointType,
                        PointType >& curve2 )

  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 vector as necessary.

  curve1
    The first curve to be made compatible.
  curve2
    The second curve to be made compatible to.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

makeDiscontinuity

      public:
      void makeDiscontinuity(GParametric u, EDiscontinuity cont)

  Adds a specified discontinuity at the specified parametric location. The values for n are determined by the EDiscontinuity parameter. If a discontinuity already exists at u, it is either left as is or raised to the desired one. Note this method just introduces the discontinuity into the knot vector, it does not change the shape of the curve.

  u
    The parametric location for the discontinuity.
  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.

Exception

  | Calls a parameter assertion that fails if the specified parametric location is less than the first knot in the knot vector or greater than the last knot in the curve's knot vector

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

numberOfKnots

      public:
      unsigned long numberOfKnots() const

  Returns the number of knots in the knot vector. This is equal to the number of control points plus the order of the curve.

Return
  The number of knots in the knot vector.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

refineToBeziers
  Turns the curve into a collection of piecewise Bezier segments.

      public:
      void refineToBeziers()

  Inserts additional knots so that all interior knots have a multiplicity equal to the order minus one. Does not change the shape.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

reverseDirection

      public:
      void reverseDirection()

  Reverses the order of a curve's points so the parameterization runs the opposite direction. The geometric shape is unchanged.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

setOrder

      public:
      void setOrder(unsigned long order)

  Changes the order of curve. This DOES change the shape, but leaves the number of points intact.

  order
    The new order of the curve.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

incrementOrder
  Converts a k order spline to a k+1 order spline.

      protected:
      void incrementOrder()

  Convert a k order spline to a k+1 order spline. Note this procedure generates spurious control points splines with other than "Closed" end conditions (k-fold knots at each end).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

prAppendCurve
  Prepends the given curve at the beginning of the current curve.

      protected:
      void
        prAppendCurve( IBaseCurve < RPointType,
                       PointType >& crv,
                       bool glue )

  Pre-appends the given curve at the beginning of the current curve. Glue parameter determines whether joining beginning and end points should be merged(glue==true) or left as double control points.

  p
    The curve to be joined to this one.
  glue
    Determines whether joining beginning and endpoints should be merged (glue==true) or left as double control points. Default value is TRUE.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

reduceOneDegree

      protected:
      static void
        reduceOneDegree( IRawArray < RPointType >& pts,
                         unsigned long order,
                         unsigned long numPts,
                         GCoordinate tolerance,
                         long* discons,
                         unsigned long numDiscons,
                         unsigned long* newPts )

  Converts a k (k > 0 ) order spline to a k-1 order spline.

  pts
    The array of control points of the input curve.
  order
    The order of the input curve.
  numPts
    The number of control points.
  tolerance
    The tolerance level for error.
  discons
    The array of discontinuities.
  numDiscons
    The number of discontinuities.
  newPts
    The new array of points of the returned curve.

Return
  The point on the curve that corresponds to the specified parametric value.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Obtaining Information About the Curve

Use the functions in this group to obtain information about the curve.

approximateParameterFromArcLength

      public:
      GParametric
        approximateParameterFromArcLength( GCoordinate length,
                                           GCoordinate tolerance = 1.0e - 5 ) const

  Approximates the parameter, given a particular arc length along the curve. Tolerance is used for the accuracy of the root finder, leave it alone for most "screen sized" data.

  length
    Arc length along curve.
  tolerance
    Tolerance used for the accuracy of the root finder.

Return
  Parameter

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

isBezier

      public:
      bool isBezier() const

  Determines whether this curve defines a piecewise Bezier curve.

Return
  True if the knot vector defines a piecewise Bezier curve.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

isConsistent

      public:
      bool isConsistent()

  Checks for invalid knot vectors, W's, duplicate points, and values grossly out of range.

Return
  True if no offending condition is found.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

isEmpty

      public:
      bool isEmpty() const

  Returns true if the curve or loop has no points or is an empty loop.

Return
  True if the curve is empty.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

isPinned

      public:
      bool isPinned() const

  Determines whether this curve passes through the first and last control points (that is, whether the knot vector is pinned).

Return
  True if this curve passes through the first and last control points.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

knot

      public:
      GParametric knot(unsigned long i) const

  Gets the parametric value of the specified knot.

  i
    The index (into the knot vector) of the desired knot.

Return
  The parametric value of the specified knot.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

knots

      public:
      void knots(IRawArray < GParametric >& knots) const

  Returns, by reference in its argument, the knot vector of this curve.

  knots
    The knot vector.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

maxParameter

      public:
      GParametric maxParameter() const

  Returns the parametric value that has been associated with the curve's end point.

Return
  The maximum parametric value of this curve.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

minParameter

      public:
      GParametric minParameter() const

  Returns the parametric value that has been associated with the curve's beginning point.

Return
  The minimum parametric value of this curve.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

nearestParametric

      public:
      GParametric nearestParametric(const PointType& test) const

  Returns the parametric value of the closest point on the curve to the center of the rectangle. WARNING: The current implementation works by discretizing the curve in 72 DPI device space - beware of this fact if you call nearestParametric with gigantic or microscopic coordinates. In the future, there will be a resolution-independent implementation.

  test
    The point (on or off the curve) whose corresponding parameter is to be determined.

Return
  The parametric value closest to the specified point.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

nextDiscontinuity

      public:
      unsigned long
        nextDiscontinuity( unsigned long startIndex,
                           unsigned long discontinuity = 0 ) const

  Returns the knot vector index of the next discontinuity following the specified knot. nextDiscontinuity returns the index of the first knot of a multiple knot sequence. Call knot on this value to find the parameter of the curve at the discontinuity. Note that for a c0 break in the curve, the value returned by knot(nextDiscontinuity(...)) is the start of the section of the curve after the break. Subtracting any amount from that jumps to the section before the break). To find the control point associated with a C1 discontinuity, subtract one from the value returned by nextDiscontinuity. For a c0 discontinuity, nextDiscontinuity(...)-1 is the point before the break, and the following point is after the break. To skip from one discontinuity to the next, you can pass the value returned from the last call as the "startIndex" parameter. If there are no more discontinuities in the curve, numberKnots()-1 is returned(the last valid knot). Assertions fail if the discontinuity parameter is not 0 <= discon < order.

  startIndex
    The index (into the knot vector) of the knot that precedes the discontinuity to be found.
  discontinuity
    The order of the discontinuity to be found.

Return
  The index (into the knot vector) of the next discontinuity. If no more discontinuities are found, the return value is the index ot the last knot.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

numberOfPoints

      public:
      unsigned long numberOfPoints() const

  Returns the number of control points in this IBaseCurve.

Return
  The order of control points in the curve.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

order

      public:
      unsigned long order() const

  Returns the order of this IBaseCurve.

Return
  The order of the curve.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

point

      public:
      RPointType point(unsigned long i) const

  Returns the control point specified by the index.

  i
    The index (into the array of control points) of the desired point.

Return
  The control point.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

points

      public:
      void points(IRawArray < RPointType >& pts) const

  Returns, in its argument, the complete array of control points.

  pts
    The curve's control points, returned by reference.

Exception

  | An assertion fails if the curve is empty (uninitialized).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

raiseOrder

      public:
      void raiseOrder(unsigned long newOrder)

  Raises the order of the curve without changing its shape (changes number points and knots).

  newOrder
    The degree to which the curve should be raised. If the value is less than the current order, the function does nothing.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

sectionOfCurve

      public:
      void
        sectionOfCurve( GParametric from,
                        GParametric to,
                        IBaseCurve < RPointType,
                        PointType >& section ) const

  Returns the section of the curve between the two specified parametric values. Note if "to" < "from", then the direction of the subsection is reversed.

  from
    The parametric value of the initial point of the section.
  to
    The parametric value of the end point of the section.
  section
    The section of curve to be returned.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Streaming the Object In and Out

Use the operators and functions in this group to read the object in from the stream and write it out to it.

operator <<=

      public:
      IDataStream& operator <<=(IDataStream&)

  Reads the object in.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

operator >>=

      public:
      IDataStream& operator >>=(IDataStream&) const

  Writes the object out.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

readFromStream

      public:
      void readFromStream(IDataStream& toWhere)

  Reads the object in from the specified stream.

  fromStream
    The stream used to read in the object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

writeToStream

      public:
      void writeToStream(IDataStream& toWhere) const

  Writes the object out to the specified stream.

  toWhere
    The stream that the object is written out to.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IBaseCurve - Enumerations

EDiscontinuity

      enum EDiscontinuity { kBreak=0,
                            kKink=1,
                            kJerk=2 }

  EDiscontinuity enumerates these constants that define the types of discontinuity: kBreak = 0 (specifies a break in the curve - c0 discontinuity), kKink = 1 (specifies a c1 tangent discontinuity), kJerk = 2 (specifies a c2 accelleration discontinuity).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

EndConditions

      enum EndConditions { kPinned,
                           kFloating,
                           kBezier }

  EndConditions enumerates these constants that define types of end point conditions: kPinned (knot vector for curve interpolating endpoints), kFloating (uniform knot vector, no endpoint interpolation), kBezier (piecewise Bezier curve).

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IBaseCurve - Inherited Member Functions and Data

#### Inherited Public Functions

  - None

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  - None

#### Inherited Protected Data

  - None