Go to the documentation of this file.
60 template<
class Po
int,
class Po
intRef>
class triangle;
62 template<
class Po
int,
class Po
intRef>
65 template<
class Po
int,
class Po
intRef>
79 template<
class Po
int,
class Po
intRef>
148 inline static point planeIntersection
157 template<
class AboveOp,
class BelowOp>
158 inline static void triSliceWithPlane
194 inline const Point&
a()
const;
197 inline const Point&
b()
const;
200 inline const Point&
c()
const;
223 inline scalar
mag()
const;
243 PointRef refPt =
Zero,
289 const scalar tol = 0.0
332 inline int sign(
const point&
p,
const scalar tol = SMALL)
const;
335 template<
class AboveOp,
class BelowOp>
346 template<
class Ins
ideOp,
class Outs
ideOp>
364 friend Ostream& operator<< <Point, PointRef>
FixedList< triPoints, 27 > triIntersectionList
void operator()(const triPoints &)
Point randomPoint(Random &rndGen) const
Return a random point on the triangle from a uniform.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
static constexpr const zero Zero
Global zero (0)
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 &)
Istream & operator>>(Istream &, directionInfo &)
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.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Triangle storage. Null constructable (unfortunately triangle<point, point> is not)
const Point & c() const
Return third vertex.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Point point_type
The point type.
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.
FOAM_DEPRECATED_FOR(2018-12, "areaNormal() or unitNormal()") vector normal() const
Legacy name for areaNormal().
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:
proxType
The proximity classifications.
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
A triangle using referred points.
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 &)