API reference
API reference
Select your platform
No SDKs available
No versions available

HandRef Class

Extends MonoBehaviour
HandRef is a utility component that delegates all of its IHand implementation to the provided Hand object.
HandRef can be thought of as a "redirect," which is useful for making Unity Component configurations flexible with limited setup. For example, if making a prefab containing multiple hand-referencing components which should be usable with either hand, it is more convenient to have a single HandRef at the root of the prefab (to which all the other Components connect) and connect only that to the desired hand versus having to connect every Component individually for every instance of the prefab.

Fields

Active : bool
Implements IActiveState.Active, in this case indicating whether the underlying Hand is connected.
This is a remapping method which makes the IsConnected value available to consumers treating the HandRef as an IActiveState.
Signature
bool Oculus.Interaction.Input.HandRef.Active
CurrentDataVersion : int
Retrieves the IHand.CurrentDataVersion value of the underlying Hand.
This is a pure shim property equivalent to accessing the same property on the Hand.
Signature
int Oculus.Interaction.Input.HandRef.CurrentDataVersion
Handedness : Handedness
Retrieves the IHand.Handedness of the underlying Hand.
This is a pure shim property equivalent to accessing the same property on the Hand.
Signature
Handedness Oculus.Interaction.Input.HandRef.Handedness
IsConnected : bool
Retrieves the IHand.IsConnected value of the underlying Hand.
This is a pure shim property equivalent to accessing the same property on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.IsConnected
IsDominantHand : bool
Retrieves the IHand.IsDominantHand value of the underlying Hand.
This is a pure shim property equivalent to accessing the same property on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.IsDominantHand
IsHighConfidence : bool
Retrieves the IHand.IsHighConfidence value of the underlying Hand.
This is a pure shim property equivalent to accessing the same property on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.IsHighConfidence
IsPointerPoseValid : bool
Retrieves the IHand.IsPointerPoseValid value of the underlying Hand.
This is a pure shim property equivalent to accessing the same property on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.IsPointerPoseValid
IsTrackedDataValid : bool
Retrieves the IHand.IsTrackedDataValid value of the underlying Hand.
This is a pure shim property equivalent to accessing the same property on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.IsTrackedDataValid
Scale : float
Retrieves the IHand.Scale value of the underlying Hand.
This is a pure shim property equivalent to accessing the same property on the Hand.
Signature
float Oculus.Interaction.Input.HandRef.Scale

Properties

Hand : IHand
[Get]
The underlying IHand to which this HandRef is a shim.
All IHand methods invoked on this HandRef will be passed along to this instance.
Signature
IHand Oculus.Interaction.Input.HandRef.Hand
WhenHandUpdated : Action
Retrieves the IHand.WhenHandUpdated event of the underlying Hand.
This is a pure shim property equivalent to accessing the same property on the Hand.
Signature
Action Oculus.Interaction.Input.HandRef.WhenHandUpdated

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.Input.HandRef.Awake()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.Input.HandRef.Start()
Returns
void

Methods

GetFingerIsHighConfidence ( finger )
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetFingerIsHighConfidence(HandFinger finger)
Parameters
finger: HandFinger
Returns
bool
GetFingerIsPinching ( finger )
Invokes IHand.GetFingerIsPinching(HandFinger) on the underlying Hand.
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetFingerIsPinching(HandFinger finger)
Parameters
finger: HandFinger
Returns
bool
GetFingerPinchStrength ( finger )
Invokes IHand.GetFingerPinchStrength(HandFinger) on the underlying Hand.
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
float Oculus.Interaction.Input.HandRef.GetFingerPinchStrength(HandFinger finger)
Parameters
finger: HandFinger
Returns
float
GetIndexFingerIsPinching ()
Invokes IHand.GetIndexFingerIsPinching() on the underlying Hand.
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetIndexFingerIsPinching()
Returns
bool
GetJointPose ( handJointId , pose )
Invokes IHand.GetJointPose(HandJointId, out Pose) on the underlying Hand.
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetJointPose(HandJointId handJointId, out Pose pose)
Parameters
handJointId: HandJointId
pose: out Pose
Returns
bool
GetJointPoseFromWrist ( handJointId , pose )
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetJointPoseFromWrist(HandJointId handJointId, out Pose pose)
Parameters
handJointId: HandJointId
pose: out Pose
Returns
bool
GetJointPoseLocal ( handJointId , pose )
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetJointPoseLocal(HandJointId handJointId, out Pose pose)
Parameters
handJointId: HandJointId
pose: out Pose
Returns
bool
GetJointPosesFromWrist ( jointPosesFromWrist )
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetJointPosesFromWrist(out ReadOnlyHandJointPoses jointPosesFromWrist)
Parameters
jointPosesFromWrist: out ReadOnlyHandJointPoses
Returns
bool
GetJointPosesLocal ( jointPosesLocal )
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetJointPosesLocal(out ReadOnlyHandJointPoses jointPosesLocal)
Parameters
jointPosesLocal: out ReadOnlyHandJointPoses
Returns
bool
GetPalmPoseLocal ( pose )
Invokes IHand.GetPalmPoseLocal(out Pose) on the underlying Hand.
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetPalmPoseLocal(out Pose pose)
Parameters
pose: out Pose
Returns
bool
GetPointerPose ( pose )
Invokes IHand.GetPointerPose(out Pose) on the underlying Hand.
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetPointerPose(out Pose pose)
Parameters
pose: out Pose
Returns
bool
GetRootPose ( pose )
Invokes IHand.GetRootPose(out Pose) on the underlying Hand.
This is a pure shim method equivalent to invoking the same method on the Hand.
Signature
bool Oculus.Interaction.Input.HandRef.GetRootPose(out Pose pose)
Parameters
pose: out Pose
Returns
bool
InjectAllHandRef ( hand )
Sets all required dependencies for a dynamically instantiated HandRef.
This is a convenience method wrapping InjectHand(IHand). This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Input.HandRef.InjectAllHandRef(IHand hand)
Parameters
hand: IHand
Returns
void
InjectHand ( hand )
Sets the an IHand as the Hand for a dynamically instantiated HandRef.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Input.HandRef.InjectHand(IHand hand)
Parameters
hand: IHand
Returns
void