Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | FPoly |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/Polys.h |
| Include Path | #include "Engine/Polys.h" |
Syntax
class FPoly
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPoly() |
Constructor, initializing all member variables. | Engine/Polys.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| VerticesArrayType | TArray< FVector3f, TInlineAllocator< 16 > > | Store up to 16 vertices inline. | Engine/Polys.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Actor | TObjectPtr< ABrush > | Engine/Polys.h | ||
| Base | FVector3f | Engine/Polys.h | ||
| iBrushPoly | int32 | Engine/Polys.h | ||
| iLink | int32 | Engine/Polys.h | ||
| iLinkSurf | int32 | Engine/Polys.h | ||
| ItemName | FName | Engine/Polys.h | ||
| LightMapScale | float | Engine/Polys.h | ||
| LightmassSettings | FLightmassPrimitiveSettings | This MUST be the format of FLightmassPrimitiveSettings The Lightmass settings for surfaces generated from this poly | Engine/Polys.h | |
| Material | TObjectPtr< UMaterialInterface > | Engine/Polys.h | ||
| Normal | FVector3f | Engine/Polys.h | ||
| PolyFlags | uint32 | Engine/Polys.h | ||
| RulesetVariation | FName | Engine/Polys.h | ||
| SmoothingMask | uint32 | Engine/Polys.h | ||
| TextureU | FVector3f | Engine/Polys.h | ||
| TextureV | FVector3f | Engine/Polys.h | ||
| Vertices | VerticesArrayType | Engine/Polys.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float Area() |
Computes the 2D area of the polygon. Returns zero if the polygon has less than three verices. | Engine/Polys.h | |
int32 CalcNormal
(
bool bSilent |
Compute normal of an FPoly. | Engine/Polys.h | |
bool DoesLineIntersect
(
FVector Start, |
Checks to see if the specified line intersects this poly or not. | Engine/Polys.h | |
| Return whether this poly and Test are facing each other. | Engine/Polys.h | ||
| Compute all remaining polygon parameters (normal, etc) that are blank. | Engine/Polys.h | ||
int32 Fix () |
Fix up an editor poly by deleting vertices that are identical. | Engine/Polys.h | |
FVector GetMidPoint() |
Computes the mid point of the polygon (in local space). | Engine/Polys.h | |
int32 GetVertexIndex
(
FVector3f& InVtx |
Finds the index of the specific vertex. | Engine/Polys.h | |
void Init () |
Initialize everything in an editor polygon structure to defaults. | Engine/Polys.h | |
void InsertVertex
(
int32 InPos, |
Inserts a vertex into the poly at a specific position. | Engine/Polys.h | |
int32 IsBackfaced
(
const FVector3f& Point |
Inlines. | Engine/Polys.h | |
bool IsConvex() |
Checks to see if this polygon is a convex shape. | Engine/Polys.h | |
bool IsCoplanar () |
Checks to see if all the vertices on a polygon are coplanar. | Engine/Polys.h | |
int32 IsCoplanar
(
const FPoly& Test |
Engine/Polys.h | ||
bool OnPlane
(
FVector InVtx |
Checks to see if the specified vertex lies on this polygons plane. | Engine/Polys.h | |
bool OnPoly
(
FVector InVtx |
Checks to see if the specified vertex is on this poly. | Engine/Polys.h | |
int32 RemoveColinears() |
Remove colinear vertices and check convexity. Returns 1 if convex, 0 if nonconvex or collapsed. | Engine/Polys.h | |
void RemoveVertex
(
FVector InVtx |
Removes a vertex from the polygons list of vertices | Engine/Polys.h | |
void Reverse() |
Reverse an FPoly by reversing the normal and reversing the order of its vertices. | Engine/Polys.h | |
void Rotate
(
const FRotator3f& Rotation |
Rotate an editor polygon. | Engine/Polys.h | |
void Scale
(
const FVector3f& Scale |
Scale an editor polygon. | Engine/Polys.h | |
int32 Split
(
const FVector3f& InNormal, |
Split a poly and keep only the front half. Returns number of vertices, 0 if clipped away. | Engine/Polys.h | |
| Split with a Bsp node. | Engine/Polys.h | ||
| Split with plane. Meant to be numerically stable. | Engine/Polys.h | ||
int32 SplitWithPlaneFast
(
const FPlane& Plane, |
Split with plane quickly for in-game geometry operations. | Engine/Polys.h | |
void Transform
(
const FVector3f& PostAdd |
Transform an editor polygon with a post-transformation addition. | Engine/Polys.h | |
| Breaks down this polygon into triangles. The triangles are then returned to the caller in an array. | Engine/Polys.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Engine/Polys.h | |||
static FPoly BuildInfiniteFPoly
(
const FPlane& InPlane |
Builds a huge poly aligned with the specified plane. | Engine/Polys.h | |
static void GetOutsideWindings
(
ABrush* InOwnerBrush, |
Takes a set of polygons and returns a vertex array representing the outside winding for them. | Engine/Polys.h | |
static void OptimizeIntoConvexPolys
(
ABrush* InOwnerBrush, |
Optimizes a set of polygons into a smaller set of convex polygons. | Engine/Polys.h |