Loading...
Searching...
No Matches
triangleFuncs Class Reference

Contains various triangle static functions. More...

#include <triangleFuncs.H>

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.
static bool intersectBb (const triPointRef &tri, const treeBoundBox &cubeBb)
 Intersect triangle with bounding box.
static bool intersectBb (const point &p0, const point &p1, const point &p2, const treeBoundBox &cubeBb)
 Intersect triangle with bounding box.
static bool intersect (const point &va0, const point &va10, const point &va20, const point &basePoint, const vector &normal, point &pInter0, point &pInter1)
 Intersect triangle with plane.
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)
 Intersection of two triangles intersect.

Detailed Description

Contains various triangle static functions.

Source files

Definition at line 51 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 59 of file triangleFuncs.C.

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

Here is the call graph for this function:

◆ intersectBb() [1/2]

bool intersectBb ( const triPointRef & tri,
const treeBoundBox & cubeBb )
static

Intersect triangle with bounding box.

Returns
true if any bounding box faces intersect the triangle, returns false if the triangle is inside the bounding box

Definition at line 143 of file triangleFuncs.C.

References triangle< Point, PointRef >::a(), triangle< Point, PointRef >::b(), triangle< Point, PointRef >::c(), PointHit< PointType >::distance(), e, treeBoundBox::edges, intersection::HALF_RAY, PointHit< PointType >::hit(), triangle< Point, PointRef >::intersection(), treeBoundBox::intersects(), treeBoundBox::points(), and points.

Referenced by intersectBb().

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

◆ intersectBb() [2/2]

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

Intersect triangle with bounding box.

Returns
true if any bounding box faces intersect the triangle, returns false if the triangle is inside the bounding box

Definition at line 187 of file triangleFuncs.C.

References intersectBb(), and p0.

Here is the call 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

Intersect triangle with plane.

Returns
bool and set intersection segment.

Definition at line 201 of file triangleFuncs.C.

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

Referenced by intersect().

Here is the call graph for this function:
Here is the caller 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

Intersection of two triangles intersect.

Returns
bool and set intersection segment.

Definition at line 319 of file triangleFuncs.C.

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

Here is the call graph for this function:

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