Navigation
Unreal Engine C++ API Reference > Plugins > GeometryAlgorithms
References
Module | GeometryAlgorithms |
Header | /Engine/Plugins/Runtime/GeometryProcessing/Source/GeometryAlgorithms/Public/Arrangement2d.h |
Include | #include "Arrangement2d.h" |
Syntax
struct FArrangement2d
Remarks
Arrangement2d constructs a planar arrangement of a set of 2D line segments. When a segment is inserted, existing edges are split, and the inserted segment becomes multiple graph edges. So, the resulting FDynamicGraph2d should not have any edges that intersect.
Calculations are performed in double-precision, so there is no guarantee of correctness.
[TODO] multi-level segment has to accelerate find_intersecting_edges() [TODO] maybe smarter handling
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
*void int | GID | |
![]() |
FDynamicGraph2d | Graph | Graph of arrangement |
![]() |
TPointHashGrid2d< int > | PointHash | PointHash for vertices of graph. |
![]() |
double | VertexSnapTol | Points within this tolerance are merged |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
FArrangement2d
(
const FAxisAlignedBox2d& BoundsHint |
||
![]() |
FArrangement2d
(
double PointHashCellSize |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
int | find_existing_vertex
(
FVector2d Pt |
Find existing vertex at point, if it exists |
![]() |
bool | find_intersecting_edges
(
FVector2d A, |
Find set of edges in graph that intersect with edge [A,B] |
![]() |
bool | find_intersecting_floating_vertices
(
const FSegment2d& SegAB, |
|
![]() |
int | find_nearest_boundary_vertex
(
FVector2d Pt, |
Find nearest boundary vertex, within SearchRadius |
![]() |
int | find_nearest_vertex
(
FVector2d Pt, |
Find closest vertex, within SearchRadius |
![]() |
bool | Check if current Graph has self-intersections; not optimized, only for debugging | |
![]() |
bool | HasVertexNear
(
FVector2d Point, |
Check if vertex exists in region |
![]() |
void | Insert
(
const FSegment2d& Segment, |
Insert segment into the arrangement |
![]() |
int | Insert
(
const FVector2d& Pt |
Insert isolated point P into the arrangement |
![]() |
void | Insert
(
const FVector2d& A, |
Insert segment [A,B] into the arrangement |
![]() ![]() |
*void | Insert
(
PolyLine2d pline, |
Int N = pline.VertexCount - 1; for (int i = 0; i < N; ++i) { FVector2d A = pline[i]; FVector2d B = pline[i + 1]; insert_segment(A, B, GID); } |
![]() |
int | insert_point
(
const FVector2d& P, |
Insert pt P into the arrangement, splitting existing edges as necessary |
![]() |
bool | insert_segment
(
FVector2d A, |
Insert edge [A,B] into the arrangement, splitting existing edges as necessary |
![]() |
int32 | InsertNewIsolatedPointUnsafe
(
const FVector2d& Pt |
Insert isolated point P into the arrangement when you know by construction it's not too close to any vertex or edge Much faster, but will break things if you use it to insert a point that is on top of any existing element! |
![]() |
FIndex2i | split_segment_at_t
(
int EID, |
Insert new point into segment EID at parameter value T If T is within Tol of endpoint of segment, we use that instead. |
![]() |
FIndex2i | SplitEdgeAtPoint
(
int EdgeID, |
Subdivide edge at a given position |
![]() |
bool | Triangulate
(
TArray< FIndex3i >& Triangles |
Attempts to triangulate the arrangement with a constrained Delaunay triangulation NOTE: May fail if arrangement has self-intersections |
![]() |
bool | TriangulateWithBoundary
(
TArray< FIndex3i >& Triangles, |
Attempts to triangulate the arrangement with a constrained Delaunay triangulation NOTE: May fail if arrangement has self-intersections |
![]() |
bool | TriangulateWithBoundaryAndHoles
(
TArray< FIndex3i >& Triangles, |
Attempts to triangulate the arrangement with a constrained Delaunay triangulation NOTE: May fail if arrangement has self-intersections |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FIntersection |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() |
bool | AttemptTriangulate
(
TArray< FIntVector >& Triangles, |
Please use the Triangulate or TriangulateWithBoundary functions instead, which are explicit about whether a BoundaryEdgeGroupID should be present |
![]() |
bool | AttemptTriangulate
(
TArray< FIndex3i >& Triangles, |
Please use the Triangulate or TriangulateWithBoundary functions instead, which are explicit about whether a BoundaryEdgeGroupID should be present |