engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
IMotionController类 参考abstract

Motion Controller device interface 更多...

#include <IMotionController.h>

+ 类 IMotionController 继承关系图:

Public 成员函数

virtual void EnumerateSources (TArray< FMotionControllerSource > &SourcesOut) const =0
 Called to request the motion sources that this IMotionController provides 更多...
 
virtual bool GetControllerOrientationAndPosition (const int32 ControllerIndex, const FName MotionSource, FRotator &OutOrientation, FVector &OutPosition, float WorldToMetersScale) const =0
 Returns the calibration-space orientation of the requested controller's hand. 更多...
 
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, float WorldToMetersScale) const =0
 Returns the calibration-space orientation of the requested controller's hand at the specified time for potentially improved temporal precision, particularly fetching the controller transform when a button was pressed on a platform that provides sub-frame timing for button presses. 更多...
 
virtual ETrackingStatus GetControllerTrackingStatus (const int32 ControllerIndex, const FName MotionSource) const =0
 Returns the tracking status (e.g. 更多...
 
virtual float GetCustomParameterValue (const FName MotionSource, FName ParameterName, bool &bOutValueFound) const =0
 Returns a custom names parameter value 更多...
 
virtual FName GetMotionControllerDeviceTypeName () const =0
 Returns the device type of the controller. 更多...
 

详细描述

Motion Controller device interface

NOTE: This intentionally does NOT derive from IInputDeviceModule, to allow a clean separation for devices which exclusively track motion with no tactile input NOTE: You must MANUALLY call IModularFeatures::Get().RegisterModularFeature( GetModularFeatureName(), this ) in your implementation! This allows motion controllers to be both piggy-backed off HMD devices which support them, as well as standing alone.

成员函数说明

◆ EnumerateSources()

virtual void IMotionController::EnumerateSources ( TArray< FMotionControllerSource > &  SourcesOut) const
pure virtual

Called to request the motion sources that this IMotionController provides

参数
SourcesA motion source enumerator object that IMotionControllers can add source names to

在 FXRMotionControllerBase 内被实现.

◆ GetControllerOrientationAndPosition()

virtual bool IMotionController::GetControllerOrientationAndPosition ( const int32  ControllerIndex,
const FName  MotionSource,
FRotator &  OutOrientation,
FVector &  OutPosition,
float  WorldToMetersScale 
) const
pure virtual

Returns the calibration-space orientation of the requested controller's hand.

参数
ControllerIndexThe Unreal controller (player) index of the controller set
MotionSourceWhich source, within the motion controller to get the orientation and position for
OutOrientation(out) If tracked, the orientation (in calibrated-space) of the controller in the specified hand
OutPosition(out) If tracked, the position (in calibrated-space) of the controller in the specified hand
WorldToMetersScaleThe world scaling factor.
返回
True if the device requested is valid and tracked, false otherwise

在 FXRMotionControllerBase 内被实现.

◆ GetControllerOrientationAndPositionForTime()

virtual bool IMotionController::GetControllerOrientationAndPositionForTime ( const int32  ControllerIndex,
const FName  MotionSource,
FTimespan  Time,
bool &  OutTimeWasUsed,
FRotator &  OutOrientation,
FVector &  OutPosition,
bool &  OutbProvidedLinearVelocity,
FVector &  OutLinearVelocity,
bool &  OutbProvidedAngularVelocity,
FVector &  OutAngularVelocityRadPerSec,
float  WorldToMetersScale 
) const
pure virtual

Returns the calibration-space orientation of the requested controller's hand at the specified time for potentially improved temporal precision, particularly fetching the controller transform when a button was pressed on a platform that provides sub-frame timing for button presses.

This is only intended to work with times very near the current frame. In general it should be called immediatly after receiving the button press. On many platforms this functionality is not supported and this function will set OutTimeWasUsed to false and then call GetControllerOrientationAndPosition, ignoring Time.

参数
ControllerIndexThe Unreal controller (player) index of the controller set
MotionSourceWhich source, within the motion controller to get the orientation and position for
TimeThe time at which we would like to query the orientation.
OutTimeWasUsed(out) If true the time was used somehow to give a more temporally relevant orientation. If false the time was ignored and a cached value returned.
OutOrientation(out) If tracked, the orientation (in calibrated-space) of the controller in the specified hand
OutPosition(out) If tracked, the position (in calibrated-space) of the controller in the specified hand
OutbProvidedLinearVelocity(out) True if linear velocity was provided.
OutLinearVelocity(out) The Linear velocity of the controller.
OutbProvidedAngularVelocity(out) True if angular velocity was provided.
OutAngularVelocityRadPerSec(out) The angular velocity of the controller in Radians per Second.
WorldToMetersScaleThe world scaling factor.
返回
True if the device requested is valid and tracked, false otherwise

在 FXRMotionControllerBase 内被实现.

◆ GetControllerTrackingStatus()

virtual ETrackingStatus IMotionController::GetControllerTrackingStatus ( const int32  ControllerIndex,
const FName  MotionSource 
) const
pure virtual

Returns the tracking status (e.g.

not tracked, intertial-only, fully tracked) of the specified controller

返回
Tracking status of the specified controller, or ETrackingStatus::NotTracked if the device is not found

在 FXRMotionControllerBase 内被实现.

◆ GetCustomParameterValue()

virtual float IMotionController::GetCustomParameterValue ( const FName  MotionSource,
FName  ParameterName,
bool &  bOutValueFound 
) const
pure virtual

Returns a custom names parameter value

参数
MotionSourceThe name of the motion source we want parameters for
ParameterNameThe specific value we are looking for
bOutValueFound(out) Whether the parameter could be found
返回
The value of the parameter

在 FXRMotionControllerBase 内被实现.

◆ GetMotionControllerDeviceTypeName()

virtual FName IMotionController::GetMotionControllerDeviceTypeName ( ) const
pure virtual

Returns the device type of the controller.

返回
Device type of the controller.

该类的文档由以下文件生成: