#include <Delaunay2.h>
|
| GEOMETRYCORE_API bool | Triangulate (TArrayView< const TVector2< double > > Vertices, TArrayView< const FIndex2i > Edges=TArrayView< const FIndex2i >()) |
| |
| GEOMETRYCORE_API bool | Triangulate (TArrayView< const TVector2< float > > Vertices, TArrayView< const FIndex2i > Edges=TArrayView< const FIndex2i >()) |
| |
| template<typename RealType > |
| bool | Triangulate (const TPolygon2< RealType > &Polygon, TArray< FIndex3i > *TrianglesOut=nullptr) |
| |
| template<typename RealType > |
| bool | Triangulate (const TGeneralPolygon2< RealType > &GeneralPolygon, TArray< FIndex3i > *TrianglesOut=nullptr, TArray< TVector2< RealType > > *VerticesOut=nullptr, bool bFallbackToGeneralizedWinding=false) |
| |
| GEOMETRYCORE_API bool | ConstrainEdges (TArrayView< const TVector2< double > > Vertices, TArrayView< const FIndex2i > Edges) |
| |
| GEOMETRYCORE_API bool | ConstrainEdges (TArrayView< const TVector2< float > > Vertices, TArrayView< const FIndex2i > Edges) |
| |
| GEOMETRYCORE_API bool | Update (TArrayView< const TVector2< double > > Vertices, int32 FirstNewIdx) |
| |
| GEOMETRYCORE_API TArray< FIndex3i > | GetTriangles () const |
| |
| GEOMETRYCORE_API void | GetTrianglesAndAdjacency (TArray< FIndex3i > &Triangles, TArray< FIndex3i > &Adjacency) const |
| |
| TArray< FIndex3i > | GetFilledTriangles (TArrayView< const FIndex2i > Edges, EFillMode FillMode=EFillMode::PositiveWinding) |
| |
| GEOMETRYCORE_API bool | GetFilledTriangles (TArray< FIndex3i > &TrianglesOut, TArrayView< const FIndex2i > Edges, EFillMode FillMode=EFillMode::PositiveWinding) const |
| |
| GEOMETRYCORE_API bool | GetFilledTrianglesGeneralizedWinding (TArray< FIndex3i > &TrianglesOut, TArrayView< const TVector2< double > > Vertices, TArrayView< const FIndex2i > Edges, EFillMode FillMode=EFillMode::PositiveWinding) const |
| |
| GEOMETRYCORE_API bool | GetFilledTrianglesGeneralizedWinding (TArray< FIndex3i > &TrianglesOut, TArrayView< const TVector2< float > > Vertices, TArrayView< const FIndex2i > Edges, EFillMode FillMode=EFillMode::PositiveWinding) const |
| |
| GEOMETRYCORE_API bool | GetFilledTriangles (TArray< FIndex3i > &TrianglesOut, TArrayView< const FIndex2i > BoundaryEdges, TArrayView< const FIndex2i > HoleEdges) const |
| |
| bool | IsConstrained () const |
| |
| GEOMETRYCORE_API bool | IsDelaunay (TArrayView< const FVector2f > Vertices, TArrayView< const FIndex2i > SkipEdges=TArrayView< const FIndex2i >()) const |
| |
| GEOMETRYCORE_API bool | IsDelaunay (TArrayView< const FVector2d > Vertices, TArrayView< const FIndex2i > SkipEdges=TArrayView< const FIndex2i >()) const |
| |
| GEOMETRYCORE_API bool | HasEdges (TArrayView< const FIndex2i > Edges) const |
| |
| GEOMETRYCORE_API void | FixDuplicatesOnEdge (FIndex2i &Edge) |
| |
| GEOMETRYCORE_API bool | HasEdge (const FIndex2i &Edge, bool bRemapDuplicates) |
| |
| GEOMETRYCORE_API bool | HasDuplicates () const |
| |
| GEOMETRYCORE_API int32 | RemapIfDuplicate (int32 Index) const |
| |
| GEOMETRYCORE_API TArray< TArray< FVector2d > > | GetVoronoiCells (TArrayView< const FVector2d > Vertices, bool bIncludeBoundary=false, FAxisAlignedBox2d ClipBounds=FAxisAlignedBox2d::Empty(), double ExpandBounds=0.0) const |
| |
| GEOMETRYCORE_API TArray< TArray< FVector2f > > | GetVoronoiCells (TArrayView< const FVector2f > Vertices, bool bIncludeBoundary=false, FAxisAlignedBox2f ClipBounds=FAxisAlignedBox2f::Empty(), float ExpandBounds=0.0f) const |
| |
| EResult | GetResult () const |
| |
| bool | CanComputeVoronoiCells () const |
| |
◆ EFillMode
| Enumerator |
|---|
| Solid | |
| PositiveWinding | |
| NonZeroWinding | |
| NegativeWinding | |
| OddWinding | |
◆ EResult
| Enumerator |
|---|
| Success | |
| NotComputed | |
| EmptyInput | |
| Collinear | |
| MissingEdges | |
| Unknown | |
◆ CanComputeVoronoiCells()
| bool UE::Geometry::FDelaunay2::CanComputeVoronoiCells |
( |
| ) |
const |
|
inline |
- Returns
- Whether the triangulation result supports computing a Voronoi diagram – i.e., if it was triangulated, or a collinear input
◆ ComputeVoronoiCells()
Compute Voronoi diagram cells
- Parameters
-
| Sites | Positions to use as the sites of the Voronoi diagram |
| bIncludeBoundary | If true, include the cells on the boundary of the diagram. These cells are conceptually infinite, but will be clipped to a bounding box. |
| ClipBounds | If non-empty, all Voronoi diagram cells will be clipped to this rectangle. |
| ExpandBounds | Amount to expand the clipping bounds beyond the Bounds argument (or the bounding box of non-boundary Voronoi cells, if Bounds was empty) |
- Returns
- The cells of each Voronoi site, or an empty array if the Triangulation was not yet computed
◆ ConstrainEdges() [1/2]
Update an already-computed triangulation so the given edges are in the triangulation. Note: Assumes the edges do not intersect other constrained edges OR existing vertices in the triangulation
- Returns
- true if edges were successfully inserted. Note: Will not detect failure due to intersection of constrained edges unless member bValidateEdges == true.
◆ ConstrainEdges() [2/2]
◆ FixDuplicatesOnEdge()
| void UE::Geometry::FDelaunay2::FixDuplicatesOnEdge |
( |
FIndex2i & |
Edge | ) |
|
◆ GetFilledTriangles() [1/3]
Get (by reference) the triangles that are inside the given edges, removing the outside-boundary triangles and the inside-hole triangles
- Parameters
-
| TrianglesOut | Will be filled with a subset of the triangulation that is 'inside' the given edges, as defined by the FillMode |
| BoundaryEdges | Constrained edges in the triangulation that define the boundary of the desired shape |
| HoleEdges | Constrained edges in the triangulation that define inner holes of the desired shape |
- Returns
- true if any result was successfully computed (including an empty result). Currently only returns false if Triangulate() has not been called yet.
◆ GetFilledTriangles() [2/3]
Get (by reference) the triangles that are inside the given edges, removing the outer boundary triangles If a Winding-Number-based fill mode is used, assumes edges are oriented and tracks the winding number across edges
- Parameters
-
| TrianglesOut | Will be filled with a subset of the triangulation that is 'inside' the given edges, as defined by the FillMode |
| Edges | The array of edges that were already constrained in the triangulation (by a previous call to Triangulate or ConstrainEdges) |
| FillMode | Strategy to use to define which triangles to include in the output |
- Returns
- true if the result was well defined and consistent; false otherwise. Solid fill mode always has a well defined result; Winding-number-based fills do not if the edges have open spans. Note the triangulation will still be filled by best-effort even if the function returns false.
◆ GetFilledTriangles() [3/3]
Return the triangles that are inside the given edges, removing the outer boundary triangles If a Winding-Number-based fill mode is used, assumes edges are oriented and tracks the winding number across edges
- Parameters
-
| Edges | The array of edges that were already constrained in the triangulation (by a previous call to Triangulate or ConstrainEdges) |
| FillMode | Strategy to use to define which triangles to include in the output |
- Returns
- A subset of the triangulation that is 'inside' the given edges, as defined by the FillMode
◆ GetFilledTrianglesGeneralizedWinding() [1/2]
Get (by reference) the triangles that are inside the given edges, using a generalized winding number method to determine which triangles are inside Not valid for EFillMode::Solid, will fall back to the above GetFilledTriangles method in that case.
This method is for triangulations where the edges did not define a fully-closed shape, either by construction or due to un-resolved edge intersections in the input. Note that it is slower than the standard GetFilledTriangles, and is worse for closed polygons where all edges were successfully constrained.
- Parameters
-
| TrianglesOut | Will be filled with a subset of the triangulation that is 'inside' the given edges, as defined by the FillMode |
| Vertices | The array of vertices that were used in the triangulation (by the previous call to Triangulate) |
| Edges | The array of edges that were already constrained in the triangulation (by a previous call to Triangulate or ConstrainEdges) |
| FillMode | Strategy to use to define which triangles to include in the output |
- Returns
- true if the result was well defined and consistent; false otherwise. Solid fill mode always has a well defined result; Winding-number-based fills do not if the edges have open spans. Note the triangulation will still be filled by best-effort even if the function returns false.
◆ GetFilledTrianglesGeneralizedWinding() [2/2]
◆ GetResult()
| EResult UE::Geometry::FDelaunay2::GetResult |
( |
| ) |
const |
|
inline |
- Returns
- Last triangulation result – either Success, NotComputed, or a reason for failure
◆ GetTriangles()
◆ GetTrianglesAndAdjacency()
◆ GetVoronoiCells() [1/2]
Get Voronoi diagram cells as dual of the Delaunay triangulation. You must call Triangulate() before calling this.
- Parameters
-
| Vertices | Vertices of the Delaunay triangulation, to be used as the sites of the Voronoi diagram |
| bIncludeBoundary | If true, include the cells on the boundary of the diagram. These cells are conceptually infinite, but will be clipped to a bounding box. |
| ClipBounds | If non-empty, all Voronoi diagram cells will be clipped to this rectangle. |
| ExpandBounds | Amount to expand the clipping bounds beyond the Bounds argument (or the bounding box of non-boundary Voronoi cells, if Bounds was empty) |
- Returns
- The cells of each Voronoi site, or an empty array if the Triangulation was not yet computed
◆ GetVoronoiCells() [2/2]
◆ HasDuplicates()
| bool UE::Geometry::FDelaunay2::HasDuplicates |
( |
| ) |
const |
◆ HasEdge()
| bool UE::Geometry::FDelaunay2::HasEdge |
( |
const FIndex2i & |
Edge, |
|
|
bool |
bRemapDuplicates |
|
) |
| |
◆ HasEdges()
◆ IsConstrained()
| bool UE::Geometry::FDelaunay2::IsConstrained |
( |
| ) |
const |
|
inline |
◆ IsDelaunay() [1/2]
◆ IsDelaunay() [2/2]
◆ RemapIfDuplicate()
| int32 UE::Geometry::FDelaunay2::RemapIfDuplicate |
( |
int32 |
Index | ) |
const |
◆ Triangulate() [1/4]
◆ Triangulate() [2/4]
◆ Triangulate() [3/4]
Compute an (optionally constrained) Delaunay triangulation. Note this clears any previously-held triangulation data, and triangulates the passed-in vertices (and optional edges) from scratch
- Returns
- false if triangulation failed
◆ Triangulate() [4/4]
◆ Update()
◆ ValidateResult()
◆ bAutomaticallyFixEdgesToDuplicateVertices
| bool UE::Geometry::FDelaunay2::bAutomaticallyFixEdgesToDuplicateVertices = false |
◆ bIsConstrained
| bool UE::Geometry::FDelaunay2::bIsConstrained = false |
|
protected |
◆ bKeepFastEdgeAdjacencyData
| bool UE::Geometry::FDelaunay2::bKeepFastEdgeAdjacencyData = false |
◆ bValidateEdges
| bool UE::Geometry::FDelaunay2::bValidateEdges = true |
◆ Connectivity
◆ RandomStream
The documentation for this class was generated from the following files:
- Engine/Source/Runtime/GeometryCore/Public/CompGeom/Delaunay2.h
- Engine/Source/Runtime/GeometryCore/Private/CompGeom/Delaunay2.cpp