You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
PR #8767: Deprecate WMR (Contributed by fieldsJacksonG) #preflight 18625839 #rb jeff.fisher #jira UE-138625 #ROBOMERGE-AUTHOR: steve.smith #ROBOMERGE-SOURCE: CL 18668535 in //UE5/Release-5.0/... via CL 18668690 via CL 18668769 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v901-18665521) [CL 18668796 by fieldsJacksonG in ue5-main branch]
33 lines
1.3 KiB
C++
33 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "WindowsMixedRealityHandTrackingFunctionLibrary.h"
|
|
#include "IWindowsMixedRealityHandTrackingPlugin.h"
|
|
#include "WindowsMixedRealityHandTracking.h"
|
|
|
|
bool UDEPRECATED_WindowsMixedRealityHandTrackingFunctionLibrary::GetHandJointTransform(EControllerHand Hand, EWMRHandKeypoint Keypoint, FTransform& OutTransform, float& OutRadius)
|
|
{
|
|
TSharedPtr<FWindowsMixedRealityHandTracking> HandTracking = StaticCastSharedPtr<FWindowsMixedRealityHandTracking>(IWindowsMixedRealityHandTrackingModule::Get().GetInputDevice());
|
|
|
|
//UE_LOG(LogWindowsMixedRealityHandTracking, Display, TEXT("CNNTEMP GetGestureKeypointTransform 0"));
|
|
if (HandTracking.IsValid() && HandTracking->IsHandTrackingStateValid())
|
|
{
|
|
FTransform KeyPointTransform;
|
|
const bool bSuccess = HandTracking->GetKeypointTransform(Hand, Keypoint, KeyPointTransform);
|
|
//UE_LOG(LogWindowsMixedRealityHandTracking, Display, TEXT("CNNTEMP GetGestureKeypointTransform hand %d joint %d (%d)"), (uint32)Hand, (uint32)Keypoint, bSuccess);
|
|
|
|
if (bSuccess)
|
|
{
|
|
OutTransform = KeyPointTransform;
|
|
HandTracking->GetKeypointRadius(Hand, Keypoint, OutRadius);
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
bool UDEPRECATED_WindowsMixedRealityHandTrackingFunctionLibrary::SupportsHandTracking()
|
|
{
|
|
return WindowsMixedReality::FWindowsMixedRealityStatics::SupportsHandTracking();
|
|
}
|