You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb rinat.abdrashitov #preflight 634ed9bfac7f102b31e5cb58 [CL 22704078 by nathan mitchell in ue5-main branch]
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "DynamicMesh/DynamicMesh3.h"
|
|
#include "DynamicMesh/DynamicMeshAttributeSet.h"
|
|
|
|
|
|
namespace UE
|
|
{
|
|
namespace Geometry
|
|
{
|
|
|
|
struct FUVOverlayView;
|
|
class FMeshConnectedComponents;
|
|
|
|
/**
|
|
* FDynamicMeshUDIMClassifier is a utility class for identifying active UDIMs from a FDynamicMesh's UV overlay
|
|
*/
|
|
class DYNAMICMESH_API FDynamicMeshUDIMClassifier
|
|
{
|
|
public:
|
|
explicit FDynamicMeshUDIMClassifier(const FDynamicMeshUVOverlay* UVOverlay, TOptional<TArray<int32>> Selection = TOptional<TArray<int32>>());
|
|
|
|
TArray<FVector2i> ActiveTiles() const;
|
|
TArray<int32> TidsForTile(FVector2i TileIndexIn) const;
|
|
|
|
static FVector2i ClassifyTrianglesToUDIM(const FDynamicMeshUVOverlay* UVOverlay, TArray<int32> Tids);
|
|
static FVector2i ClassifyBoundingBoxToUDIM(const FDynamicMeshUVOverlay* UVOverlay, const FAxisAlignedBox2d& BoundingBox);
|
|
static FVector2i ClassifyPointToUDIM(const FVector2f& UVPoint);
|
|
|
|
protected:
|
|
|
|
void ClassifyUDIMs();
|
|
|
|
/** The UV Overlay to analyze for UDIMs */
|
|
const FDynamicMeshUVOverlay* UVOverlay = nullptr;
|
|
|
|
TOptional<TArray<int32>> Selection;
|
|
|
|
TMap<FVector2i, TArray<int32> > UDIMs;
|
|
};
|
|
}
|
|
} |