114 FTextureLayoutNode3d& Node = Nodes[NodeIndex];
157 && !IsNodeUsed(Nodes[ParentNodeIndex].ChildA)
158 && !IsNodeUsed(Nodes[ParentNodeIndex].ChildB))
161 ParentNodeIndex = FindParentNode(ParentNodeIndex);
189 for (
int32 NodeIndex = 0; NodeIndex < Nodes.Num(); NodeIndex++)
191 const FTextureLayoutNode3d& Node = Nodes[NodeIndex];
195 UpdateSize(Node.MinX + Node.SizeX, Node.MinY + Node.SizeY, Node.MinZ + Node.SizeZ);
222 return Nodes[0].SizeX;
227 return Nodes[0].SizeY;
232 return Nodes[0].SizeZ;
237 struct FTextureLayoutNode3d
267 uint16 SizeX, SizeY, SizeZ;
287 bool bPowerOfTwoSize;
359 const FTextureLayoutNode3d CurrentNode = Nodes[NodeIndex];
472 SizeX = FMath::Max<uint32>(SizeX, FMath::RoundUpToPowerOfTwo(
ElementMaxX));
473 SizeY = FMath::Max<uint32>(SizeY, FMath::RoundUpToPowerOfTwo(
ElementMaxY));
474 SizeZ = FMath::Max<uint32>(SizeZ, FMath::RoundUpToPowerOfTwo(
ElementMaxZ));
487 return Nodes[SearchNodeIndex].Parent;
491 bool IsNodeUsed(
int32 NodeIndex)
497 bChildrenUsed = IsNodeUsed(Nodes[NodeIndex].ChildA) || IsNodeUsed(Nodes[NodeIndex].ChildB);
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define check(expr)
Definition AssertionMacros.h:314
@ INDEX_NONE
Definition CoreMiscDefines.h:150
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FInt32Vector3 FIntVector
Definition MathFwd.h:115
Definition TextureLayout3d.h:16
FTextureLayout3d(uint32 InMinSizeX, uint32 InMinSizeY, uint32 InMinSizeZ, uint32 MaxSizeX, uint32 MaxSizeY, uint32 MaxSizeZ, bool bInPowerOfTwoSize=false, bool bInAlignByFour=true, bool bInAllowShrink=true)
Definition TextureLayout3d.h:27
bool RemoveElement(uint32 ElementBaseX, uint32 ElementBaseY, uint32 ElementBaseZ, uint32 ElementSizeX, uint32 ElementSizeY, uint32 ElementSizeZ)
Definition TextureLayout3d.h:136
uint32 GetSizeX() const
Definition TextureLayout3d.h:209
uint32 GetSizeY() const
Definition TextureLayout3d.h:214
uint32 GetMaxSizeY() const
Definition TextureLayout3d.h:225
FIntVector GetSize() const
Definition TextureLayout3d.h:218
uint32 GetMaxSizeX() const
Definition TextureLayout3d.h:220
uint32 GetMaxSizeZ() const
Definition TextureLayout3d.h:230
bool AddElement(uint32 &OutBaseX, uint32 &OutBaseY, uint32 &OutBaseZ, uint32 ElementSizeX, uint32 ElementSizeY, uint32 ElementSizeZ)
Definition TextureLayout3d.h:54
uint32 GetSizeZ() const
Definition TextureLayout3d.h:216
UE_FORCEINLINE_HINT SizeType AddUninitialized()
Definition Array.h:1664
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_FORCEINLINE_HINT void RemoveAtSwap(SizeType Index, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2185
UE_FORCEINLINE_HINT SizeType Emplace(ArgsType &&... Args)
Definition Array.h:2561
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
ElementType Pop(EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:1196
Definition UnrealString.h.inl:34
UE_STRING_CLASS Result(Forward< LhsType >(Lhs), RhsLen)
Definition String.cpp.inl:732
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71