UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::FUVSpaceAllocator Class Reference

#include <UVSpaceAllocator.h>

Classes

struct  FRect
 
struct  FRun
 
struct  FSegment
 

Public Types

enum class  EMode { FreeSegments , UsedSegments }
 

Public Member Functions

 FUVSpaceAllocator (EMode Mode, uint32 Width, uint32 Height)
 
void Clear ()
 
bool Find (FRect &Rect)
 
bool Test (FRect Rect)
 
void Alloc (FRect Rect)
 
bool FindBitByBit (FRect &Rect, const FUVSpaceAllocator &Other)
 
bool FindWithSegments (FRect &Rect, const FUVSpaceAllocator &Other, TFunctionRef< bool(const FUVSpaceAllocator::FRect &)> IsBestRect) const
 
bool Test (FRect Rect, const FUVSpaceAllocator &Other)
 
void Alloc (FRect Rect, const FUVSpaceAllocator &Other)
 
uint64 GetBit (uint32 x, uint32 y) const
 
void SetBit (uint32 x, uint32 y)
 
void ClearBit (uint32 x, uint32 y)
 
void CreateUsedSegments ()
 
void MergeRun (FRun &Run, const FRun &OtherRun, uint32 RectOffset, uint32 RectLength, uint32 PrimaryResolution, uint32 PerpendicularResolution)
 
void MergeSegments (const FRect &Rect, const FUVSpaceAllocator &Other)
 
void FlipX (const FRect &Rect)
 
void FlipY (const FRect &Rect)
 
uint32 GetUsedTexels () const
 
void CopyRuns (TArray< FRun > &Runs, const TArray< FRun > &OtherRuns, int32 MaxSize)
 
FUVSpaceAllocatoroperator= (const FUVSpaceAllocator &Other)
 
FString ToString () const
 
FMD5Hash GetRasterMD5 () const
 
uint32 GetRasterWidth () const
 
uint32 GetRasterHeight () const
 

Protected Member Functions

bool TestOneRun (const FRun &Run, const FRun &OtherRun, uint32 RectOffset, uint32 RectLength, uint32 PrimaryResolution, uint32 &OutFailedLength) const
 
bool TestAllRows (const FRect &Rect, const FUVSpaceAllocator &Other, uint32 &FailedLength) const
 
bool TestAllColumns (const FRect &Rect, const FUVSpaceAllocator &Other, uint32 &FailedLength) const
 
void InitRuns (TArray< FRun > &Runs, uint32 PrimaryResolution, uint32 PerpendicularRasterSize)
 
void InitSegments ()
 
void AddUsedSegment (FRun &Run, uint32 StartPos, uint32 Length)
 

Protected Attributes

const EMode Mode
 
const uint32 Width
 
const uint32 Height
 
const uint32 Pitch
 
uint32 RasterWidth
 
uint32 RasterHeight
 
TArray< FRunRows
 
TArray< FRunColumns
 
TArray< uint64Bits
 
TArray< uint16SortedRowsIndex
 
TArray< uint16SortedColumnsIndex
 

Member Enumeration Documentation

◆ EMode

Enumerator
FreeSegments 
UsedSegments 

Constructor & Destructor Documentation

◆ FUVSpaceAllocator()

FUVSpaceAllocator::FUVSpaceAllocator ( FUVSpaceAllocator::EMode  InMode,
uint32  Width,
uint32  Height 
)

Member Function Documentation

◆ AddUsedSegment()

void FUVSpaceAllocator::AddUsedSegment ( FRun Run,
uint32  StartPos,
uint32  Length 
)
protected

◆ Alloc() [1/2]

void FUVSpaceAllocator::Alloc ( FRect  Rect)

◆ Alloc() [2/2]

void FUVSpaceAllocator::Alloc ( FRect  Rect,
const FUVSpaceAllocator Other 
)

◆ Clear()

void FUVSpaceAllocator::Clear ( )

◆ ClearBit()

FORCEINLINE void UE::Geometry::FUVSpaceAllocator::ClearBit ( uint32  x,
uint32  y 
)

◆ CopyRuns()

void FUVSpaceAllocator::CopyRuns ( TArray< FRun > &  Runs,
const TArray< FRun > &  OtherRuns,
int32  MaxSize 
)

◆ CreateUsedSegments()

void FUVSpaceAllocator::CreateUsedSegments ( )

◆ Find()

bool FUVSpaceAllocator::Find ( FRect Rect)

◆ FindBitByBit()

bool FUVSpaceAllocator::FindBitByBit ( FRect Rect,
const FUVSpaceAllocator Other 
)

◆ FindWithSegments()

bool FUVSpaceAllocator::FindWithSegments ( FRect Rect,
const FUVSpaceAllocator Other,
TFunctionRef< bool(const FUVSpaceAllocator::FRect &)>  IsBestRect 
) const

◆ FlipX()

void FUVSpaceAllocator::FlipX ( const FRect Rect)

◆ FlipY()

void FUVSpaceAllocator::FlipY ( const FRect Rect)

◆ GetBit()

FORCEINLINE uint64 UE::Geometry::FUVSpaceAllocator::GetBit ( uint32  x,
uint32  y 
) const

◆ GetRasterHeight()

uint32 UE::Geometry::FUVSpaceAllocator::GetRasterHeight ( ) const
inline

◆ GetRasterMD5()

FMD5Hash FUVSpaceAllocator::GetRasterMD5 ( ) const

◆ GetRasterWidth()

uint32 UE::Geometry::FUVSpaceAllocator::GetRasterWidth ( ) const
inline

◆ GetUsedTexels()

uint32 FUVSpaceAllocator::GetUsedTexels ( ) const

◆ InitRuns()

void FUVSpaceAllocator::InitRuns ( TArray< FRun > &  Runs,
uint32  PrimaryResolution,
uint32  PerpendicularRasterSize 
)
protected

◆ InitSegments()

void FUVSpaceAllocator::InitSegments ( )
protected

◆ MergeRun()

void FUVSpaceAllocator::MergeRun ( FRun Run,
const FRun OtherRun,
uint32  RectOffset,
uint32  RectLength,
uint32  PrimaryResolution,
uint32  PerpendicularResolution 
)

◆ MergeSegments()

void FUVSpaceAllocator::MergeSegments ( const FRect Rect,
const FUVSpaceAllocator Other 
)

◆ operator=()

FUVSpaceAllocator & FUVSpaceAllocator::operator= ( const FUVSpaceAllocator Other)

◆ SetBit()

FORCEINLINE void UE::Geometry::FUVSpaceAllocator::SetBit ( uint32  x,
uint32  y 
)

◆ Test() [1/2]

bool UE::Geometry::FUVSpaceAllocator::Test ( FRect  Rect)
inline

◆ Test() [2/2]

bool UE::Geometry::FUVSpaceAllocator::Test ( FRect  Rect,
const FUVSpaceAllocator Other 
)
inline

◆ TestAllColumns()

bool FUVSpaceAllocator::TestAllColumns ( const FRect Rect,
const FUVSpaceAllocator Other,
uint32 FailedLength 
) const
protected

◆ TestAllRows()

bool FUVSpaceAllocator::TestAllRows ( const FRect Rect,
const FUVSpaceAllocator Other,
uint32 FailedLength 
) const
protected

◆ TestOneRun()

bool FUVSpaceAllocator::TestOneRun ( const FRun Run,
const FRun OtherRun,
uint32  RectOffset,
uint32  RectLength,
uint32  PrimaryResolution,
uint32 OutFailedLength 
) const
protected

◆ ToString()

FString FUVSpaceAllocator::ToString ( ) const

Member Data Documentation

◆ Bits

TArray< uint64 > UE::Geometry::FUVSpaceAllocator::Bits
protected

◆ Columns

TArray< FRun > UE::Geometry::FUVSpaceAllocator::Columns
protected

◆ Height

const uint32 UE::Geometry::FUVSpaceAllocator::Height
protected

◆ Mode

const EMode UE::Geometry::FUVSpaceAllocator::Mode
protected

◆ Pitch

const uint32 UE::Geometry::FUVSpaceAllocator::Pitch
protected

◆ RasterHeight

uint32 UE::Geometry::FUVSpaceAllocator::RasterHeight
protected

◆ RasterWidth

uint32 UE::Geometry::FUVSpaceAllocator::RasterWidth
protected

◆ Rows

TArray< FRun > UE::Geometry::FUVSpaceAllocator::Rows
protected

◆ SortedColumnsIndex

TArray< uint16 > UE::Geometry::FUVSpaceAllocator::SortedColumnsIndex
protected

◆ SortedRowsIndex

TArray< uint16 > UE::Geometry::FUVSpaceAllocator::SortedRowsIndex
protected

◆ Width

const uint32 UE::Geometry::FUVSpaceAllocator::Width
protected

The documentation for this class was generated from the following files: