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

◆ 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 66 of file polygonTriangulateI.H.

References polygonTriangulate::triPoints().

Here is the call graph for this function:

◆ triPoints() [3/3]

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

Get a triangle's renumbered points.

Definition at line 75 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.

Referenced by polygonTriangulate::randomPolygon(), and polygonTriangulate::triEdges().

Here is the caller graph for this function:

◆ 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 93 of file polygonTriangulateI.H.

References polygonTriangulate::triEdges().

Here is the call graph for this function:

◆ 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 102 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 870 of file polygonTriangulate.C.

References UList< 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 902 of file polygonTriangulate.C.

References face::area(), and Foam::normalised().

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 112 of file polygonTriangulateI.H.

References points.

◆ 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 126 of file polygonTriangulateI.H.

References points.

◆ 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 33 of file polygonTriangulate.C.

◆ quality()

Foam::scalar quality ( const triFace triPoints,
const PointField points,
const vector normal 
)

Definition at line 49 of file polygonTriangulate.C.

References Foam::cmptMax(), Foam::cmptMin(), Foam::cof(), Foam::det(), forAll, M, Foam::mag(), Foam::magSqr(), Foam::perpendicular(), Foam::sign(), 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 107 of file polygonTriangulate.C.

References edge::commonVertex(), UList< T >::fcIndex(), forAll, n, and Foam::constant::mathematical::pi().

Here is the call graph for this function:

◆ angle()


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