|
|
|
triangle Class Template ReferenceCollaboration diagram for triangle:![]() Detailed Descriptiontemplate<class Point, class PointRef>
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Types | |
| enum | proxType { NONE, POINT, EDGE } |
| Return types for classify. More... | |
Public Member Functions | |
| triangle (const Point &a, const Point &b, const Point &c) | |
| Construct from three points. | |
| triangle (Istream &) | |
| Construct from Istream. | |
| const Point & | a () const |
| Return first vertex. | |
| const Point & | b () const |
| Return second vertex. | |
| const Point & | c () const |
| Return third vertex. | |
| Point | centre () const |
| Return centre (centroid). | |
| scalar | mag () const |
| Return scalar magnitude. | |
| vector | normal () const |
| Return vector normal. | |
| vector | circumCentre () const |
| Return circum-centre. | |
| scalar | circumRadius () const |
| Return circum-radius. | |
| scalar | quality () const |
| Return quality: Ratio triangle and circum-circle area. | |
| scalar | sweptVol (const triangle &t) const |
| Return swept-volume. | |
| pointHit | ray (const point &p, const vector &q, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const |
| Return point intersection with a ray. | |
| pointHit | nearestPoint (const point &p) const |
| Return nearest point to p on triangle. | |
| bool | classify (const point &p, const scalar tol, label &nearType, label &nearLabel) const |
| Classify point in triangle plane w.r.t. triangle edges. | |
Friends | |
| Istream & | operator>> (Istream &, triangle &) |
| Ostream & | operator (Ostream &, const triangle &) |
| enum proxType |
| triangle | ( | const Point & | a, | |
| const Point & | b, | |||
| const Point & | c | |||
| ) | [inline] |
| const Point & a | ( | ) | const [inline] |
| const Point & b | ( | ) | const [inline] |
| const Point & c | ( | ) | const [inline] |
| Point centre | ( | ) | const [inline] |
Return centre (centroid).
Definition at line 331 of file triangleI.H.
References Foam::mag(), and triangle::normal().
Here is the call graph for this function:

| scalar mag | ( | ) | const [inline] |
Return vector normal.
Definition at line 345 of file triangleI.H.
Referenced by triangle::centre(), and triangle::ray().
Here is the caller graph for this function:

| vector circumCentre | ( | ) | const [inline] |
| scalar circumRadius | ( | ) | const [inline] |
| scalar quality | ( | ) | const [inline] |
| scalar sweptVol | ( | const triangle< Point, PointRef > & | t | ) | const [inline] |
| pointHit ray | ( | const point & | p, | |
| const vector & | q, | |||
| const intersection::algorithm | = intersection::FULL_RAY, |
|||
| const intersection::direction | dir = intersection::VECTOR | |||
| ) | const [inline] |
Return point intersection with a ray.
For a hit, the distance is signed. Positive number represents the point in front of triangle. In case of miss pointHit is set to nearest point on triangle and its distance to the distance between the original point and the plane intersection point
Definition at line 421 of file triangleI.H.
References intersection::CONTACT_SPHERE, dist, intersection::FULL_RAY, intersection::HALF_RAY, Foam::mag(), Foam::min(), triangle::normal(), p, intersection::planarTol(), pointHit::setDistance(), pointHit::setHit(), pointHit::setMiss(), pointHit::setPoint(), intersection::VECTOR, and intersection::VISIBLE.
Here is the call graph for this function:

| bool classify | ( | const point & | p, | |
| const scalar | tol, | |||
| label & | nearType, | |||
| label & | nearLabel | |||
| ) | const [inline] |
Classify point in triangle plane w.r.t. triangle edges.
Definition at line 532 of file triangleI.H.
References triangle::EDGE, Foam::mag(), triangle::NONE, p, triangle::POINT, Vector::x(), Vector::y(), and Vector::z().
Here is the call graph for this function:
