A part of a curve. More...
#include <LineCurvePart.h>
Public Member Functions | |
LineCurvePart (vec2d start, vec2d end) | |
Creates a new LineCurvePart. | |
virtual int | getEnd () const |
Returns the end index of this curve part inside the original curve. | |
virtual vec2d | getXY (int i) const |
Returns the coordinates of a point at a given index. | |
virtual bool | getIsControl (int i) const |
Returns true if the i'th point is a Control Point. | |
virtual float | getS (int i) const |
Returns the i'th point S coordinate. | |
virtual box2d | getBounds () const |
Returns the curve part's bounding box. | |
virtual CurvePart * | clip (int start, int end) const |
Returns a sub-curvePart clipped from this one. | |
Private Attributes | |
vec2d | start |
The start point that defines this CurvePart. | |
vec2d | end |
The start point that defines this CurvePart. |
A part of a curve.
This part is defined by 2 points (start and end points). This is used for completing a clipped area when one or more of its curves are out of the clipping box.
proland::LineCurvePart::LineCurvePart | ( | vec2d | start, | |
vec2d | end | |||
) |
Creates a new LineCurvePart.
start | Coordinates of the starting point. | |
end | Coordinates of the end point. |
virtual CurvePart* proland::LineCurvePart::clip | ( | int | start, | |
int | end | |||
) | const [virtual] |
Returns a sub-curvePart clipped from this one.
start | starting point. | |
end | end point. |
Implements proland::CurvePart.
virtual box2d proland::LineCurvePart::getBounds | ( | ) | const [virtual] |
Returns the curve part's bounding box.
Implements proland::CurvePart.
virtual int proland::LineCurvePart::getEnd | ( | ) | const [virtual] |
Returns the end index of this curve part inside the original curve.
Implements proland::CurvePart.
virtual bool proland::LineCurvePart::getIsControl | ( | int | i | ) | const [virtual] |
Returns true if the i'th point is a Control Point.
i | the rank of the Node to get the boolean from. |
Reimplemented from proland::CurvePart.
virtual float proland::LineCurvePart::getS | ( | int | i | ) | const [virtual] |
Returns the i'th point S coordinate.
i | the rank of the Node to get the coordinate from. |
Implements proland::CurvePart.
virtual vec2d proland::LineCurvePart::getXY | ( | int | i | ) | const [virtual] |
Returns the coordinates of a point at a given index.
i | the rank of the Node to get the coordinates from. |
Implements proland::CurvePart.
vec2d proland::LineCurvePart::end [private] |
The start point that defines this CurvePart.
vec2d proland::LineCurvePart::start [private] |
The start point that defines this CurvePart.