For some applications, a closed loop whose start and end control points coincide may be preferable; calling the closeLoop default constructor on a loop, whether floating or pinned, will create this configuration without changing the shape. If c0 discontinuities are encountered in the curve defining the loop, they are closed separately when the loop is rendered; internal segments are closed with straight lines. The direction of each piece is used to determine whether a point is inside or outside the loop, along with the setting of the EOFill flag.
Note that IRawArray does not check whether allocation is successful. Before construction, your should check to ensure that there is enough memory and use a reasonable size.
Use the functions in this group to construct and destroy objects of class IGLoop2D.
![]() |
public:
virtual ~IGLoop2D()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IGLoop2D(const IGPolygon2D& polygon)
An assertion fails if the order is less than two, or if the number of control points is less than the order, or the knot vector is less than the order plus the number of control points. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D(const IGLoop2D&)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D(const IGEllipse2D& ellipse)
An assertion fails if the order is less than two, or if the number of control points is less than the order, or the knot vector is less than the order plus the number of control points. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D( unsigned long order, const IGRPoint2DArray& points, bool EOFill = true )
An assertion fails if the order is less than two, or if the number of control points is less than the order, or the knot vector is less than the order plus the number of control points. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D( unsigned long order, const IGRPoint2DArray& points, const IRawArray < GParametric >& knots, bool EOFill = true )
An assertion fails if the order is less than two, or if the number of control points is less than the order, or the knot vector is less than the order plus the number of control points. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D( unsigned long order, unsigned long numberPoints, bool EOFill = true )
An assertion fails if the order is less than two, or if the number of control points is less than the order, or the knot vector is less than the order plus the number of control points. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D( unsigned long order, unsigned long numberPoints, const IRawArray < GParametric >& knots, bool EOFill = true )
An assertion fails if the order is less than two, or if the number of control points is less than the order, or the knot vector is less than the order plus the number of control points. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D(const IGRect2D& rect)
An assertion fails if the order is less than two, or if the number of control points is less than the order, or the knot vector is less than the order plus the number of control points. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D( const IGRect2D& roundRect, const IGPoint2D& aspect )
An assertion fails if the order is less than two, or if the number of control points is less than the order, or the knot vector is less than the order plus the number of control points. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D(const IGCurve2D&, bool EOFill = true)
An assertion fails if the order is less than two, or if the number of control points is less than the order, or the knot vector is less than the order plus the number of control points. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IGLoop2D()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to approximate the current 2D loop with a lower-order one and to approximate the parameter, given a particular arc length along the loop.
![]() |
public:
void approximateLowerOrder( unsigned long newOrder, GCoordinate tolerance = 0.2 )
A parameter assertion fails if the new order is less than or equal to the loop's current order, or greater than 2 |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
GParametric approximateParameterFromArcLength( GCoordinate length, GCoordinate tolerance = 0.02 ) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use this operator to replace the existing object with the given, assigned one.
![]() |
public:
IGLoop2D& operator =(const IGLoop2D& Src)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to close the loop by making its starting and ending control points coincide or to add a discontinuity at a parametric location after closing the loop.
![]() |
public:
void closeLoop()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void makeDiscontinuity(GParametric u, EDiscontinuity cont)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the operators in this group to test a given 2D loop with the current one for equality or inequality.
![]() |
public:
bool operator !=(const IGLoop2D& Src) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool operator ==(const IGLoop2D& Src) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to modify a loop by changing its shape or making its starting and ending control points coincident, or to modify two loops to have the same order, the same number of points, and the same knot vector, without changing the shape of either of them.
![]() |
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:
void insertKnot(GParametric u)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static void makeCompatible( IGLoop2D& curve1, IGLoop2D& curve2 )
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void raiseOrder(unsigned long newOrder)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void refineToBeziers()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void refineToPinned()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to obtain a control point at a specific location, compute the tangent at the point, compute the tangent and second derivative at the point, determine whether the loop contains a specific control point, and reverse the order of a curve's points so the parameterization runs the opposite direction.
![]() |
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:
IGPoint2D evaluate( GParametric u, IGPoint2D& tangent, IGPoint2D& deriv2 ) 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 |
Use these functions to obtain information about the loop, such as the length of its arc, the extended curve representing the loop, the length of a specific section of its arc, a section of the loop, whether the loop contains a specific control point, parametric range of a section of a loop, and whether the loop intersects a given triangle.
![]() |
public:
GCoordinate arcLength() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
GCoordinate arcLength( GParametric uFrom, GParametric uTo ) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IGRect2D bounds() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool contains(const IGPoint2D& p) const
An assertion fails if the loop is empty (that is, both the order and the number of control points are equal to zero). |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool intersects(const IGRect2D& g) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
GParametric maxParameter() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
GParametric nearestParametric(const IGPoint2D& test) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void sectionOfCurve( GParametric from, GParametric to, IGCurve2D& section ) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions in this group to set the rule fill flag and to determine which of two filling rules to use.
![]() |
public:
bool eOFill() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
void setEOFill(bool EOFill)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use the functions and operators in this group to stream objects in an out using the specified streams.
![]() |
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 )
GParametric approximateParameterFromArcLength( GCoordinate length, GCoordinate tolerance = 1.0e - 5 ) 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, PointType& deriv2 ) const
PointType evaluate(GParametric u, PointType& tangent) const
RPointType evaluateW(GParametric u) const
IBaseCurve( const PointType& p0, const PointType& p1, const PointType& p2 )
IBaseCurve( unsigned long order, const IRawArray < RPointType >& points )
IBaseCurve( const IBaseCurve < RPointType, PointType >& curve )
IBaseCurve()
IBaseCurve( const PointType& p0, const PointType& p1, const PointType& p2, const PointType& p3 )
IBaseCurve(unsigned long order, unsigned long numberPoints)
IBaseCurve( unsigned long order, unsigned long numberPoints, const IRawArray < GParametric >& knots )
IBaseCurve( unsigned long order, const IRawArray < RPointType >& points, const IRawArray < GParametric >& knots )
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 )
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 refine(const IRawArray < GParametric >& newKnots)
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 )
virtual ~IGCurve2D()
void controlPolyline(IGPolyline2D& polyline) const
IGCurve2D(const IGLine2D& line)
IGCurve2D( const IGPoint2D& p0, const IGPoint2D& p1, const IGPoint2D& p2, const IGPoint2D& p3 )
IGCurve2D()
IGCurve2D( unsigned long order, const IGRPoint2DArray& points )
IGCurve2D( unsigned long order, const IGRPoint2DArray& points, const IRawArray < GParametric >& knots )
IGCurve2D( const IGEllipse2D& e, GDegrees angle1, GDegrees angle2 )
IGCurve2D( unsigned long order, unsigned long numberPoints, const IRawArray < GParametric >& knots )
IGCurve2D(unsigned long order, unsigned long numberPoints)
IGCurve2D( const IGPoint2D& p0, const IGPoint2D& p1, const IGPoint2D& p2 )
IGCurve2D(const IGCurve2D& curve)
IGCurve2D(const IGPolyline2D& polyline)
static void makeCompatible( IGCurve2D& curve1, IGCurve2D& curve2 )
void moveKnot(unsigned long index, GParametric u)
IGCurve2D& operator =(const IGCurve2D& Src)
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)
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 )
void prAppendCurve( IBaseCurve < IGRPoint2D, IGPoint2D >& crv, bool glue )