polygonTriangulate Class Reference

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< triFacetriPoints (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< pointrandomPolygon (Random &rndGen, const label n, const scalar error)
 Generate a random polygon for testing purposes. More...
 

Detailed Description

Triangulation of three-dimensional polygons.

Source files

Definition at line 51 of file polygonTriangulate.H.

Constructor & Destructor Documentation

◆ polygonTriangulate() [1/2]

Construct null.

Definition at line 845 of file polygonTriangulate.C.

◆ polygonTriangulate() [2/2]

polygonTriangulate ( const polygonTriangulate )
delete

Disallow default bitwise copy construction.

◆ ~polygonTriangulate()

Destructor.

Definition at line 863 of file polygonTriangulate.C.

Member Function Documentation

◆ randomPolygon()

Foam::List< Foam::point > randomPolygon ( Random rndGen,
const label  n,
const scalar  error 
)
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(), Random::sample01(), Foam::sin(), and Foam::sqrt().

Here is the call graph for this function:

◆ triPoints() [1/3]

const Foam::UList< Foam::triFace > & triPoints ( ) const
inline

◆ triPoints() [2/3]

Foam::List< Foam::triFace > triPoints ( const UList< label > &  polyPoints) const
inline

Get the triangles' renumbered points.

Definition at line 65 of file polygonTriangulateI.H.

◆ triPoints() [3/3]

Foam::triFace triPoints ( const label  trii,
const UList< label > &  polyPoints 
) const
inline

Get a triangle's renumbered points.

Definition at line 74 of file polygonTriangulateI.H.

◆ triEdges() [1/3]

const Foam::UList< Foam::FixedList< Foam::label, 3 > > & triEdges ( ) const
inline

Get the triangles' edges.

Definition at line 85 of file polygonTriangulateI.H.

◆ triEdges() [2/3]

Foam::List< Foam::FixedList< Foam::label, 3 > > triEdges ( const UList< label > &  polyEdges) const
inline

Get the triangles' renumbered edges.

Definition at line 92 of file polygonTriangulateI.H.

◆ triEdges() [3/3]

Foam::FixedList< Foam::label, 3 > triEdges ( const label  trii,
const UList< label > &  polyEdges 
) const
inline

Get a triangle's renumbered edges.

Definition at line 101 of file polygonTriangulateI.H.

◆ triangulate() [1/4]

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().

Here is the call graph for this function:

◆ triangulate() [2/4]

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().

Here is the call graph for this function:

◆ triangulate() [3/4]

const Foam::UList< Foam::triFace > & triangulate ( const UIndirectList< point > &  points,
const vector normal,
const bool  simple = false,
const bool  optimal = true 
)
inline

Perform triangulation of the given polygon.

Definition at line 111 of file polygonTriangulateI.H.

References points, and simple().

Here is the call graph for this function:

◆ triangulate() [4/4]

const Foam::UList< Foam::triFace > & triangulate ( const UIndirectList< point > &  points,
const bool  simple = false,
const bool  optimal = true 
)
inline

Perform triangulation of the given polygon.

Definition at line 125 of file polygonTriangulateI.H.

References points, and simple().

Here is the call graph for this function:

◆ operator=()

void operator= ( const polygonTriangulate )
delete

Disallow default bitwise assignment.

◆ area()

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().

Here is the call graph for this function:

◆ quality()

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().

Here is the call graph for this function:

◆ nIntersections()

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.

Here is the call graph for this function:

◆ angle()

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().

Here is the call graph for this function:

The documentation for this class was generated from the following files: