2019-12-27 09:26:59 -05:00
|
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-06-10 12:22:13 -04:00
|
|
|
|
|
|
|
|
|
|
#include "LiveLinkWindowsMixedRealityHandTrackingSourceFactory.h"
|
|
|
|
|
|
#include "IWindowsMixedRealityHandTrackingPlugin.h"
|
|
|
|
|
|
#include "WindowsMixedRealityHandTracking.h"
|
|
|
|
|
|
|
2019-06-19 08:55:23 -04:00
|
|
|
|
#include "Features/IModularFeatures.h"
|
|
|
|
|
|
#include "ILiveLinkClient.h"
|
|
|
|
|
|
|
2019-06-10 12:22:13 -04:00
|
|
|
|
#define LOCTEXT_NAMESPACE "WindowsMixedRealityHandTracking"
|
|
|
|
|
|
|
|
|
|
|
|
FText ULiveLinkWindowsMixedRealityHandTrackingSourceFactory::GetSourceDisplayName() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return LOCTEXT("HandTrackingLiveLinkSourceName", "Windows Mixed Reality Hand Tracking Source");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FText ULiveLinkWindowsMixedRealityHandTrackingSourceFactory::GetSourceTooltip() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return LOCTEXT("HandTrackingLiveLinkSourceTooltip", "Windows Mixed Reality Hand Tracking Key Points Source");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-06-19 08:55:23 -04:00
|
|
|
|
ULiveLinkWindowsMixedRealityHandTrackingSourceFactory::EMenuType ULiveLinkWindowsMixedRealityHandTrackingSourceFactory::GetMenuType() const
|
2019-06-10 12:22:13 -04:00
|
|
|
|
{
|
2019-06-19 08:55:23 -04:00
|
|
|
|
if (IModularFeatures::Get().IsModularFeatureAvailable(ILiveLinkClient::ModularFeatureName))
|
2019-06-10 12:22:13 -04:00
|
|
|
|
{
|
2019-06-19 08:55:23 -04:00
|
|
|
|
ILiveLinkClient& LiveLinkClient = IModularFeatures::Get().GetModularFeature<ILiveLinkClient>(ILiveLinkClient::ModularFeatureName);
|
|
|
|
|
|
|
|
|
|
|
|
if (!IWindowsMixedRealityHandTrackingModule::Get().IsLiveLinkSourceValid() || !LiveLinkClient.HasSourceBeenAdded(IWindowsMixedRealityHandTrackingModule::Get().GetLiveLinkSource()))
|
|
|
|
|
|
{
|
|
|
|
|
|
return EMenuType::MenuEntry;
|
|
|
|
|
|
}
|
2019-06-10 12:22:13 -04:00
|
|
|
|
}
|
2019-06-19 08:55:23 -04:00
|
|
|
|
return EMenuType::Disabled;
|
2019-06-10 12:22:13 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-06-19 08:55:23 -04:00
|
|
|
|
TSharedPtr<ILiveLinkSource> ULiveLinkWindowsMixedRealityHandTrackingSourceFactory::CreateSource(const FString& ConnectionString) const
|
2019-06-10 12:22:13 -04:00
|
|
|
|
{
|
2019-06-19 08:55:23 -04:00
|
|
|
|
return IWindowsMixedRealityHandTrackingModule::Get().GetLiveLinkSource();
|
2019-06-10 12:22:13 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|