// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "DynamicMesh/DynamicMesh3.h" #include "DynamicMesh/DynamicMeshAttributeSet.h" #define UE_API DYNAMICMESH_API namespace UE { namespace Geometry { struct FUVOverlayView; class FMeshConnectedComponents; /** * FDynamicMeshUDIMClassifier is a utility class for identifying active UDIMs from a FDynamicMesh's UV overlay */ class FDynamicMeshUDIMClassifier { public: UE_API explicit FDynamicMeshUDIMClassifier(const FDynamicMeshUVOverlay* UVOverlay, TOptional> Selection = TOptional>()); UE_API TArray ActiveTiles() const; UE_API TArray TidsForTile(FVector2i TileIndexIn) const; static UE_API FVector2i ClassifyTrianglesToUDIM(const FDynamicMeshUVOverlay* UVOverlay, TArray Tids); static UE_API FVector2i ClassifyBoundingBoxToUDIM(const FDynamicMeshUVOverlay* UVOverlay, const FAxisAlignedBox2d& BoundingBox); static UE_API FVector2i ClassifyPointToUDIM(const FVector2f& UVPoint); protected: UE_API void ClassifyUDIMs(); /** The UV Overlay to analyze for UDIMs */ const FDynamicMeshUVOverlay* UVOverlay = nullptr; TOptional> Selection; TMap > UDIMs; }; } } #undef UE_API