FGeomTools2D

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/GeomTools.h

Include

#include "GeomTools.h"

Syntax

class FGeomTools2D

Functions

Name Description

Public function Static

bool

 

ArePolygonsValid

(
    const TArray< TArray< FVector2D >> ...
)

Checks that these polygons can be successfully triangulated.

Public function Static

void

 

CorrectPolygonWinding

(
    TArray< FVector2D >& OutVertices,
    const TArray< FVector2D >& Vertice...,
    const bool bNegativeWinding
)

Corrects the polygon winding to match bNegativeWinding Ie.

Public function Static

void

 

GenerateConvexHullFromPoints

(
    TArray< FVector2D >& OutConvexHull,
    TArray< FVector2D >& Points
)

Generate convex hull from points.

Public function Static

void

 

GenerateConvexPolygonsFromTriangles

(
    TArray< TArray< FVector2D >>& OutP...,
    const TArray< FVector2D >& InTrian...
)

Generate convex shapes.

Public function Static

bool

 

IsPointInPolygon

(
    const FVector2D& TestPoint,
    const TArray< FVector2D >& Polygon...
)

Returns true if TestPoint is inside the polygon defined by PolygonPoints.

Public function Static

bool

 

IsPolygonWindingCCW

(
    const TArray< FVector2D >& Points
)

Returns true if the points forming a polygon have CCW winding Returns true if the polygon isn't valid

Public function Static

bool

 

IsPolygonWindingCCW

(
    const TArray< FIntPoint >& Points
)

Returns true if the points forming a polygon have CCW winding Returns true if the polygon isn't valid

Public function Static

TArray< TArr...

 

ReducePolygons

(
    const TArray< TArray< FVector2D >> ...,
    const TArray< bool >& PolygonNegat...
)

Merge additive and subtractive polygons, split them up into additive polygons Assumes all polygons and overlapping polygons are valid, and the windings match the setting on the polygon

Public function Static

void

 

RemoveRedundantTriangles

(
    TArray< FVector2D >& OutTriangles,
    const TArray< FVector2D >& InTrian...
)

2D version of RemoveRedundantTriangles from GeomTools

Public function Static

bool

 

TriangulatePoly

(
    TArray< FVector2D >& OutTris,
    const TArray< FVector2D >& Polygon...,
    bool bKeepColinearVertices
)

Triangulate a polygon. Check notes in implementation.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss