Files
UnrealEngineUWP/Engine/Source/Runtime/MRMesh/Public/BaseMeshReconstructorModule.h
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

63 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleInterface.h"
#include "Features/IModularFeatures.h"
#include "Features/IModularFeature.h"
class IMRMesh;
class FBaseMeshReconstructorModule : public IModuleInterface, public IModularFeature
{
public:
//
// MODULAR FEATURE SUPPORT
//
/**
* Part of the pattern for supporting modular features.
*
* @return the name of the feature.
*/
static FName GetModularFeatureName()
{
static const FName ModularFeatureName = FName(TEXT("MeshReconstructor"));
return ModularFeatureName;
}
/**
* Singleton-like access to a MeshReconstructorModule.
*
* @return Returns reference to the highest priority MeshReconstructorModule module
*/
static inline FBaseMeshReconstructorModule& Get()
{
//@todo implement priority for choosing the most appropriate implementation
TArray<FBaseMeshReconstructorModule*> MeshReconstructors = IModularFeatures::Get().GetModularFeatureImplementations<FBaseMeshReconstructorModule>(GetModularFeatureName());
check(MeshReconstructors.Num() > 0);
return *MeshReconstructors[0];
}
/**
* Check to see that there is a MeshReconstructor module available.
*
* @return True if there exists a MeshReconstructor module registered.
*/
static inline bool IsAvailable()
{
return IModularFeatures::Get().IsModularFeatureAvailable(GetModularFeatureName());
}
/**
* Register module as a MeshReconstructor on startup.
*/
virtual void StartupModule() override
{
IModularFeatures::Get().RegisterModularFeature(GetModularFeatureName(), this);
}
};