Various triangle functions. More...
Public Types | |
enum | proxType { NONE, POINT, EDGE } |
Enumeration defining nearness classification. More... | |
Static Public Member Functions | |
static bool | intersectAxesBundle (const point &V0, const point &V10, const point &V20, const label i0, const pointField &origin, const scalar maxLength, point &pInter) |
Intersect triangle with parallel edges aligned with axis i0. More... | |
static bool | intersectBb (const point &p0, const point &p1, const point &p2, const treeBoundBox &cubeBb) |
Does triangle intersect bounding box. More... | |
static bool | intersect (const point &va0, const point &va10, const point &va20, const point &basePoint, const vector &normal, point &pInter0, point &pInter1) |
Does triangle intersect plane. Return bool and set intersection segment. More... | |
static bool | intersect (const point &va0, const point &va10, const point &va20, const point &vb0, const point &vb10, const point &vb20, point &pInter0, point &pInter1) |
Do triangles intersect. Return bool and set intersection segment. More... | |
Static Private Member Functions | |
static void | setIntersection (const point &oppositeSidePt, const scalar oppositeSign, const point &thisSidePt, const scalar thisSign, const scalar tol, point &pt) |
Helper function for intersect. Sets pt to be anywhere on the edge. More... | |
static void | selectPt (const bool select0, const point &p0, const point &p1, point &min) |
Helper function. More... | |
enum proxType |
Enumeration defining nearness classification.
Enumerator | |
---|---|
NONE | |
POINT | |
EDGE |
Definition at line 62 of file triangleFuncs.H.
|
staticprivate |
Helper function for intersect. Sets pt to be anywhere on the edge.
between oppositeSidePt and thisSidePt depending on both signs.
Definition at line 35 of file triangleFuncs.C.
References Foam::mag().
Helper function.
Definition at line 62 of file triangleFuncs.C.
References Foam::min().
|
static |
Intersect triangle with parallel edges aligned with axis i0.
Returns true (and intersection in pInter) if any of them intersects triangle. Used in intersectBb.
Definition at line 85 of file triangleFuncs.C.
References Foam::constant::atomic::alpha, beta(), Foam::det(), forAll, Foam::mag(), s(), and u0.
|
static |
Does triangle intersect bounding box.
Definition at line 172 of file triangleFuncs.C.
References treeBoundBox::intersects(), boundBox::max(), Foam::max(), boundBox::min(), and Foam::min().
Referenced by treeDataTriSurface::overlaps(), treeDataFace::overlaps(), and distributedTriSurfaceMesh::overlaps().
|
static |
Does triangle intersect plane. Return bool and set intersection segment.
Definition at line 526 of file triangleFuncs.C.
References Foam::mag(), and Foam::sqrt().
|
static |
Do triangles intersect. Return bool and set intersection segment.
Definition at line 644 of file triangleFuncs.C.
References SortableList::indices(), intersect(), Foam::mag(), and SortableList::sort().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.