Navigation
API > API/Plugins > API/Plugins/Paper2D
References
| Module | Paper2D |
| Header | /Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/SpriteEditorOnlyTypes.h |
| Include | #include "SpriteEditorOnlyTypes.h" |
Syntax
USTRUCT&40;&41;
struct PAPER2FSpriteGeometryShape
Remarks
A single piece of geometry (e.g., a polygon which may be convex or concave, a box, or a circle)
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bNegativeWinding | For Polygon geometry, this tells us if the winding should be negative (CW) regardless of the order in Vertices. | |
| FVector2D | BoxPosition | Center of the box or circle, acts as the pivot point for polygons (but may not be at the center of them) | |
| FVector2D | BoxSize | Size of the box or major/minor dimensions of the circle Note: Only valid when GeometryType is Box or Circle | |
| float | Rotation | Rotation of the shape (in degrees) | |
| ESpriteShapeType | ShapeType | The type of this piece of geometry. | |
| TArray< FVector2D > | Vertices | Vertices for the polygon (valid for Box and Polygon, but empty for Circle) |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FVector2D | ConvertShapeSpaceToTextureSpace
(
const FVector2D& ShapeSpacePoint |
||
| FVector2D | ConvertTextureSpaceToShapeSpace
(
const FVector2D& TextureSpacePoint |
||
| FVector2D | Returns the polygon centroid in texture space. | ||
| void | GetTextureSpaceVertices
(
TArray< FVector2D >& InOutVertices |
||
| bool | IsShapeValid () |
Is this shape valid (e.g., at least 3 vertices for a polygon)? | |
| void | SetNewPivot
(
const FVector2D& NewPosInTextureSpace |
Sets a new pivot and adjusts all vertices to be relative to it. |