A series of straight line segments, which can also be interpreted as a series of control points for splines, etc. More...
Public Member Functions | |
polyLine (const pointField &, const bool notImplementedClosed=false) | |
Construct from components. More... | |
polyLine (const polyLine &)=delete | |
Disallow default bitwise copy construction. More... | |
const pointField & | points () const |
Return const-access to the control-points. More... | |
label | nSegments () const |
Return the number of line segments. More... | |
point | position (const scalar) const |
Return the point position corresponding to the curve parameter. More... | |
point | position (const label segment, const scalar) const |
Return the point position corresponding to the local parameter. More... | |
scalar | length () const |
Return the length of the curve. More... | |
void | operator= (const polyLine &)=delete |
Disallow default bitwise assignment. More... | |
Protected Member Functions | |
void | calcParam () |
Precalculate the rational cumulative parameter value. More... | |
label | localParameter (scalar &lambda) const |
Return the line segment and the local parameter [0..1]. More... | |
Protected Attributes | |
pointField | points_ |
The control points or ends of each segments. More... | |
scalar | lineLength_ |
The real line length. More... | |
scalarList | param_ |
The rational (0-1) cumulative parameter value for each point. More... | |
A series of straight line segments, which can also be interpreted as a series of control points for splines, etc.
A future implementation could also handle a closed polyLine.
Definition at line 53 of file polyLine.H.
polyLine | ( | const pointField & | ps, |
const bool | notImplementedClosed = false |
||
) |
Construct from components.
Definition at line 61 of file polyLine.C.
References polyLine::calcParam().
|
protected |
Precalculate the rational cumulative parameter value.
and the line-length
Definition at line 30 of file polyLine.C.
References UList< T >::last(), polyLine::lineLength_, Foam::mag(), polyLine::param_, polyLine::points_, List< T >::setSize(), and List< T >::size().
Referenced by polyLine::polyLine().
|
protected |
Return the line segment and the local parameter [0..1].
corresponding to the global lambda [0..1]
Definition at line 85 of file polyLine.C.
References lambda().
const Foam::pointField & points | ( | ) | const |
Return const-access to the control-points.
Definition at line 73 of file polyLine.C.
Foam::label nSegments | ( | ) | const |
Return the number of line segments.
Definition at line 79 of file polyLine.C.
Foam::point position | ( | const scalar | mu | ) | const |
Return the point position corresponding to the curve parameter.
0 <= lambda <= 1
Definition at line 118 of file polyLine.C.
References lambda(), and Foam::constant::physicoChemical::mu.
Referenced by polyLineEdge::position().
Foam::point position | ( | const label | segment, |
const scalar | mu | ||
) | const |
Return the point position corresponding to the local parameter.
0 <= lambda <= 1 on the given segment
Definition at line 136 of file polyLine.C.
References Foam::constant::physicoChemical::mu, and points.
Foam::scalar length | ( | ) | const |
Return the length of the curve.
Definition at line 172 of file polyLine.C.
|
delete |
Disallow default bitwise assignment.
|
protected |
The control points or ends of each segments.
Definition at line 60 of file polyLine.H.
Referenced by polyLine::calcParam().
|
protected |
The real line length.
Definition at line 63 of file polyLine.H.
Referenced by polyLine::calcParam(), and polyLineEdge::length().
|
protected |
The rational (0-1) cumulative parameter value for each point.
Definition at line 66 of file polyLine.H.
Referenced by polyLine::calcParam().