triangleFuncs Class Reference

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...
 

Detailed Description

Various triangle functions.

Source files

Definition at line 56 of file triangleFuncs.H.

Member Enumeration Documentation

◆ proxType

enum proxType

Enumeration defining nearness classification.

Enumerator
NONE 
POINT 
EDGE 

Definition at line 64 of file triangleFuncs.H.

Member Function Documentation

◆ intersectAxesBundle()

bool intersectAxesBundle ( const point V0,
const point V10,
const point V20,
const label  i0,
const pointField origin,
const scalar  maxLength,
point pInter 
)
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 89 of file triangleFuncs.C.

References Foam::constant::atomic::alpha, beta(), Foam::det(), forAll, Foam::mag(), s, and u0.

Here is the call graph for this function:

◆ intersectBb()

bool intersectBb ( const point p0,
const point p1,
const point p2,
const treeBoundBox cubeBb 
)
static

Does triangle intersect bounding box.

Definition at line 176 of file triangleFuncs.C.

References PointHit< Point >::distance(), Foam::constant::electromagnetic::e, treeBoundBox::edges, stdFoam::end(), forAll, intersection::HALF_RAY, PointHit< Point >::hit(), triangle< Point, PointRef >::intersection(), treeBoundBox::intersects(), p0, points, treeBoundBox::points(), and Foam::start.

Referenced by treeDataFace::overlaps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ intersect() [1/2]

bool intersect ( const point va0,
const point va10,
const point va20,
const point basePoint,
const vector normal,
point pInter0,
point pInter1 
)
static

Does triangle intersect plane. Return bool and set intersection segment.

Definition at line 233 of file triangleFuncs.C.

References Foam::mag(), and Foam::sqrt().

Here is the call graph for this function:

◆ intersect() [2/2]

bool intersect ( const point va0,
const point va10,
const point va20,
const point vb0,
const point vb10,
const point vb20,
point pInter0,
point pInter1 
)
static

Do triangles intersect. Return bool and set intersection segment.

Definition at line 351 of file triangleFuncs.C.

References SortableList< T >::indices(), Foam::mag(), and SortableList< T >::sort().

Here is the call graph for this function:

The documentation for this class was generated from the following files: