A line primitive. More...
Public Member Functions | |
line (const Point &start, const Point &end) | |
Construct from two points. More... | |
line (const UList< Point > &, const FixedList< label, 2 > &indices) | |
Construct from two points in the list of points. More... | |
line (Istream &) | |
Construct from Istream. More... | |
PointRef | start () const |
Return first vertex. More... | |
PointRef | end () const |
Return second vertex. More... | |
Point | centre () const |
Return centre (centroid) More... | |
scalar | mag () const |
Return scalar magnitude. More... | |
Point | vec () const |
Return start-end vector. More... | |
PointHit< Point > | nearestDist (const Point &p) const |
Return nearest distance to line from a given point. More... | |
scalar | nearestDist (const line< Point, const Point & > &edge, Point &thisPoint, Point &edgePoint) const |
Return nearest distance from line to line. Returns distance. More... | |
scalar | nearestDist (const line< point2D, const point2D & > &e, point2D &thisPt, point2D &edgePt) const |
scalar | nearestDist (const line< point2D, const point2D & > &edge, point2D &thisPoint, point2D &edgePoint) const |
2D specialisation More... | |
Private Attributes | |
PointRef | a_ |
PointRef | b_ |
Friends | |
Istream & | operator>> (Istream &, line &) |
Ostream & | operator (Ostream &, const line &) |
Construct from two points in the list of points.
The indices could be from edge etc.
|
inline |
Return first vertex.
Definition at line 60 of file lineI.H.
Referenced by slidingInterface::coupleInterface(), plane::lineIntersect(), slidingInterface::modifyMotionPoints(), onLine(), and slidingInterface::projectPoints().
|
inline |
|
inline |
Return centre (centroid)
Definition at line 73 of file lineI.H.
Referenced by surfaceFeatures::nearestSurfEdge().
|
inline |
Return scalar magnitude.
Definition at line 80 of file lineI.H.
References Foam::mag().
Referenced by slidingInterface::coupleInterface(), slidingInterface::modifyMotionPoints(), and slidingInterface::projectPoints().
|
inline |
Return start-end vector.
Definition at line 87 of file lineI.H.
Referenced by slidingInterface::coupleInterface(), searchablePlane::findLine(), plane::lineIntersect(), slidingInterface::modifyMotionPoints(), and slidingInterface::projectPoints().
Foam::PointHit< Point > 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 95 of file lineI.H.
References Foam::constant::physicoChemical::b, Foam::constant::physicoChemical::c1, Foam::constant::physicoChemical::c2, Foam::mag(), p, and w().
Referenced by slidingInterface::coupleInterface(), treeDataFace::getVolumeType(), slidingInterface::modifyMotionPoints(), slidingInterface::projectPoints(), and faceCollapser::setRefinement().
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.
scalar nearestDist | ( | const line< point2D, const point2D & > & | e, |
point2D & | thisPt, | ||
point2D & | edgePt | ||
) | const |
Definition at line 37 of file line.C.
References Foam::e, Foam::mag(), Foam::max(), Foam::min(), Vector2D< Cmpt >::perp(), s(), and w().
scalar nearestDist | ( | const line< point2D, const point2D & > & | edge, |
point2D & | thisPoint, | ||
point2D & | edgePoint | ||
) | const |
2D specialisation
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.