6#include "Containers/Array.h"
27template <
typename T>
class TGeneralPolygon2;
28template <
typename T>
class TPolygon2;
33struct FDelaunay2Connectivity;
104 template<
typename RealType>
109 Edges.
Reserve(NumVertices - 1);
110 for (
int32 Last = NumVertices - 1, Idx = 0; Idx < NumVertices;
Last = Idx++)
127 template<
typename RealType>
135 if (Vertices.IsEmpty())
142 AllEdges.Reserve(AllEdges.Num() + Vertices.Num() - 1);
143 int32 NumVertices = Vertices.Num();
144 for (
int32 Last = NumVertices - 1, Idx = 0; Idx < NumVertices;
Last = Idx++)
146 AllEdges.Add(
FIndex2i(StartIdx +
Last, StartIdx + Idx));
296 template<
typename RealType>
322 UE_DEPRECATED(5.5,
"No longer used by the implementation and may be removed")
bool bSuccess
Definition ConvexDecomposition3.cpp:819
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const bool
Definition NetworkReplayStreaming.h:178
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition ArrayView.h:139
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
UE_FORCEINLINE_HINT void Reserve(SizeType Number)
Definition Array.h:3016
Definition Delaunay2.h:36
GEOMETRYCORE_API void FixDuplicatesOnEdge(FIndex2i &Edge)
Definition Delaunay2.cpp:1808
bool bKeepFastEdgeAdjacencyData
Definition Delaunay2.h:76
EFillMode
Definition Delaunay2.h:57
GEOMETRYCORE_API bool ConstrainEdges(TArrayView< const TVector2< double > > Vertices, TArrayView< const FIndex2i > Edges)
Definition Delaunay2.cpp:1637
FRandomStream RandomStream
Definition Delaunay2.h:73
GEOMETRYCORE_API TArray< FIndex3i > GetTriangles() const
Definition Delaunay2.cpp:1689
GEOMETRYCORE_API bool HasEdge(const FIndex2i &Edge, bool bRemapDuplicates)
Definition Delaunay2.cpp:1814
EResult
Definition Delaunay2.h:41
GEOMETRYCORE_API bool HasEdges(TArrayView< const FIndex2i > Edges) const
Definition Delaunay2.cpp:1788
bool ValidateResult(TArrayView< const FIndex2i > Edges) const
Definition Delaunay2.h:323
GEOMETRYCORE_API TArray< TArray< FVector2d > > GetVoronoiCells(TArrayView< const FVector2d > Vertices, bool bIncludeBoundary=false, FAxisAlignedBox2d ClipBounds=FAxisAlignedBox2d::Empty(), double ExpandBounds=0.0) const
Definition Delaunay2.cpp:1761
bool bIsConstrained
Definition Delaunay2.h:319
TPimplPtr< FDelaunay2Connectivity > Connectivity
Definition Delaunay2.h:317
bool bAutomaticallyFixEdgesToDuplicateVertices
Definition Delaunay2.h:85
GEOMETRYCORE_API bool IsDelaunay(TArrayView< const FVector2f > Vertices, TArrayView< const FIndex2i > SkipEdges=TArrayView< const FIndex2i >()) const
Definition Delaunay2.cpp:1742
static TArray< TArray< TVector2< RealType > > > ComputeVoronoiCells(TArrayView< const TVector2< RealType > > Sites, bool bIncludeBoundary=false, TAxisAlignedBox2< RealType > ClipBounds=FAxisAlignedBox2f::Empty(), RealType ExpandBounds=(RealType) 0)
Definition Delaunay2.h:297
GEOMETRYCORE_API bool Triangulate(TArrayView< const TVector2< double > > Vertices, TArrayView< const FIndex2i > Edges=TArrayView< const FIndex2i >())
Definition Delaunay2.cpp:1617
GEOMETRYCORE_API bool GetFilledTrianglesGeneralizedWinding(TArray< FIndex3i > &TrianglesOut, TArrayView< const TVector2< double > > Vertices, TArrayView< const FIndex2i > Edges, EFillMode FillMode=EFillMode::PositiveWinding) const
Definition Delaunay2.cpp:1724
EResult GetResult() const
Definition Delaunay2.h:305
bool IsConstrained() const
Definition Delaunay2.h:251
bool Triangulate(const TGeneralPolygon2< RealType > &GeneralPolygon, TArray< FIndex3i > *TrianglesOut=nullptr, TArray< TVector2< RealType > > *VerticesOut=nullptr, bool bFallbackToGeneralizedWinding=false)
Definition Delaunay2.h:128
GEOMETRYCORE_API int32 RemapIfDuplicate(int32 Index) const
Definition Delaunay2.cpp:1832
bool Triangulate(const TPolygon2< RealType > &Polygon, TArray< FIndex3i > *TrianglesOut=nullptr)
Definition Delaunay2.h:105
bool bValidateEdges
Definition Delaunay2.h:81
GEOMETRYCORE_API void GetTrianglesAndAdjacency(TArray< FIndex3i > &Triangles, TArray< FIndex3i > &Adjacency) const
Definition Delaunay2.cpp:1698
TArray< FIndex3i > GetFilledTriangles(TArrayView< const FIndex2i > Edges, EFillMode FillMode=EFillMode::PositiveWinding)
Definition Delaunay2.h:203
GEOMETRYCORE_API bool HasDuplicates() const
Definition Delaunay2.cpp:1827
bool CanComputeVoronoiCells() const
Definition Delaunay2.h:311
Definition GeneralPolygon2.h:28
Definition AdvancedWidgetsModule.cpp:13
U16 Index
Definition radfft.cpp:71
Definition RandomStream.h:20
Definition IndexTypes.h:27
Definition BoxTypes.h:637
static TAxisAlignedBox2< RealType > Empty()
Definition BoxTypes.h:706