FPoly

A general-purpose polygon used by the editor.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/Polys.h

Include

#include "Engine/Polys.h"

Syntax

class FPoly

Remarks

A general-purpose polygon used by the editor. An FPoly is a free-standing class which exists independently of any particular level, unlike the polys associated with Bsp nodes which rely on scads of other objects. FPolys are used in UnrealEd for internal work, such as building the Bsp and performing boolean operations.

Variables

Name Description

Public variable

ABrush *

 

Actor

Public variable

FVector

 

Base

Public variable

int32

 

iBrushPoly

Public variable

int32

 

iLink

Public variable

int32

 

iLinkSurf

Public variable

FName

 

ItemName

Public variable

float

 

LightMapScale

Public variable

FLightmassPrimi...

 

LightmassSettings

This MUST be the format of FLightmassPrimitiveSettings The Lightmass settings for surfaces generated from this poly

Public variable

UMaterialInterf...

 

Material

Public variable

FVector

 

Normal

Public variable

uint32

 

PolyFlags

Public variable

FName

 

RulesetVariation

Public variable

uint32

 

SmoothingMask

Public variable

FVector

 

TextureU

Public variable

FVector

 

TextureV

Public variable

VerticesArrayTy...

 

Vertices

Constructors

Name Description

Public function

FPoly()

Constructor, initializing all member variables.

Functions

Name Description

Public function

float

 

Area()

Computes the 2D area of the polygon. Returns zero if the polygon has less than three verices.

Public function Static

FPoly

 

BuildAndCutInfiniteFPoly

(
    const FPlane& InPlane,
    const TArray< FPlane >& InCutPlane...,
    ABrush* InOwnerBrush
)

Public function Static

FPoly

 

BuildInfiniteFPoly

(
    const FPlane& InPlane
)

Builds a huge poly aligned with the specified plane.

Public function

int32

 

CalcNormal

(
    bool bSilent
)

Compute normal of an FPoly.

Public function

bool

 

DoesLineIntersect

(
    FVector Start,
    FVector End,
    FVector* Intersect
)

Checks to see if the specified line intersects this poly or not.

Public function Const

int32

 

Faces

(
    const FPoly& Test
)

Return whether this poly and Test are facing each other.

Public function

int32

 

Finalize

(
    ABrush* InOwner,
    int32 NoError
)

Compute all remaining polygon parameters (normal, etc) that are blank.

Public function

int32

 

Fix()

Fix up an editor poly by deleting vertices that are identical.

Public function

FVector

 

GetMidPoint()

Computes the mid point of the polygon (in local space).

Public function Static

void

 

GetOutsideWindings

(
    ABrush* InOwnerBrush,
    ArrayType& InPolygons,
    TArray< TArray< FVector > >& InWin...
)

Takes a set of polygons and returns a vertex array representing the outside winding for them.

Public function

int32

 

GetVertexIndex

(
    FVector& InVtx
)

Finds the index of the specific vertex.

Public function

void

 

Init()

Initialize everything in an editor polygon structure to defaults.

Public function

void

 

InsertVertex

(
    int32 InPos,
    FVector InVtx
)

Inserts a vertex into the poly at a specific position.

Public function Const

int32

 

IsBackfaced

(
    const FVector& Point
)

Inlines.

Public function

bool

 

IsConvex()

Checks to see if this polygon is a convex shape.

Public function

bool

 

IsCoplanar()

Checks to see if all the vertices on a polygon are coplanar.

Public function Const

int32

 

IsCoplanar

(
    const FPoly& Test
)

Public function

bool

 

OnPlane

(
    FVector InVtx
)

Checks to see if the specified vertex lies on this polygons plane.

Public function

bool

 

OnPoly

(
    FVector InVtx
)

Checks to see if the specified vertex is on this poly.

Public function Static

void

 

OptimizeIntoConvexPolys

(
    ABrush* InOwnerBrush,
    ArrayType& InPolygons
)

Optimizes a set of polygons into a smaller set of convex polygons.

Public function

int32

 

RemoveColinears()

Remove colinear vertices and check convexity. Returns 1 if convex, 0 if nonconvex or collapsed.

Public function

void

 

RemoveVertex

(
    FVector InVtx
)

Removes a vertex from the polygons list of vertices

Public function

void

 

Reverse()

Reverse an FPoly by reversing the normal and reversing the order of its vertices.

Public function

void

 

Rotate

(
    const FRotator& Rotation
)

Rotate an editor polygon.

Public function

void

 

Scale

(
    const FVector& Scale
)

Scale an editor polygon.

Public function

int32

 

Split

(
    const FVector& InNormal,
    const FVector& InBase
)

Split a poly and keep only the front half. Returns number of vertices, 0 if clipped away.

Public function Const

int32

 

SplitWithNode

(
    const UModel* Model,
    int32 iNode,
    FPoly* FrontPoly,
    FPoly* BackPoly,
    int32 VeryPrecise
)

Split with a Bsp node.

Public function Const

int32

 

SplitWithPlane

(
    const FVector& InBase,
    const FVector& InNormal,
    FPoly* FrontPoly,
    FPoly* BackPoly,
    int32 VeryPrecise
)

Split with plane. Meant to be numerically stable.

Public function Const

int32

 

SplitWithPlaneFast

(
    const FPlane& Plane,
    FPoly* FrontPoly,
    FPoly* BackPoly
)

Split with plane quickly for in-game geometry operations.

Public function

void

 

Transform

(
    const FVector& PostAdd
)

Transform an editor polygon with a post-transformation addition.

Public function

int32

 

Triangulate

(
    ABrush* InOwnerBrush,
    TArray< FPoly >& OutTriangles
)

Breaks down this polygon into triangles. The triangles are then returned to the caller in an array.

Typedefs

Name

Description

VerticesArrayType

Store up to 16 vertices inline.

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