Go to the documentation of this file.
49 #ifndef faceTriangulation_H
50 #define faceTriangulation_H
103 const point& rayOrigin,
129 const label startIndex,
174 const bool fallBack =
false
186 const bool fallBack =
false
bool split(const bool fallBack, const pointField &points, const face &f, const vector &normal, label &triI)
Split face f into triangles. Handles all simple (convex & concave)
A class for managing temporary objects.
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
static label left(const label size, label i)
Edge to the left of face vertex i.
static void findDiagonal(const pointField &points, const face &f, const vectorField &edges, const vector &normal, const label startIndex, label &index1, label &index2)
Starting from startIndex find diagonal. Return in index1, index2.
static pointHit rayEdgeIntersect(const vector &normal, const point &rayOrigin, const vector &rayDir, const point &p1, const point &p2, scalar &posOnEdge)
Calculate intersection point between edge p1-p2 and ray (in 2D).
faceTriangulation()
Construct null.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static void calcHalfAngle(const vector &normal, const vector &e0, const vector &e1, scalar &cosHalfAngle, scalar &sinHalfAngle)
Calculates half angle components of angle from e0 to e1.
static bool triangleContainsPoint(const vector &n, const point &p0, const point &p1, const point &p2, const point &pt)
static const scalar edgeRelTol
Relative tolerance on edge.
static tmp< vectorField > calcEdges(const face &, const pointField &)
Calculate normalized edge vectors.
static label findStart(const face &f, const vectorField &edges, const vector &normal)
Find label of vertex to start splitting from. This will be the.
label size() const
Return the number of elements in the UList.
Triangulation of faces. Handles concave polygons as well (inefficiently)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static label right(const label size, label i)
Edge to the right of face vertex i.
A face is a list of labels corresponding to mesh vertices.
A normal distribution model.