triIntersect.C File Reference
Include dependency graph for triIntersect.C:

Go to the source code of this file.

Namespaces

 Foam
 Namespace for OpenFOAM.
 
 Foam::triIntersect
 

Functions

scalar protectedDivide (const scalar a, const scalar b)
 Divide two numbers and protect the result from overflowing. More...
 
scalar protectedDivideAndClip01 (const scalar a, const scalar b)
 Divide two numbers, protect the result from overflowing, and clip the. More...
 
template<class Type >
Ostream & operator<< (Ostream &os, const FixedList< FixedList< Type, 3 >, 3 > &l)
 Print 3x3 FixedListLists on one line. More...
 
vector clipped01 (const vector x, const FixedList< label, 3 > groups)
 Clip the given vector between values of 0 and 1, and also clip one minus. More...
 
vector solveProjectionGivenT (const vector &C, const vector &Ct, const vector &Cu, const vector &Cv, const vector &Ctu, const vector &Ctv, const FixedList< label, 3 > groups, const scalar t)
 Solve a projection equation given a value of the t variable. More...
 
Tuple2< bool, vector > solveProjection (const vector &C, const vector &Ct, const vector &Cu, const vector &Cv, const vector &Ctu, const vector &Ctv, const FixedList< label, 3 > groups)
 Solve a projection equation. More...
 
FixedList< FixedList< scalar, 3 >, 3 > srcTgtEdgeOffset (const FixedList< point, 3 > &srcPs, const FixedList< vector, 3 > &srcNs, const FixedList< bool, 3 > &srcOwns, const FixedList< point, 3 > &tgtPs, const FixedList< bool, 3 > &tgtOwns)
 Calculate the non-dimensional offsets of the source points from the target. More...
 
FixedList< FixedList< scalar, 3 >, 3 > tgtSrcEdgeOffset (const FixedList< point, 3 > &srcPs, const FixedList< vector, 3 > &srcNs, const FixedList< bool, 3 > &srcOwns, const FixedList< point, 3 > &tgtPs, const FixedList< bool, 3 > &tgtOwns)
 Calculate the non-dimensional offsets the target points from the source. More...
 
FixedList< FixedList< label, 3 >, 3 > thisInOtherEdge (const FixedList< FixedList< scalar, 3 >, 3 > &thisOtherEdgeOffset)
 Construct point-inside/outside-edge topology from a set of point-edge. More...
 
FixedList< label, 3 > thisInOtherTri (const FixedList< FixedList< label, 3 >, 3 > &thisInOtherEdge)
 Construct point-inside/outside-triangle topology from a set of. More...
 
FixedList< label, 3 > tgtInSrcTri (const FixedList< point, 3 > &srcPs, const FixedList< vector, 3 > &srcNs, const FixedList< point, 3 > &tgtPs, const FixedList< FixedList< label, 3 >, 3 > &tgtInSrcEdge)
 Construct target-point-inside/outside-source-triangle topology from a set. More...
 
void thisIsOther (const FixedList< label, 3 > &thisOtherPis, FixedList< FixedList< label, 3 >, 3 > &thisInOtherEdge, FixedList< label, 3 > &thisInOtherTri)
 Override results of the srcInTgt/tgtInSrc calculations with explicit. More...
 
void srcInTgt (const FixedList< point, 3 > &srcPs, const FixedList< vector, 3 > &srcNs, const FixedList< bool, 3 > &srcOwns, const FixedList< label, 3 > &srcTgtPis, const FixedList< point, 3 > &tgtPs, const FixedList< bool, 3 > &tgtOwns, FixedList< FixedList< label, 3 >, 3 > &srcInTgtEdge, FixedList< label, 3 > &srcInTgtTri)
 Calculate whether the points of the given source triangle project inside or. More...
 
void tgtInSrc (const FixedList< point, 3 > &srcPs, const FixedList< vector, 3 > &srcNs, const FixedList< bool, 3 > &srcOwns, const FixedList< point, 3 > &tgtPs, const FixedList< bool, 3 > &tgtOwns, const FixedList< label, 3 > &tgtSrcPis, FixedList< FixedList< label, 3 >, 3 > &tgtInSrcEdge, FixedList< label, 3 > &tgtInSrcTri)
 Calculate whether the points of the given target triangle project inside or. More...
 
bool orderLocations (const UList< location > &locations, bool isSrcEdge, const label i0, label &nVisited, boolList &visited, labelList &order)
 Order intersection locations into a polygon. More...
 
bool generateLocations (const FixedList< label, 3 > &tgtSrcPis, const FixedList< FixedList< label, 3 >, 3 > &srcInTgtEdge, const FixedList< FixedList< label, 3 >, 3 > &tgtInSrcEdge, const FixedList< label, 3 > &srcInTgtTri, const FixedList< label, 3 > &tgtInSrcTri, DynamicList< location > &pointLocations)
 Construct the intersection topology. More...
 
void generateGeometry (const FixedList< point, 3 > &srcPs, const FixedList< vector, 3 > &srcNs, const FixedList< point, 3 > &tgtPs, DynamicList< point > &srcPoints, DynamicList< vector > &srcPointNormals, DynamicList< point > &tgtPoints, const DynamicList< location > &pointLocations)
 Construct the intersection geometry. More...
 

Variables

const scalar maxDot = - cos(degToRad(80))
 The maximum dot product between a source point normal and a target plane. More...
 

Detailed Description

Original source file triIntersect.C

Definition in file triIntersect.C.