You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Add GeometryProcessingAdapters module to MeshModelingToolset, this is an Editor-only module that implements GeometryProcessingInterfaces APIs Add ApproximateActors implementation in GeometryProcessingAdapters that uses GeometryProcessing (FastWindingNumber / MeshMorphology / Simplify / UVGen / Tangents) and a new material-baking process based on render captures to generate a new StaticMesh Asset / Material / Textures that approximate the input Actor set. #rb none #rnx #jira none #preflight 608b25ced4026b0001cbe9c4 [CL 16162961 by Ryan Schmidt in ue5-main branch]
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "GeometryProcessingAdaptersModule.h"
|
|
#include "Features/IModularFeatures.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "FGeometryProcessingAdaptersModule"
|
|
|
|
using namespace UE::Geometry;
|
|
|
|
void FGeometryProcessingAdaptersModule::StartupModule()
|
|
{
|
|
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
|
|
|
|
ApproximateActors = MakeShared<FApproximateActorsImpl>();
|
|
if (ApproximateActors.IsValid())
|
|
{
|
|
IModularFeatures::Get().RegisterModularFeature(IGeometryProcessing_ApproximateActors::GetModularFeatureName(), ApproximateActors.Get());
|
|
}
|
|
|
|
}
|
|
|
|
void FGeometryProcessingAdaptersModule::ShutdownModule()
|
|
{
|
|
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
|
|
// we call this function before unloading the module.
|
|
|
|
if ( ApproximateActors.IsValid() )
|
|
{
|
|
IModularFeatures::Get().UnregisterModularFeature(IGeometryProcessing_ApproximateActors::GetModularFeatureName(), ApproximateActors.Get());
|
|
ApproximateActors = nullptr;
|
|
}
|
|
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
|
|
IMPLEMENT_MODULE(FGeometryProcessingAdaptersModule, GeometryProcessingAdapters)
|