60template<
class Po
int,
class Po
intRef>
class triangle;
62template<
class Po
int,
class Po
intRef>
65template<
class Po
int,
class Po
intRef>
79template<
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>
Templated 2D Barycentric derived from VectorSpace. Has 3 components, one of which is redundant.
A 1D vector of objects of type <T> with a fixed length <N>.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
Triangle storage. Null constructable (unfortunately triangle<point, point> is not)
void operator()(const triPoints &)
triIntersectionList & tris_
void operator()(const triPoints &)
void operator()(const triPoints &)
A triangle primitive used to calculate face normals and swept volumes.
Point circumCentre() const
Return circum-centre.
barycentric2D pointToBarycentric(const point &pt) const
Calculate the barycentric coordinates from the given point.
void sliceWithPlane(const plane &pln, AboveOp &aboveOp, BelowOp &belowOp) const
Decompose triangle into triangles above and below plane.
scalar circumRadius() const
Return circum-radius.
Point barycentricToPoint(const barycentric2D &bary) const
Calculate the point from the given barycentric coordinates.
scalar sweptVol(const triangle &t) const
Return swept-volume.
vector areaNormal() const
The area normal - with magnitude equal to area of triangle.
const Point & a() const
Return first vertex.
Point centre() const
Return centre (centroid)
FixedList< triPoints, 27 > triIntersectionList
void triangleOverlap(const vector &n, const triangle< Point, PointRef > &tri, InsideOp &insideOp, OutsideOp &outsideOp) const
Decompose triangle into triangles inside and outside.
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.
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.
vector unitNormal() const
Return unit normal.
const Point & c() const
Return third vertex.
tensor inertia(PointRef refPt=Zero, scalar density=1.0) const
Return the inertia tensor, with optional reference.
scalar mag() const
Return scalar magnitude.
Point point_type
The point type.
pointHit nearestPoint(const point &p) const
Return nearest point to p on triangle.
Point randomPoint(Random &rndGen) const
Return a random point on the triangle from a uniform.
bool classify(const point &p, label &nearType, label &nearLabel) const
Classify nearest point to p in triangle plane.
int sign(const point &p, const scalar tol=SMALL) const
The sign for which side of the face plane the point is on.
const Point & b() const
Return second vertex.
scalar quality() const
Return quality: Ratio of triangle and circum-circle.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Istream & operator>>(Istream &, directionInfo &)
triangle< point, const point & > triPointRef
A triangle using referred points.
static constexpr const zero Zero
Global zero (0)
#define FOAM_DEPRECATED_FOR(since, replacement)