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>
69 template<
class Po
int,
class Po
intRef>
83 template<
class Po
int,
class Po
intRef>
158 template<
class AboveOp,
class BelowOp>
195 inline const Point&
a()
const;
198 inline const Point&
b()
const;
201 inline const Point&
c()
const;
210 inline scalar
mag()
const;
278 const scalar tol = 0.0
316 template<
class AboveOp,
class BelowOp>
327 template<
class Ins
ideOp,
class Outs
ideOp>
345 friend Ostream& operator<< <Point, PointRef>
Simple random number generator.
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
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.
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
static point planeIntersection(const FixedList< scalar, 3 > &d, const triPoints &t, const label negI, const label posI)
Helper: calculate intersection point.
bool classify(const point &p, label &nearType, label &nearLabel) const
Classify nearest point to p in triangle plane.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void operator()(const triPoints &)
tensor inertia(PointRef refPt=vector::zero, scalar density=1.0) const
Return the inertia tensor, with optional reference.
Point centre() const
Return centre (centroid)
Geometric class that creates a 2D plane and can return the intersection point between a line and the ...
scalar barycentric(const point &pt, List< scalar > &bary) const
Calculate the barycentric coordinates of the given.
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.
vector normal() const
Return vector normal.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
const Point & a() const
Return first vertex.
static void triSliceWithPlane(const plane &pl, const triPoints &tri, AboveOp &aboveOp, BelowOp &belowOp)
Helper: slice triangle with plane.
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:
proxType
Return types for classify.
scalar quality() const
Return quality: Ratio of triangle and circum-circle.
Point circumCentre() const
Return circum-centre.
void sliceWithPlane(const plane &pl, AboveOp &aboveOp, BelowOp &belowOp) const
Decompose triangle into triangles above and below plane.
void operator()(const triPoints &)
A 1D vector of objects of type <T> with a fixed size <Size>.
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.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
cachedRandom rndGen(label(0), -1)
scalar sweptVol(const triangle &t) const
Return swept-volume.
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 &)