OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

line Class Template Reference

Collaboration diagram for line:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Definition at line 81 of file line.H.


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.
vector vec () const
 Return start-end vector.
pointHit 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.

Friends

Istream & operator>> (Istream &, line &)
Ostream & operator (Ostream &, const line &)

Constructor & Destructor Documentation

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

Construct from two points.

Definition at line 48 of file lineI.H.

References Istream::readBegin().

Here is the call graph for this function:

line ( Istream &   )  [inline]

Construct from Istream.

Definition at line 56 of file lineI.H.


Member Function Documentation

PointRef start (  )  const [inline]

Return first vertex.

Definition at line 74 of file lineI.H.

PointRef end (  )  const [inline]

Return second vertex.

Definition at line 80 of file lineI.H.

Point centre (  )  const [inline]

Return centre (centroid).

Definition at line 87 of file lineI.H.

References Foam::mag(), and line::vec().

Here is the call graph for this function:

scalar mag (  )  const [inline]

Return scalar magnitude.

Definition at line 94 of file lineI.H.

vector vec (  )  const [inline]

Return start-end vector.

Definition at line 101 of file lineI.H.

References p.

Referenced by line::centre().

Here is the caller graph for this function:

pointHit nearestDist ( const point &  p  )  const

Return nearest distance to line from a given point.

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

Definition at line 109 of file lineI.H.

References Foam::mag(), and p.

Here is the call graph for this function:

scalar nearestDist ( const line< point, const point & > &  edge,
point &  thisPoint,
point &  edgePoint 
) const

Return nearest distance from line to line. Returns distance.

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

Definition at line 141 of file lineI.H.


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-2007 OpenCFD Ltd