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.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback