OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

line< Point, PointRef > Class Template Reference

A line primitive. More...

List of all members.


Public Member Functions

 line (const Point &start, const Point &end)
 Construct from two points.
 line (Istream &)
 Construct from Istream.
PointRef start () const
 Return first vertex.
PointRef end () const
 Return second vertex.
Point centre () const
 Return centre (centroid).
scalar mag () const
 Return scalar magnitude.
Point vec () const
 Return start-end vector.
PointHit< Point > nearestDist (const Point &p) const
 Return nearest distance to line from a given point.
scalar nearestDist (const line< Point, const Point & > &edge, Point &thisPoint, Point &edgePoint) const
 Return nearest distance from line to line. Returns distance.
template<>
scalar nearestDist (const line< point2D, const point2D & > &e, point2D &thisPt, point2D &edgePt) const
template<>
scalar nearestDist (const line< point2D, const point2D & > &edge, point2D &thisPoint, point2D &edgePoint) const

Friends

Istreamoperator>> (Istream &, line &)
Ostreamoperator (Ostream &, const line &)

Detailed Description

template<class Point, class PointRef>
class Foam::line< Point, PointRef >

A line primitive.

Source files

Definition at line 64 of file line.H.


Constructor & Destructor Documentation

line ( const Point &  start,
const Point &  end 
) [inline]

Construct from two points.

Definition at line 28 of file lineI.H.

line ( Istream is  )  [inline]

Construct from Istream.

Definition at line 36 of file lineI.H.


Member Function Documentation

PointRef start (  )  const [inline]

Return first vertex.

Definition at line 54 of file lineI.H.

Referenced by line< Point, PointRef >::nearestDist().

Here is the caller graph for this function:

PointRef end (  )  const [inline]

Return second vertex.

Definition at line 60 of file lineI.H.

Referenced by line< Point, PointRef >::nearestDist().

Here is the caller graph for this function:

Point centre (  )  const [inline]

Return centre (centroid).

Definition at line 67 of file lineI.H.

scalar mag (  )  const [inline]

Return scalar magnitude.

Definition at line 74 of file lineI.H.

Referenced by line< Point, PointRef >::nearestDist(), and line< Point, PointRef >::vec().

Here is the caller graph for this function:

Point vec (  )  const [inline]

Return start-end vector.

Definition at line 81 of file lineI.H.

References line< Point, PointRef >::mag().

Here is the call graph for this function:

PointHit< Point > nearestDist ( const Point &  p  )  const [inline]

Return nearest distance to line from a given point.

If the nearest point is on the line, return a hit

Definition at line 88 of file lineI.H.

Referenced by line< Point, PointRef >::nearestDist().

Here is the caller graph for this function:

scalar nearestDist ( const line< Point, const Point & > &  edge,
Point &  thisPoint,
Point &  edgePoint 
) const [inline]

Return nearest distance from line to line. Returns distance.

and sets both points (one on *this, one on the provided linePointRef.

Definition at line 118 of file lineI.H.

scalar nearestDist ( const line< point2D, const point2D & > &  e,
point2D thisPt,
point2D edgePt 
) const [inline]

scalar nearestDist ( const line< point2D, const point2D & > &  edge,
point2D thisPoint,
point2D edgePoint 
) const [inline]


Friends And Related Function Documentation

Istream& operator>> ( Istream ,
line< Point, PointRef > &   
) [friend]

Ostream& operator ( Ostream ,
const line< Point, PointRef > &   
) [friend]


The documentation for this class was generated from the following files:
  • src/OpenFOAM/meshes/primitiveShapes/line/line.H
  • src/OpenFOAM/meshes/primitiveShapes/line/lineI.H
Copyright © 2000-2009 OpenCFD Ltd