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

PoseUtils Class

Tools for working with Unity Poses.

Overview

Static Public Member Functions

static void
SetPose
( this Transform transform,
in Pose pose,
Space space )
Assigns a Pose to a given transform.
static Pose
GetPose
( this Transform transform,
Space space )
Extract the position/rotation of a given transform.
static void
Multiply
( in Pose a,
in Pose b,
ref Pose result )
Compose two poses, applying the first to the second one.
static Pose
Multiply
( in Pose a,
in Pose b )
static void
Premultiply
( this ref Pose a,
in Pose b )
Compose two poses, applying the provided one on top of the caller.
static void
Postmultiply
( this ref Pose a,
in Pose b )
Compose two poses, applying the caller on top of the provided pose.
static void
Lerp
( this ref Pose from,
in Pose to,
float t )
Moves the calling pose towards a target one using interpolation.
static void
Lerp
( in Pose from,
in Pose to,
float t,
ref Pose result )
Interpolation between two poses.
static void
Inverse
( in Pose a,
ref Pose result )
static void
Invert
( this ref Pose a )
static void
CopyFrom
( this ref Pose to,
in Pose from )
static Pose
Delta
( this Transform from,
Transform to )
Get the position/rotation difference between two transforms.
static Pose
Delta
( this Transform from,
in Pose to )
Get the position/rotation difference between a transform and a pose.
static void
Delta
( this Transform from,
in Pose to,
ref Pose result )
Get the position/rotation difference between a transform and a pose.
static Pose
Delta
( in Pose from,
in Pose to )
Get the position/rotation difference between two poses.
static Pose
DeltaScaled
( Transform from,
Transform to )
Get the position/rotation difference between two transforms.
static Pose
DeltaScaled
( Transform from,
Pose to )
Get the position/rotation difference between a transform and a pose.
static Pose
GlobalPose
( this Transform reference,
in Pose offset )
Get the world position/rotation of a relative position.
static Pose
GlobalPoseScaled
( Transform relativeTo,
Pose offset )
Get the world position/rotation of a relative position.
static Pose
MirrorPoseRotation
( this in Pose pose,
Vector3 normal,
Vector3 tangent )
Rotate a pose around an axis.

Details

Static Member Functions

static void Oculus.Interaction.PoseUtils.SetPose
( this Transform transform,
in Pose pose,
Space space )
Assigns a Pose to a given transform.
Parameters
transform
The transform to which apply the pose.
pose
The desired pose.
space
If the pose should be applied to the local position/rotation or world position/rotation.
static Pose Oculus.Interaction.PoseUtils.GetPose
( this Transform transform,
Space space )
Extract the position/rotation of a given transform.
Parameters
transform
The transform from which to extract the pose.
space
If the desired position/rotation is the world or local one.
Returns
A Pose containing the position/rotation of the transform.
static void Oculus.Interaction.PoseUtils.Multiply
( in Pose a,
in Pose b,
ref Pose result )
Compose two poses, applying the first to the second one.
Parameters
a
First pose to compose.
b
Pose to compose over the first one.
result
A Pose with the two operands applied.
static Pose Oculus.Interaction.PoseUtils.Multiply
( in Pose a,
in Pose b )
No description available.
static void Oculus.Interaction.PoseUtils.Premultiply
( this ref Pose a,
in Pose b )
Compose two poses, applying the provided one on top of the caller.
Parameters
a
Pose to compose upon.
b
Pose to compose over the first one.
static void Oculus.Interaction.PoseUtils.Postmultiply
( this ref Pose a,
in Pose b )
Compose two poses, applying the caller on top of the provided pose.
Parameters
a
Pose to compose upon.
b
Pose to compose over the first one.
static void Oculus.Interaction.PoseUtils.Lerp
( this ref Pose from,
in Pose to,
float t )
Moves the calling pose towards a target one using interpolation.
Parameters
from
Original pose to interpolate from
to
Target pose for the interpolation.
t
Interpolation factor, normalized but will not be clamped.
static void Oculus.Interaction.PoseUtils.Lerp
( in Pose from,
in Pose to,
float t,
ref Pose result )
Interpolation between two poses.
Parameters
from
From pose.
to
To pose.
t
Interpolation factor, normalized but will not be clamped.
result
A Pose between a and b
static void Oculus.Interaction.PoseUtils.Inverse
( in Pose a,
ref Pose result )
No description available.
static void Oculus.Interaction.PoseUtils.Invert
( this ref Pose a )
No description available.
static void Oculus.Interaction.PoseUtils.CopyFrom
( this ref Pose to,
in Pose from )
No description available.
static Pose Oculus.Interaction.PoseUtils.Delta
( this Transform from,
Transform to )
Get the position/rotation difference between two transforms.
Unaffected by scale.
Parameters
from
The base transform.
to
The target transform.
Returns
A Pose indicating the position/rotation change
static Pose Oculus.Interaction.PoseUtils.Delta
( this Transform from,
in Pose to )
Get the position/rotation difference between a transform and a pose.
Unaffected by scale.
Parameters
from
The base transform.
to
The target pose.
Returns
A Pose indicating the delta.
static void Oculus.Interaction.PoseUtils.Delta
( this Transform from,
in Pose to,
ref Pose result )
Get the position/rotation difference between a transform and a pose.
Unaffected by scale.
Parameters
from
The base transform.
to
The target pose.
result
Output: The pose with the delta
static Pose Oculus.Interaction.PoseUtils.Delta
( in Pose from,
in Pose to )
Get the position/rotation difference between two poses.
Unaffected by scale.
Parameters
from
The base pose.
to
The target pose.
Returns
A Pose indicating the delta.
static Pose Oculus.Interaction.PoseUtils.DeltaScaled
( Transform from,
Transform to )
Get the position/rotation difference between two transforms.
Affected by the scale of from.
Parameters
from
The base transform.
to
The target transform.
Returns
Output: The pose with the delta
static Pose Oculus.Interaction.PoseUtils.DeltaScaled
( Transform from,
Pose to )
Get the position/rotation difference between a transform and a pose.
Affected by the scale of from.
Parameters
from
The base transform.
to
The target pose.
Returns
The pose with the delta
static Pose Oculus.Interaction.PoseUtils.GlobalPose
( this Transform reference,
in Pose offset )
Get the world position/rotation of a relative position.
Unaffected by scale.
Parameters
reference
The transform in which the offset is local.
offset
The offset from the reference.
Returns
A Pose in world units.
static Pose Oculus.Interaction.PoseUtils.GlobalPoseScaled
( Transform relativeTo,
Pose offset )
Get the world position/rotation of a relative position.
Affected by the scale of the transform.
Parameters
relativeTo
The transform in which the offset is local.
offset
The offset from the reference.
Returns
A Pose in world units.
static Pose Oculus.Interaction.PoseUtils.MirrorPoseRotation
( this in Pose pose,
Vector3 normal,
Vector3 tangent )
Rotate a pose around an axis.
Parameters
pose
The pose to mirror.
normal
The direction of the mirror.
tangent
The tangent of the mirror.
Returns
A mirrored pose.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon