TGeneralPolygon2

[TGeneralPolygon2](API\Runtime\GeometryCore\Curve\TGeneralPolygon2) is a 2D polygon with holes

Choose your operating system:

Windows

macOS

Linux

References

Module

GeometryCore

Header

/Engine/Source/Runtime/GeometryCore/Public/Curve/GeneralPolygon2.h

Include

#include "Curve/GeneralPolygon2.h"

Syntax

template<typename T>
class TGeneralPolygon2

Remarks

TGeneralPolygon2 is a 2D polygon with holes

Variables

Name Description

Protected variable

bool

 

bOuterIsCW

If true, Outer polygon winding is clockwise

Protected variable

TArray< TPolygo...

 

Holes

The list of Holes in the polygon

Protected variable

TPolygon2< T >

 

Outer

The Outer boundary of the polygon

Constructors

Name Description

Public function

TGeneralPolygon2()

Public function

TGeneralPolygon2

(
    const TGeneralPolygon2& Copy
)

Construct a copy of another general polygon

Public function

TGeneralPolygon2

(
    const TPolygon2< T >& ToSetOuter
)

Construct a general polygon with the given polygon as boundary

Functions

Name Description

Public function

bool

 

AddHole

(
    TPolygon2< T > Hole,
    bool bCheckContainment,
    bool bCheckOrientation
)

Public function

TAxisAligned...

 

Bounds()

Public function

void

 

ClearHoles()

Public function

bool

 

Contains

(
    TPolygon2< T > Poly
)

Public function

bool

 

Contains

(
    TVector2< T > vTest
)

Public function

double

 

DistanceSquared

(
    TVector2< T > p,
    int& iHoleIndex,
    int& iNearSeg,
    double& fNearSegT
)

This should be more efficient when there are Holes...

Public function Const

const TArray...

 

GetHoles()

Public function

TVector2< T ...

 

GetNormal

(
    int iSegment,
    double segT,
    int iHoleIndex
)

Public function Const

const TPolyg...

 

GetOuter()

Public function

TVector2< T ...

 

GetSegmentPoint

(
    int iSegment,
    double fSegT,
    int iHoleIndex
)

Public function Const

bool

 

HasHoles()

Public function Const

double

 

HoleUnsignedArea()

Public function

bool

 

Intersects

(
    TPolygon2< T > Poly
)

Public function

double

 

Perimeter()

Public function

void

 

Reverse()

Public function

void

 

Scale

(
    TVector2< T > scale,
    TVector2< T > origin
)

Public function

TSegment2< T...

 

Segment

(
    int iSegment,
    int iHoleIndex
)

Public function

void

 

SetOuter

(
    const TPolygon2< T >& ToSetOuter
)

Public function

void

 

SetOuterWithOrientation

(
    const TPolygon2< T >& ToSetOuter,
    bool bToSetOuterIsCW
)

Public function Const

double

 

SignedArea()

Public function

void

 

Simplify

(
    double ClusterTol,
    double LineDeviationTol
)

Public function

void

 

Transform

(
    const TFunction< TVector2< T >(cons...
)

Public function

void

 

Translate

(
    TVector2< T > translate
)