Triangulation of three-dimensional polygons. More...
Public Member Functions | |
polygonTriangulate () | |
Construct null. More... | |
polygonTriangulate (const polygonTriangulate &)=delete | |
Disallow default bitwise copy construction. More... | |
~polygonTriangulate () | |
Destructor. More... | |
const UList< triFace > & | triPoints () const |
Get the triangles' points. More... | |
List< triFace > | triPoints (const UList< label > &polyPoints) const |
Get the triangles' renumbered points. More... | |
triFace | triPoints (const label trii, const UList< label > &polyPoints) const |
Get a triangle's renumbered points. More... | |
const UList< FixedList< label, 3 > > & | triEdges () const |
Get the triangles' edges. More... | |
List< FixedList< label, 3 > > | triEdges (const UList< label > &polyEdges) const |
Get the triangles' renumbered edges. More... | |
FixedList< label, 3 > | triEdges (const label trii, const UList< label > &polyEdges) const |
Get a triangle's renumbered edges. More... | |
const UList< triFace > & | triangulate (const UList< point > &points, const vector &normal, const bool simple=false, const bool optimal=true) |
Perform triangulation of the given polygon. More... | |
const UList< triFace > & | triangulate (const UList< point > &points, const bool simple=false, const bool optimal=true) |
Perform triangulation of the given polygon. More... | |
const UList< triFace > & | triangulate (const UIndirectList< point > &points, const vector &normal, const bool simple=false, const bool optimal=true) |
Perform triangulation of the given polygon. More... | |
const UList< triFace > & | triangulate (const UIndirectList< point > &points, const bool simple=false, const bool optimal=true) |
Perform triangulation of the given polygon. More... | |
void | operator= (const polygonTriangulate &)=delete |
Disallow default bitwise assignment. More... | |
template<class PointField > | |
Foam::scalar | area (const triFace &triPoints, const PointField &points, const vector &normal) |
template<class PointField > | |
Foam::scalar | quality (const triFace &triPoints, const PointField &points, const vector &normal) |
template<class PointField > | |
Foam::label | nIntersections (const edge &edgePoints, const PointField &points, const vector &normal) |
template<class PointField > | |
Foam::scalar | angle (const label pointi, const PointField &points, const vector &normal) |
Static Public Member Functions | |
static List< point > | randomPolygon (randomGenerator &rndGen, const label n, const scalar error) |
Generate a random polygon for testing purposes. More... | |
Triangulation of three-dimensional polygons.
Definition at line 51 of file polygonTriangulate.H.
Construct null.
Definition at line 845 of file polygonTriangulate.C.
|
delete |
Disallow default bitwise copy construction.
~polygonTriangulate | ( | ) |
Destructor.
Definition at line 863 of file polygonTriangulate.C.
|
static |
Generate a random polygon for testing purposes.
Definition at line 187 of file polygonTriangulate.C.
References Foam::cos(), UList< T >::fcIndex(), forAll, Foam::identityMap(), Foam::inplaceReverseList(), n, Foam::constant::mathematical::pi(), points, rndGen(), randomGenerator::sample01(), Foam::sin(), and Foam::sqrt().
|
inline |
Get the triangles' points.
Definition at line 59 of file polygonTriangulateI.H.
Referenced by polygonTriangulate::area(), FacePatchIntersection< SrcPatchType, TgtPatchType >::FacePatchIntersection(), intersectedSurface::intersectedSurface(), meshTriangulation::meshTriangulation(), STARCDsurfaceFormat< Face >::read(), triSurfaceTools::triangulate(), and MeshedSurface< Face >::triangulate().
|
inline |
Get the triangles' renumbered points.
Definition at line 65 of file polygonTriangulateI.H.
|
inline |
Get a triangle's renumbered points.
Definition at line 74 of file polygonTriangulateI.H.
|
inline |
Get the triangles' edges.
Definition at line 85 of file polygonTriangulateI.H.
Referenced by FacePatchIntersection< SrcPatchType, TgtPatchType >::FacePatchIntersection().
|
inline |
Get the triangles' renumbered edges.
Definition at line 92 of file polygonTriangulateI.H.
|
inline |
Get a triangle's renumbered edges.
Definition at line 101 of file polygonTriangulateI.H.
const Foam::UList< Foam::triFace > & triangulate | ( | const UList< point > & | points, |
const vector & | normal, | ||
const bool | simple = false , |
||
const bool | optimal = true |
||
) |
Perform triangulation of the given polygon.
Definition at line 869 of file polygonTriangulate.C.
References n, points, simple(), and List< T >::size().
const Foam::UList< Foam::triFace > & triangulate | ( | const UList< point > & | points, |
const bool | simple = false , |
||
const bool | optimal = true |
||
) |
Perform triangulation of the given polygon.
Definition at line 901 of file polygonTriangulate.C.
References face::area(), Foam::normalised(), points, and simple().
|
inline |
Perform triangulation of the given polygon.
Definition at line 111 of file polygonTriangulateI.H.
References points, and simple().
|
inline |
Perform triangulation of the given polygon.
Definition at line 125 of file polygonTriangulateI.H.
References points, and simple().
|
delete |
Disallow default bitwise assignment.
Foam::scalar area | ( | const triFace & | triPoints, |
const PointField & | points, | ||
const vector & | normal | ||
) |
Definition at line 32 of file polygonTriangulate.C.
References points, and polygonTriangulate::triPoints().
Foam::scalar quality | ( | const triFace & | triPoints, |
const PointField & | points, | ||
const vector & | normal | ||
) |
Definition at line 48 of file polygonTriangulate.C.
References forAll, Foam::magSqr(), points, and Foam::sqrt().
Foam::label nIntersections | ( | const edge & | edgePoints, |
const PointField & | points, | ||
const vector & | normal | ||
) |
Definition at line 106 of file polygonTriangulate.C.
References edge::commonVertex(), UList< T >::fcIndex(), forAll, n, Foam::constant::mathematical::pi(), and points.
Foam::scalar angle | ( | const label | pointi, |
const PointField & | points, | ||
const vector & | normal | ||
) |
Definition at line 130 of file polygonTriangulate.C.
References Foam::atan2(), UList< T >::fcIndex(), Foam::constant::mathematical::pi(), points, and UList< T >::rcIndex().