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 PAPER2FSpriteGeometryCollection
Variables
| Type | Name | Description | |
|---|---|---|---|
| float | AlphaThreshold | Alpha threshold for a transparent pixel (range 0..1, anything equal or below this value will be considered unimportant) | |
| bool | bAvoidVertexMerging | Experimental: Hint to the triangulation routine that extra vertices should be preserved. | |
| float | DetailAmount | Amount to detail to consider when shrink-wrapping (range 0..1, 0 = low detail, 1 = high detail) | |
| TEnumAsByte< ESpritePolygonMode::Type > | GeometryType | The geometry type (automatic / manual) | |
| int32 | PixelsPerSubdivisionX | Size of a single subdivision (in pixels) in X (for Diced mode) | |
| int32 | PixelsPerSubdivisionY | Size of a single subdivision (in pixels) in Y (for Diced mode) | |
| TArray< FSpriteGeometryShape > | Shapes | List of shapes. | |
| float | SimplifyEpsilon | This is the threshold below which multiple vertices will be merged together when doing shrink-wrapping. Higher values result in fewer vertices. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddCircleShape
(
FVector2D Position, |
||
| void | AddRectangleShape
(
FVector2D Position, |
||
| bool | Conditions this geometry collection (turning Polygons back to Boxes if they meet the definition of a box, etc...) Returns true if something was modified | ||
| void | Reset () |
Empties this geometry collection, resetting the GeometryType to TightBoundingBox. | |
| void | Triangulate
(
TArray< FVector2D >& Target, |
Takes all polygon shapes and generates a list of triangles from them. |