UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
OverlappingCorners.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Array.h"
6#include "Containers/Set.h"
7#include "CoreMinimal.h"
8#include "LayoutUV.h"
11
16{
18
21
22 /* Resets, pre-allocates memory, marks all indices as not overlapping in preperation for calls to Add() */
23 MESHUTILITIESCOMMON_API void Init(int32 NumIndices);
24
25 /* Add overlapping indices pair */
27
28 /* Sorts arrays, converts sets to arrays for sorting and to allow simple iterating code, prevents additional adding */
30
31 /* Estimate memory allocated */
33
38 {
39 check(bFinishedAdding);
40 int32 ContainerIndex = IndexBelongsTo[Key];
41 return (ContainerIndex != INDEX_NONE) ? Arrays[ContainerIndex] : EmptyArray;
42 }
43
44private:
45 TArray<int32> IndexBelongsTo;
46 TArray< TArray<int32> > Arrays;
48 TArray<int32> EmptyArray;
49 bool bFinishedAdding = false;
50};
#define check(expr)
Definition AssertionMacros.h:314
@ INDEX_NONE
Definition CoreMiscDefines.h:150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
void Init()
Definition LockFreeList.h:4
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Array.h:670
Definition LayoutUV.h:52
Definition OverlappingCorners.h:16
const TArray< int32 > & FindIfOverlapping(int32 Key) const
Definition OverlappingCorners.h:37
FOverlappingCorners()
Definition OverlappingCorners.h:17
MESHUTILITIESCOMMON_API void FinishAdding()
Definition OverlappingCorners.cpp:131
MESHUTILITIESCOMMON_API uint32 GetAllocatedSize(void) const
Definition OverlappingCorners.cpp:158