FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

A series of straight line segments, which can also be interpreted as a series of control points for splines, etc. More...


Detailed Description

A series of straight line segments, which can also be interpreted as a series of control points for splines, etc.

Todo:
A future implementation could also handle a closed polyLine.
Source files

Definition at line 55 of file polyLine.H.

Inheritance diagram for polyLine:
Collaboration diagram for polyLine:

List of all members.

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.

Constructor & Destructor Documentation

polyLine ( const pointField &   ,
const bool   notImplementedClosed = false  
)

Construct from components.


Member Function Documentation

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.


Member Data Documentation

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.


The documentation for this class was generated from the following file:
  • applications/utilities/mesh/generation/blockMesh/curvedEdges/polyLine.H