A series of straight line segments, which can also be interpreted as a series of control points for splines, etc. More...
A series of straight line segments, which can also be interpreted as a series of control points for splines, etc.
Definition at line 55 of file polyLine.H.
Public Member Functions | |
polyLine (const pointField &, const bool notImplementedClosed=false) | |
Construct from components.
| |
const pointField & | points () const |
Return const-access to the control-points.
| |
label | nSegments () const |
Return the number of line segments.
| |
point | position (const scalar) const |
Return the point position corresponding to the curve parameter.
| |
point | position (const label segment, const scalar) const |
Return the point position corresponding to the local parameter.
| |
scalar | length () const |
Return the length of the curve.
| |
Protected Member Functions | |
void | calcParam () |
Precalculate the rational cumulative parameter value.
| |
label | localParameter (scalar &lambda) const |
Return the line segment and the local parameter [0..1].
| |
Protected Attributes | |
pointField | points_ |
The control points or ends of each segments.
| |
scalar | lineLength_ |
The real line length.
| |
scalarList | param_ |
The rational (0-1) cumulative parameter value for each point.
|
polyLine | ( | const pointField & | , |
const bool | notImplementedClosed = false
|
||
) |
Construct from components.
void calcParam | ( | ) | [protected]
|
Precalculate the rational cumulative parameter value.
and the line-length
label localParameter | ( | scalar & | lambda ) | const [protected]
|
Return the line segment and the local parameter [0..1].
corresponding to the global lambda [0..1]
const pointField& points | ( | ) | const |
Return const-access to the control-points.
label nSegments | ( | ) | const |
Return the number of line segments.
point position | ( | const | scalar ) | const |
Return the point position corresponding to the curve parameter.
0 <= lambda <= 1
Reimplemented in BSpline, CatmullRomSpline, polyLineEdge, and splineEdge.
point position | ( | const label | segment, |
const | scalar | ||
) | const |
Return the point position corresponding to the local parameter.
0 <= lambda <= 1 on the given segment
Reimplemented in BSpline, and CatmullRomSpline.
scalar length | ( | ) | const |
Return the length of the curve.
Reimplemented in BSpline, CatmullRomSpline, polyLineEdge, and splineEdge.
pointField points_ [protected]
|
The control points or ends of each segments.
Definition at line 70 of file polyLine.H.
scalar lineLength_ [protected]
|
The real line length.
Definition at line 73 of file polyLine.H.
scalarList param_ [protected]
|
The rational (0-1) cumulative parameter value for each point.
Definition at line 76 of file polyLine.H.