FTextureLayout3d

An incremental texture space allocator.

Windows
MacOS
Linux

Syntax

class FTextureLayout3d

Remarks

An incremental texture space allocator. For best results, add the elements ordered descending in size.

Constructors

Name Description

Public function

FTextureLayout3d

(
    uint32 MinSizeX,
    uint32 MinSizeY,
    uint32 MinSizeZ,
    uint32 MaxSizeX,
    uint32 MaxSizeY,
    uint32 MaxSizeZ,
    bool bInPowerOfTwoSize,
    bool bInAlignByFour
)

Minimal initialization constructor.

Functions

Name Description

Public function

bool

 

AddElement

(
    uint32& OutBaseX,
    uint32& OutBaseY,
    uint32& OutBaseZ,
    uint32 ElementSizeX,
    uint32 ElementSizeY,
    uint32 ElementSizeZ
)

Finds a free area in the texture large enough to contain a surface with the given size.

Public function Const

uint32

 

GetMaxSizeX()

Public function Const

uint32

 

GetMaxSizeY()

Public function Const

uint32

 

GetMaxSizeZ()

Public function Const

FIntVector

 

GetSize()

Public function Const

uint32

 

GetSizeX()

Returns the minimum texture width which will contain the allocated surfaces.

Public function Const

uint32

 

GetSizeY()

Returns the minimum texture height which will contain the allocated surfaces.

Public function Const

uint32

 

GetSizeZ()

Public function

bool

 

RemoveElement

(
    uint32 ElementBaseX,
    uint32 ElementBaseY,
    uint32 ElementBaseZ,
    uint32 ElementSizeX,
    uint32 ElementSizeY,
    uint32 ElementSizeZ
)

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.

References

Module

Engine

Header

Runtime/Engine/Public/TextureLayout3d.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback