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

HandMirroring Class

Static Fields

LeftHandSpace : readonly HandSpace
Signature
readonly HandSpace Oculus.Interaction.Input.HandMirroring.LeftHandSpace
RightHandSpace : readonly HandSpace
Signature
readonly HandSpace Oculus.Interaction.Input.HandMirroring.RightHandSpace

Static Methods

Mirror ( pose )
Transforms a Pose from the LeftHand space to the RightHand space in the current Skeleton.
Signature
static Pose Oculus.Interaction.Input.HandMirroring.Mirror(Pose pose)
Parameters
pose: Pose  The pose to transform
Returns
Pose  The transformed pose
Mirror ( position )
Transforms a position from the LeftHand space to the RightHand space in the current Skeleton.
Signature
static Vector3 Oculus.Interaction.Input.HandMirroring.Mirror(in Vector3 position)
Parameters
position: in Vector3  The position to transform
Returns
Vector3  The transformed position
Mirror ( rotation )
Transforms a rotation from the LeftHand space to the RightHand space in the current Skeleton.
Signature
static Quaternion Oculus.Interaction.Input.HandMirroring.Mirror(in Quaternion rotation)
Parameters
rotation: in Quaternion  The rotation to transform
Returns
Quaternion  The transformed rotation
Reflect ( rotation , normal )
Reflects a rotation in the plane defined by a vector while also changing its handedness in the current skeleton.
Useful for changing the handedness of a hand while keeping the exact same orientation so it aligns as expected.
Signature
static Quaternion Oculus.Interaction.Input.HandMirroring.Reflect(in Quaternion rotation, Vector3 normal)
Parameters
rotation: in Quaternion  The rotation to reflect
normal: Vector3  The vector that defines the reflection plane
Returns
Quaternion  The reflected rotation
TransformPose ( pose , fromHand , toHand )
Transforms a pose from one HandSpace to another.
Signature
static Pose Oculus.Interaction.Input.HandMirroring.TransformPose(in Pose pose, in HandSpace fromHand, in HandSpace toHand)
Parameters
pose: in Pose  The pose to transform
fromHand: in HandSpace  The original HandSpace of the pose
toHand: in HandSpace  The target HandSpace of the pose
Returns
Pose  The transformed pose
TransformPosition ( position , fromHand , toHand )
Transforms a position from one HandSpace to another.
Signature
static Vector3 Oculus.Interaction.Input.HandMirroring.TransformPosition(in Vector3 position, in HandSpace fromHand, in HandSpace toHand)
Parameters
position: in Vector3  The position to transform
fromHand: in HandSpace  The original HandSpace of the positionb
toHand: in HandSpace  The target HandSpace of the position
Returns
Vector3  The transformed position
TransformRotation ( rotation , fromHand , toHand )
Transforms a rotation from one HandSpace to another.
Signature
static Quaternion Oculus.Interaction.Input.HandMirroring.TransformRotation(in Quaternion rotation, in HandSpace fromHand, in HandSpace toHand)
Parameters
rotation: in Quaternion  The rotation to transform
fromHand: in HandSpace  The original HandSpace of the rotation
toHand: in HandSpace  The target HandSpace of the rotation
Returns
Quaternion  The transformed rotation

Inner Structs

HandSpace Struct

Defines the XYZ space of the hand using 3 well defined orthogonal directions.

Constructors

HandSpace ( distal , dorsal , thumbSide )
Signature
Oculus.Interaction.Input.HandMirroring.HandSpace.HandSpace(Vector3 distal, Vector3 dorsal, Vector3 thumbSide)
Parameters
distal: Vector3
dorsal: Vector3
thumbSide: Vector3

Fields

distal : readonly Vector3
The direction from the wrist towards the fingers.
Signature
readonly Vector3 Oculus.Interaction.Input.HandMirroring.HandSpace.distal
dorsal : readonly Vector3
The direction away from the back of the palm.
Signature
readonly Vector3 Oculus.Interaction.Input.HandMirroring.HandSpace.dorsal
rotation : readonly Quaternion
The precalculated rotation of the space.
Signature
readonly Quaternion Oculus.Interaction.Input.HandMirroring.HandSpace.rotation
thumbSide : readonly Vector3
The direction from the pinky to the thumb.
Signature
readonly Vector3 Oculus.Interaction.Input.HandMirroring.HandSpace.thumbSide

HandsSpace Struct

Defines a LeftHand and RightHand space and allows to quickly reference the correct one based on handedness.
This is an utility class to avoid repeating conditionals based on handedness.

Constructors

HandsSpace ( leftHand , rightHand )
Signature
Oculus.Interaction.Input.HandMirroring.HandsSpace.HandsSpace(HandSpace leftHand, HandSpace rightHand)
Parameters
leftHand: HandSpace
rightHand: HandSpace

Properties

this[Handedness handedness] : readonly HandSpace
[Get]
Signature
readonly HandSpace Oculus.Interaction.Input.HandMirroring.HandsSpace.this[Handedness handedness]