Go to the documentation of this file.
63 template<
class Po
int,
class Po
intRef>
class triangle;
65 template<
class Po
int,
class Po
intRef>
72 template<
class Po
int,
class Po
intRef>
86 template<
class Po
int,
class Po
intRef>
152 inline static point planeIntersection
161 template<
class AboveOp,
class BelowOp>
162 inline static void triSliceWithPlane
198 inline const Point&
a()
const;
201 inline const Point&
b()
const;
204 inline const Point&
c()
const;
227 inline scalar
mag()
const;
247 PointRef refPt =
Zero,
293 const scalar tol = 0.0
336 inline int sign(
const point&
p,
const scalar tol = SMALL)
const;
339 template<
class AboveOp,
class BelowOp>
350 template<
class Ins
ideOp,
class Outs
ideOp>
368 friend Ostream& operator<< <Point, PointRef>
FixedList< triPoints, 27 > triIntersectionList
Storage type for triangles originating from intersecting triangle.
void operator()(const triPoints &)
Point randomPoint(Random &rndGen) const
Return a random point on the triangle from a uniform.
static constexpr const zero Zero
Global zero.
int sign(const point &p, const scalar tol=SMALL) const
The sign for which side of the face plane the point is on.
bool classify(const point &p, label &nearType, label &nearLabel) const
Classify nearest point to p in triangle plane.
tensor inertia(PointRef refPt=Zero, scalar density=1.0) const
Return the inertia tensor, with optional reference.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Templated 2D Barycentric derived from VectorSpace. Has 3 components, one of which is redundant.
void operator()(const triPoints &)
Point centre() const
Return centre (centroid)
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
vector unitNormal() const
Return unit normal.
A triangle primitive used to calculate face normals and swept volumes.
Triangle storage. Null constructable (unfortunately triangle<point, point> is not)
const Point & c() const
Return third vertex.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
const Point & a() const
Return first vertex.
pointHit ray(const point &p, const vector &q, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
Return point intersection with a ray.
const Point & b() const
Return second vertex.
scalar circumRadius() const
Return circum-radius.
scalar mag() const
Return scalar magnitude.
pointHit nearestPointClassify(const point &p, label &nearType, label &nearLabel) const
Find the nearest point to p on the triangle and classify it:
vector FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") normal() const
Legacy name for areaNormal().
proxType
Return types for classify.
scalar quality() const
Return quality: Ratio of triangle and circum-circle.
Point circumCentre() const
Return circum-centre.
void operator()(const triPoints &)
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
pointHit intersection(const point &p, const vector &q, const intersection::algorithm alg, const scalar tol=0.0) const
Fast intersection with a ray.
triangle(const Point &a, const Point &b, const Point &c)
Construct from three points.
triIntersectionList & tris_
pointHit nearestPoint(const point &p) const
Return nearest point to p on triangle.
barycentric2D pointToBarycentric(const point &pt) const
Calculate the barycentric coordinates from the given point.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Point barycentricToPoint(const barycentric2D &bary) const
Calculate the point from the given barycentric coordinates.
vector areaNormal() const
The area normal - with magnitude equal to area of triangle.
scalar sweptVol(const triangle &t) const
Return swept-volume.
void sliceWithPlane(const plane &pln, AboveOp &aboveOp, BelowOp &belowOp) const
Decompose triangle into triangles above and below plane.
triangle< point, const point & > triPointRef
void triangleOverlap(const vector &n, const triangle< Point, PointRef > &tri, InsideOp &insideOp, OutsideOp &outsideOp) const
Decompose triangle into triangles inside and outside.
storeOp(triIntersectionList &, label &)