### IGTensionSpline

  The IGTensionSpline class provides a cubic matrix spline, where the curve is defined by points, and interpolation is controlled by bias and tension values. IGTensionSpline is one of several lightweight classes derived from IGCurve2D. Its sole purpose is to render unambiguous the constructors for cubic splines having similar arguments. Note the number of points must be a multiple of four (else assertion).

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

### IGTensionSpline - Member Functions and Data by Group

### Constructors & Destructor

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

~IGTensionSpline

      public:
      virtual ~IGTensionSpline()

  Destroys the IGTensionSpline object.

Supported Platforms

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

IGTensionSpline
  Constructs an object of class IGTensionSpline.

  Overload 1
  Default constructor which does nothing.

      public:
      IGTensionSpline()

Supported Platforms

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

  Overload 2
  Copy constructor.

      public:
      IGTensionSpline(const IGTensionSpline&)

  Use this constructor to create an IGTensionSpline object that is copied from the given one.

  IGCardinalSpline
    A constant reference to the spline to be copied.

Supported Platforms

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

  Overload 3
  Constructs a curve as a cubic matrix spline, where the curve is defined by points, and interpolation is controlled by bias and tension values.

      public:
      IGTensionSpline( const IGPoint2DArray& points,
                       GCoordinate tension,
                       GCoordinate bias )

  Use this constructor to create a curve as a cubic matrix spline, where the curve is defined by points, and interpolation is controlled by bias and tension values.

  points
    The control points.
  tension
    The tension. 1.0 is a normalized value.
  bias
    The bias. This skews the curve towards a particular control point.

Exception

  | A parameter assertion fails if the number of points is not a multiple of four.

Supported Platforms

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

### IGTensionSpline - Inherited Member Functions and Data

#### Inherited Public Functions

  IBaseCurve

  -     virtual ~IBaseCurve()

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

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

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

  -     GCoordinate arcLength() const

  -     GCoordinate
          arcLength( GParametric uFrom,
                     GParametric uTo ) const

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

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

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

  -     PointType evaluate(GParametric u) const

  -     PointType evaluate(GParametric u, PointType& tangent) const

  -     PointType
          evaluate( GParametric u,
                    PointType& tangent,
                    PointType& deriv2 ) const

  -     RPointType evaluateW(GParametric u) const

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

  -     IBaseCurve(unsigned long order, unsigned long numberPoints)

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

  -     IBaseCurve()

  -     IBaseCurve( const PointType& p0,
                    const PointType& p1,
                    const PointType& p2,
                    const PointType& p3 )

  -     IBaseCurve( const PointType& p0,
                    const PointType& p1,
                    const PointType& p2 )

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

  -     IBaseCurve( const IBaseCurve < RPointType,
                    PointType >& curve )

  -     bool isBezier() const

  -     bool isConsistent()

  -     bool isEmpty() const

  -     bool isPinned() const

  -     GParametric knot(unsigned long i) const

  -     void knots(IRawArray < GParametric >& knots) const

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

  -     void makeDiscontinuity(GParametric u, EDiscontinuity cont)

  -     GParametric maxParameter() const

  -     GParametric minParameter() const

  -     GParametric nearestParametric(const PointType& test) const

  -     unsigned long
          nextDiscontinuity( unsigned long startIndex,
                             unsigned long discontinuity = 0 ) const

  -     unsigned long numberOfKnots() const

  -     unsigned long numberOfPoints() const

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

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

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

  -     unsigned long order() const

  -     RPointType point(unsigned long i) const

  -     void points(IRawArray < RPointType >& pts) const

  -     void raiseOrder(unsigned long newOrder)

  -     void refine(const IRawArray < GParametric >& newKnots)

  -     void refineToBeziers()

  -     void refineToPinned()

  -     void refineUniform()

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

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

  -     void
          setPoints( const IRawArray < RPointType >& controlPoints )

  IGCurve2D

  -     virtual ~IGCurve2D()

  -     virtual IGRect2D bounds() const

  -     void controlPolyline(IGPolyline2D& polyline) const

  -     void
          dragPosition( GParametric u,
                        const IGPoint2D& toPoint,
                        GParametric segmentMinimum = 0.2,
                        GParametric segmentMaximum = 0.8 )

  -     void
          dragTangent( GParametric u,
                       const IGPoint2D& toTangent,
                       GParametric segmentMinimum = 0.2,
                       GParametric segmentMaximum = 0.8 )

  -     IGPoint2D evaluate(GParametric u, IGPoint2D& tangent) const

  -     IGPoint2D evaluate(GParametric u) const

  -     IGPoint2D
          evaluate( GParametric u,
                    IGPoint2D& tangent,
                    IGPoint2D& deriv2,
                    GCoordinate& curvature ) const

  -     IGPoint2D
          evaluate( GParametric u,
                    IGPoint2D& tangent,
                    IGPoint2D& deriv2 ) const

  -     IGRPoint2D evaluateW(GParametric u) const

  -     IGCurve2D( unsigned long order,
                   const IGRPoint2DArray& points,
                   const IRawArray < GParametric >& knots )

  -     IGCurve2D( unsigned long order,
                   const IGRPoint2DArray& points )

  -     IGCurve2D( unsigned long order,
                   unsigned long numberPoints,
                   const IRawArray < GParametric >& knots )

  -     IGCurve2D( const IGEllipse2D& e,
                   GDegrees angle1,
                   GDegrees angle2 )

  -     IGCurve2D( const IGPoint2D& p0,
                   const IGPoint2D& p1,
                   const IGPoint2D& p2 )

  -     IGCurve2D()

  -     IGCurve2D(unsigned long order, unsigned long numberPoints)

  -     IGCurve2D(const IGLine2D& line)

  -     IGCurve2D(const IGCurve2D& curve)

  -     IGCurve2D( const IGPoint2D& p0,
                   const IGPoint2D& p1,
                   const IGPoint2D& p2,
                   const IGPoint2D& p3 )

  -     IGCurve2D(const IGPolyline2D& polyline)

  -     void insertKnot(GParametric u)

  -     bool intersects(const IGRect2D& g) const

  -     static void
          makeCompatible( IGCurve2D& curve1,
                          IGCurve2D& curve2 )

  -     void moveKnot(unsigned long index, GParametric u)

  -     IDataStream& operator <<=(IDataStream&)

  -     IGCurve2D& operator =(const IGCurve2D& Src)

  -     IDataStream& operator >>=(IDataStream&) const

  -     void readFromStream(IDataStream& toWhere)

  -     void reverseDirection()

  -     void setKnots(const IRawArray < GParametric >& knots)

  -     void setKnotScheme(EndConditions theType = kPinned)

  -     void setOrder(unsigned long order)

  -     void setPoint(unsigned long i, const IGRPoint2D& p)

  -     void
          setPoints( const IRawArray < IGRPoint2D >& controlPoints )

  -     void transformBy(const IGrafMatrix& mat)

  -     void writeToStream(IDataStream& toWhere) const

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IBaseCurve

  -     PointType
          evaluate( GParametric u,
                    unsigned long delta ) const

  -     void incrementOrder()

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

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

  IGCurve2D

  -     void
          prAppendCurve( IBaseCurve < IGRPoint2D,
                         IGPoint2D >& crv,
                         bool glue )

#### Inherited Protected Data

  - None