Navigation
API > API/Runtime > API/Runtime/Engine
An incremental texture space allocator. For best results, add the elements ordered descending in size.
| Name | FTextureLayout |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/TextureLayout.h |
| Include Path | #include "TextureLayout.h" |
Syntax
class FTextureLayout
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTextureLayout
(
uint32 InMinSizeX, |
Minimal initialization constructor. | TextureLayout.h |
Structs
| Name | Remarks |
|---|---|
| FTextureLayoutNode |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AspectRatio | ETextureLayoutAspectRatio | TextureLayout.h | ||
| bAlignByFour | bool | TextureLayout.h | ||
| bPowerOfTwoSize | bool | TextureLayout.h | ||
| MinSizeX | uint32 | TextureLayout.h | ||
| MinSizeY | uint32 | TextureLayout.h | ||
| Nodes | TArray< FTextureLayoutNode, TInlineAllocator< 5 > > | TextureLayout.h | ||
| SizeX | uint32 | TextureLayout.h | ||
| SizeY | uint32 | TextureLayout.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AddElement
(
uint32& OutBaseX, |
Finds a free area in the texture large enough to contain a surface with the given size. | TextureLayout.h | |
uint32 GetSizeX() |
Returns the minimum texture width which will contain the allocated surfaces. | TextureLayout.h | |
uint32 GetSizeY() |
Returns the minimum texture height which will contain the allocated surfaces. | TextureLayout.h | |
bool RemoveElement
(
uint32 ElementBaseX, |
Removes a previously allocated element from the layout and collapses the tree as much as possible, In order to create the largest free block possible and return the tree to its state before the element was added. | TextureLayout.h |