A part of a curve. More...
#include <BasicCurvePart.h>
Public Member Functions | |
BasicCurvePart (CurvePtr p, int start, int end) | |
Creates a new CurvePart. | |
BasicCurvePart (CurvePtr p, int orientation, int start, int end) | |
Creates a new CurvePart. | |
virtual CurveId | getId () const |
Returns the original curve Id. | |
virtual CurveId | getParentId () const |
Returns the original curve parentId. | |
CurvePtr | getCurve () const |
Returns the original curve. | |
int | getCurveIndex (int i) const |
Returns the corresponding index of i in the original curve. | |
virtual int | getType () const |
Returns the original curve type. | |
virtual float | getWidth () const |
Returns the original curve width. | |
virtual int | getEnd () const |
Returns the length if this curvepart. | |
virtual vec2d | getXY (int i) const |
Returns the XY coords of the i'th point from this curve. | |
virtual bool | getIsControl (int i) const |
Returns the value isControl of the i'th point from this curve. | |
virtual float | getS (int i) const |
Returns the S coords of the i'th point from this curve. | |
virtual box2d | getBounds () const |
Returns the bounds of this curvePart. | |
virtual bool | canClip (int i) const |
Returns false if the i'th point is a controlPoint, else true. | |
virtual CurvePart * | clip (int start, int end) const |
Clips this curvePart. | |
Protected Attributes | |
CurvePtr | curve |
The original curve. | |
int | orientation |
The orientation of this curve part. | |
int | start |
Start of the interval, inside path, to which this curve part corresponds (inclusive). | |
int | end |
End of the interval, inside path, to which this curve part corresponds (inclusive). |
A part of a curve.
This part is defined by a curve, and by two indexes that give the start and end points of this curve part inside the whole curve.
proland::BasicCurvePart::BasicCurvePart | ( | CurvePtr | p, | |
int | start, | |||
int | end | |||
) |
Creates a new CurvePart.
p | the whole curve. | |
start | start of the interval in p to which this part corresponds. | |
end | end of the interval in p to which this part corresponds. |
proland::BasicCurvePart::BasicCurvePart | ( | CurvePtr | p, | |
int | orientation, | |||
int | start, | |||
int | end | |||
) |
Creates a new CurvePart.
p | the whole curve. | |
orientation | the curve part orientation (see orientation). | |
start | start of the interval in p to which this part corresponds. | |
end | end of the interval in p to which this part corresponds. |
virtual bool proland::BasicCurvePart::canClip | ( | int | i | ) | const [virtual] |
Returns false if the i'th point is a controlPoint, else true.
i | rank of the point. |
Reimplemented from proland::CurvePart.
virtual CurvePart* proland::BasicCurvePart::clip | ( | int | start, | |
int | end | |||
) | const [virtual] |
Clips this curvePart.
start | starting point. | |
end | end point. |
Implements proland::CurvePart.
virtual box2d proland::BasicCurvePart::getBounds | ( | ) | const [virtual] |
Returns the bounds of this curvePart.
Implements proland::CurvePart.
CurvePtr proland::BasicCurvePart::getCurve | ( | ) | const [virtual] |
Returns the original curve.
Reimplemented from proland::CurvePart.
int proland::BasicCurvePart::getCurveIndex | ( | int | i | ) | const |
Returns the corresponding index of i in the original curve.
i | rank of the point |
virtual int proland::BasicCurvePart::getEnd | ( | ) | const [virtual] |
Returns the length if this curvepart.
Implements proland::CurvePart.
virtual CurveId proland::BasicCurvePart::getId | ( | ) | const [virtual] |
Returns the original curve Id.
Reimplemented from proland::CurvePart.
virtual bool proland::BasicCurvePart::getIsControl | ( | int | i | ) | const [virtual] |
Returns the value isControl of the i'th point from this curve.
i | rank of the point to get the boolean from. |
Reimplemented from proland::CurvePart.
virtual CurveId proland::BasicCurvePart::getParentId | ( | ) | const [virtual] |
Returns the original curve parentId.
Reimplemented from proland::CurvePart.
virtual float proland::BasicCurvePart::getS | ( | int | i | ) | const [virtual] |
Returns the S coords of the i'th point from this curve.
i | rank of the point to get the coord from. |
Implements proland::CurvePart.
virtual int proland::BasicCurvePart::getType | ( | ) | const [virtual] |
Returns the original curve type.
Reimplemented from proland::CurvePart.
virtual float proland::BasicCurvePart::getWidth | ( | ) | const [virtual] |
Returns the original curve width.
Reimplemented from proland::CurvePart.
virtual vec2d proland::BasicCurvePart::getXY | ( | int | i | ) | const [virtual] |
Returns the XY coords of the i'th point from this curve.
i | rank of the point to get the coords from. |
Implements proland::CurvePart.
CurvePtr proland::BasicCurvePart::curve [protected] |
The original curve.
int proland::BasicCurvePart::end [protected] |
End of the interval, inside path, to which this curve part corresponds (inclusive).
int proland::BasicCurvePart::orientation [protected] |
int proland::BasicCurvePart::start [protected] |
Start of the interval, inside path, to which this curve part corresponds (inclusive).