Note that currently curves of order 7 or higher are not supported. Also consider that IRawArray does not check whether allocation is successful. Before construction, one should check if there is enough memory and use a reasonable size.
Use the constructors and destructor in this group to create and destroy objects of class IGCurve2D.
![]() |
public:
virtual ~IGCurve2D()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IGCurve2D( const IGPoint2D& p0, const IGPoint2D& p1, const IGPoint2D& p2 )
A parameter assertion fails if the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D(const IGLine2D& line)
A parameter assertion fails if number of points is less than the order, or the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D(const IGCurve2D& curve)
A parameter assertion fails if number of points is less than the order, or the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D( unsigned long order, const IGRPoint2DArray& points )
A parameter assertion fails if number of points is less than the order, or the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D( unsigned long order, const IGRPoint2DArray& points, const IRawArray < GParametric >& knots )
A parameter assertion fails if number of points is less than the order, or the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D(unsigned long order, unsigned long numberPoints)
A parameter assertion fails if number of points is less than the order, or the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D( unsigned long order, unsigned long numberPoints, const IRawArray < GParametric >& knots )
A parameter assertion fails if number of points is less than the order, or the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D( const IGPoint2D& p0, const IGPoint2D& p1, const IGPoint2D& p2, const IGPoint2D& p3 )
A parameter assertion fails if the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D(const IGPolyline2D& polyline)
A parameter assertion fails if number of points is less than the order, or the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D( const IGEllipse2D& e, GDegrees angle1, GDegrees angle2 )
A parameter assertion fails if number of points is less than the order, or the order is less than 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGCurve2D()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use this operator to assign the given IGCurve2D object to the target one.
![]() |
public:
IGCurve2D& operator =(const IGCurve2D& Src)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to set the curve's points, set its control points as a polyline, transform its control points by the specified matrix, get the point on the IGCurve2D at the specified parametric value, and reverse the order of a curve's points so the parameterization runs the opposite direction.
![]() |
public:
void controlPolyline(IGPolyline2D& polyline) const
An assertion fails if the curve is empty (uninitialized). |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IGPoint2D evaluate( GParametric u, IGPoint2D& tangent, IGPoint2D& deriv2 ) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGPoint2D evaluate( GParametric u, IGPoint2D& tangent, IGPoint2D& deriv2, GCoordinate& curvature ) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGPoint2D evaluate(GParametric u) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGPoint2D evaluate(GParametric u, IGPoint2D& tangent) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IGRPoint2D evaluateW(GParametric u) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void reverseDirection()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void setOrder(unsigned long order)
An assertion fails if the curve is empty (uninitialized). |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void setPoint(unsigned long i, const IGRPoint2D& p)
An assertion fails if the curve is empty (uninitialized). |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void setPoints( const IRawArray < IGRPoint2D >& controlPoints )
An assertion fails if the number of points passed in is less than or equal to 2. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void transformBy(const IGrafMatrix& mat)
An assertion fails if the curve is empty (uninitialized). |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to insert, set, and move the curve's knots.
![]() |
public:
void insertKnot(GParametric u)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void moveKnot(unsigned long index, GParametric u)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void setKnots(const IRawArray < GParametric >& knots)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void setKnotScheme(EndConditions theType = kPinned)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to change the shape or position of the curve, or extend it.
![]() |
public:
void dragPosition( GParametric u, const IGPoint2D& toPoint, GParametric segmentMinimum = 0.2, GParametric segmentMaximum = 0.8 )
An assertion fails if the curve is empty (uninitialized). |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void dragTangent( GParametric u, const IGPoint2D& toTangent, GParametric segmentMinimum = 0.2, GParametric segmentMaximum = 0.8 )
An assertion fails if the curve is empty (uninitialized). |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static void makeCompatible( IGCurve2D& curve1, IGCurve2D& curve2 )
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
void prAppendCurve( IBaseCurve < IGRPoint2D, IGPoint2D >& crv, bool glue )
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to determine if the curve intersects the given rectangle and to get the bounds of its control points.
![]() |
public:
virtual IGRect2D bounds() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool intersects(const IGRect2D& g) const
An assertion fails if the curve is empty (uninitialized). |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to read the IGCurve2D object in from the specified stream or write it out to it.
![]() |
public:
IDataStream& operator <<=(IDataStream&)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDataStream& operator >>=(IDataStream&) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void readFromStream(IDataStream& toWhere)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void writeToStream(IDataStream& toWhere) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
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, unsigned long numberPoints)
IBaseCurve( unsigned long order, unsigned long numberPoints, const IRawArray < GParametric >& knots )
IBaseCurve( const PointType& p0, const PointType& p1, const PointType& p2 )
IBaseCurve( const PointType& p0, const PointType& p1, const PointType& p2, const PointType& p3 )
IBaseCurve( unsigned long order, const IRawArray < RPointType >& points )
IBaseCurve()
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 )
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 )