You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
-Adds support for getting velocity and accelleration through GetControllerTransformForTime. -Adds mechanism for using openxr chain structs which are defined in and consumed by an extension plugin. -Support for defining a swapchain and renderbridge in an extension plugin. -Some OpenXR fixes related to runtimes not supplying tracking data of various types. Basically if the data isn't being provided we should not copy it out because it might be full of nonsense. Also we would generally rather preserve our last cached position than overwrite with zero/identity. -Moving OpenXRPlatformRHI.h OpenXRHMD_RenderBridge.h and _Swapchain.h back to private folder. -Previously one could not run the same haptic effect on two devices simultaneously and have it behave correctly because most of the per-effect-play data for each effect was shared by all controllers. This refactors so that the necessary runtime data is per controller and the constant bulk data is shared by all controllers. -Adding infrastructure for playing haptics on a VR HMD. -Refactored haptic data resampling into the oculus plugin because that is plugin specific. swarm reviews review-18220544 and review-18220542 #rb Robert.Srinivasiah, Jules.Blok, Steve.Smith #ROBOMERGE-AUTHOR: jeff.fisher #ROBOMERGE-SOURCE: CL 18271123 in //UE5/Release-5.0/... via CL 18271142 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18271147 by jeff fisher in ue5-release-engine-test branch]
37 lines
2.2 KiB
C++
37 lines
2.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "IMotionController.h"
|
|
|
|
enum class EControllerHand : uint8;
|
|
|
|
/**
|
|
* Base utility class for implementations of the IMotionController interface
|
|
*/
|
|
class HEADMOUNTEDDISPLAY_API FXRMotionControllerBase : public IMotionController
|
|
{
|
|
public:
|
|
virtual ~FXRMotionControllerBase() {};
|
|
|
|
// Begin IMotionController interface
|
|
virtual bool GetControllerOrientationAndPosition(const int32 ControllerIndex, const FName MotionSource, FRotator& OutOrientation, FVector& OutPosition, float WorldToMetersScale) const;
|
|
virtual bool GetControllerOrientationAndPositionForTime(const int32 ControllerIndex, const FName MotionSource, FTimespan Time, bool& OutTimeWasUsed, FRotator& OutOrientation, FVector& OutPosition, bool& OutbProvidedLinearVelocity, FVector& OutLinearVelocity, bool& OutbProvidedAngularVelocity, FVector& OutAngularVelocityRadPerSec, bool& OutbProvidedLinearAcceleration, FVector& OutLinearAcceleration, float WorldToMetersScale) const;
|
|
virtual ETrackingStatus GetControllerTrackingStatus(const int32 ControllerIndex, const FName MotionSource) const;
|
|
virtual void EnumerateSources(TArray<FMotionControllerSource>& SourcesOut) const;
|
|
virtual float GetCustomParameterValue(const FName MotionSource, FName ParameterName, bool& bValueFound) const { bValueFound = false; return 0.f; }
|
|
virtual bool GetHandJointPosition(const FName MotionSource, int jointIndex, FVector& OutPosition) const override { return false; }
|
|
// End IMotionController interface
|
|
|
|
// explicit source names
|
|
static FName LeftHandSourceId;
|
|
static FName RightHandSourceId;
|
|
static FName HMDSourceId;
|
|
|
|
static bool GetHandEnumForSourceName(const FName Source, EControllerHand& OutHand);
|
|
|
|
// Original GetControllerOrientationAndPosition signature for backwards compatibility
|
|
virtual bool GetControllerOrientationAndPosition(const int32 ControllerIndex, const EControllerHand DeviceHand, FRotator& OutOrientation, FVector& OutPosition, float WorldToMetersScale) const = 0;
|
|
// Original GetControllerTrackingStatus signature for backwards compatibility
|
|
virtual ETrackingStatus GetControllerTrackingStatus(const int32 ControllerIndex, const EControllerHand DeviceHand) const = 0;
|
|
}; |