FAllocator2D

Windows
MacOS
Linux

References

Module

MeshUtilitiesCommon

Header

/Engine/Source/Runtime/MeshUtilitiesCommon/Public/Allocator2D.h

Include

#include "Allocator2D.h"

Syntax

class FAllocator2D

Variables

Name Description

Protected variable

TArray< uint64 ...

 

Bits

Protected variable

TArray< FRun >

 

Columns

Protected variable

const uint32

 

Height

Protected variable

const ELightmap...

 

LayoutVersion

Protected variable

const EMode

 

Mode

Enforce that those cannot be changed in flight.

Protected variable

const uint32

 

Pitch

Protected variable

uint32

 

RasterHeight

Protected variable

uint32

 

RasterWidth

Protected variable

TArray< FRun >

 

Rows

Protected variable

TArray< uint16 ...

 

SortedColumnsIndex

Index inside columns that will be sorted by columns with longest used segment first.

Protected variable

TArray< uint16 ...

 

SortedRowsIndex

Index inside rows that will be sorted by rows with longest used segment first.

Protected variable

const uint32

 

Width

Constructors

Name Description

Public function

FAllocator2D

(
    EMode Mode,
    uint32 Width,
    uint32 Height,
    ELightmapUVVersion LayoutVersion
)

Functions

Name Description

Protected function

void

 

AddUsedSegment

(
    FRun& Run,
    uint32 StartPos,
    uint32 Length
)

Public function

void

 

Alloc

(
    FRect Rect,
    const FAllocator2D& Other
)

Public function

void

 

Alloc

(
    FRect Rect
)

Public function

void

 

Clear()

Must clear before using.

Public function

void

 

ClearBit

(
    uint32 x,
    uint32 y
)

Public function

void

 

CopyRuns

(
    TArray< FRun >& Runs,
    const TArray< FRun >& OtherRuns,
    int32 MaxSize
)

Public function

void

 

CreateUsedSegments()

Public function

bool

 

Find

(
    FRect& Rect
)

Public function

bool

 

FindBitByBit

(
    FRect& Rect,
    const FAllocator2D& Other
)

Public function Const

bool

 

FindWithSegments

(
    FRect& Rect,
    const FAllocator2D& Other,
    TFunctionRef< bool...
)

Public function

void

 

FlipX

(
    const FRect& Rect
)

Public function

void

 

FlipY

(
    const FRect& Rect
)

Public function Const

uint64

 

GetBit

(
    uint32 x,
    uint32 y
)

Returns non-zero if set.

Public function Const

uint32

 

GetRasterHeight()

Public function Const

FMD5Hash

 

GetRasterMD5()

Get the MD5 hash of the rasterized content.

Public function Const

uint32

 

GetRasterWidth()

Public function Const

uint32

 

GetUsedTexels()

Protected function

void

 

InitRuns

(
    TArray< FRun >& Runs,
    uint32 PrimaryResolution,
    uint32 PerpendicularRasterSize
)

Protected function

void

 

InitSegments()

Public function

void

 

MergeRun

(
    FRun& Run,
    const FRun& OtherRun,
    uint32 RectOffset,
    uint32 RectLength,
    uint32 PrimaryResolution,
    uint32 PerpendicularResolution
)

Public function

void

 

MergeSegments

(
    const FRect& Rect,
    const FAllocator2D& Other
)

Public function

void

 

PublishStats

(
    int32 ChartIndex,
    int32 Orientation,
    bool bFound,
    const FRect& Rect,
    const FRect& BestRect,
    const FMD5Hash& ChartMD5,
    TFunctionRef< bool...
)

Public function

void

 

ResetStats()

Public function

void

 

SetBit

(
    uint32 x,
    uint32 y
)

Public function

bool

 

Test

(
    FRect Rect
)

Public function

bool

 

Test

(
    FRect Rect,
    const FAllocator2D& Other
)

Protected function Const

bool

 

TestAllColumns

(
    const FRect& Rect,
    const FAllocator2D& Other,
    uint32& FailedLength
)

Protected function Const

bool

 

TestAllRows

(
    const FRect& Rect,
    const FAllocator2D& Other,
    uint32& FailedLength
)

Protected function Const

bool

 

TestOneRun

(
    const FRun& Run,
    const FRun& OtherRun,
    uint32 RectOffset,
    uint32 RectLength,
    uint32 PrimaryResolution,
    uint32& OutFailedLength
)

Public function Const

FString

 

ToString()

Allow to visualize the content in ascii for debugging purpose. (i.e Watch or Immediate window).

Operators

Name Description

Public function

FAllocator2D...

 

operator=

(
    const FAllocator2D& Other
)

Take control of the copy to reduce the amount of data movement to the strict minimum.

Classes

Name

Description

Public struct

FRect

Public struct

FRun

Public struct

FSegment

Enums

Name

Description

Public enum

EMode

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