FTextureLayout3d::AddElement

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

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/TextureLayout3d.h

Include

#include "TextureLayout3d.h"

Syntax

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

Remarks

Finds a free area in the texture large enough to contain a surface with the given size. If a large enough area is found, it is marked as in use, the output parameters OutBaseX and OutBaseY are set to the coordinates of the upper left corner of the free area and the function return true. Otherwise, the function returns false and OutBaseX and OutBaseY remain uninitialized.

Returns

True if succeeded, false otherwise.

Parameters

Parameter

Description

OutBaseX

If the function succeeds, contains the X coordinate of the upper left corner of the free area on return.

OutBaseY

If the function succeeds, contains the Y coordinate of the upper left corner of the free area on return.

ElementSizeX

The size of the surface to allocate in horizontal pixels.

ElementSizeY

The size of the surface to allocate in vertical pixels.

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