PAPER2FSpriteGeometryShape

A single piece of geometry (e.g., a polygon which may be convex or concave, a box, or a circle)

Windows
MacOS
Linux

References

Module

Paper2D

Header

/Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/SpriteEditorOnlyTypes.h

Include

#include "SpriteEditorOnlyTypes.h"

Syntax

[USTRUCT](Programming/UnrealArchitecture/Reference/Structs)()
struct PAPER2FSpriteGeometryShape

Remarks

A single piece of geometry (e.g., a polygon which may be convex or concave, a box, or a circle)

Variables

Name Description

Public variable UProperty Category visibleanywhere

bool

 

bNegativeWinding

For Polygon geometry, this tells us if the winding should be negative (CW) regardless of the order in Vertices.

Public variable UProperty Category visibleanywhere

FVector2D

 

BoxPosition

Center of the box or circle, acts as the pivot point for polygons (but may not be at the center of them)

Public variable UProperty Category visibleanywhere

FVector2D

 

BoxSize

Size of the box or major/minor dimensions of the circle.

Public variable UProperty Category visibleanywhere

float

 

Rotation

Rotation of the shape (in degrees)

Public variable UProperty Category visibleanywhere

ESpriteShapeTyp...

 

ShapeType

The type of this piece of geometry.

Public variable UProperty Category, EditAnywhere

TArray< FVector...

 

Vertices

Vertices for the polygon (valid for Box and Polygon, but empty for Circle)

Functions

Name Description

Public function Const

FVector2D

 

ConvertShapeSpaceToTextureSpace

(
    const FVector2D& ShapeSpacePoint
)

Public function Const

FVector2D

 

ConvertTextureSpaceToShapeSpace

(
    const FVector2D& TextureSpacePoint
)

Public function

 

FSpriteGeometryShape()

Public function Const

FVector2D

 

GetPolygonCentroid()

Returns the polygon centroid in texture space.

Public function Const

void

 

GetTextureSpaceVertices

(
    TArray< FVector2D >& InOutVertices
)

Public function Const

bool

 

IsShapeValid()

Is this shape valid (e.g., at least 3 vertices for a polygon)?

Public function

void

 

SetNewPivot

(
    const FVector2D& NewPosInTextureSp...
)

Sets a new pivot and adjusts all vertices to be relative to it.

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