API reference

GrabPoseScore Struct

Stores the score of a grab.
Score is measured on distance from the desired grab point to an ideal pose. Grab points might prefer to weight more the translational or the rotational distance, for that end 2 scalars and a weight are saved and then compared against other scores to decide which one is higher.

Constructors

GrabPoseScore ( translationScore , rotationScore , measureParameters )
Creates a GrabPoseScore with the given values.
Signature
Oculus.Interaction.Grab.GrabPoseScore.GrabPoseScore(float translationScore, float rotationScore, PoseMeasureParameters measureParameters)
Parameters
translationScore: float  The translational score
rotationScore: float  The rotational score
measureParameters: PoseMeasureParameters  Paremeters indicating how to compare scores
GrabPoseScore ( fromPoint , toPoint , isInside )
Calculates and creates a purely positional score.
This score has a rotational weight of 0.
Signature
Oculus.Interaction.Grab.GrabPoseScore.GrabPoseScore(Vector3 fromPoint, Vector3 toPoint, bool isInside=false)
Parameters
fromPoint: Vector3  Desired point of measure
toPoint: Vector3  Ideal point of measure
isInside: bool  If true, the translation is stored as a negative scalar
GrabPoseScore ( poseA , poseB , offset , measureParameters )
Calculates and creates a score from a desired pose to a reference pose.
Signature
Oculus.Interaction.Grab.GrabPoseScore.GrabPoseScore(in Pose poseA, in Pose poseB, in Pose offset, PoseMeasureParameters measureParameters)
Parameters
poseA: in Pose  The desired root pose
poseB: in Pose  The reference root pose
offset: in Pose  Offset from the poses for scoring
measureParameters: PoseMeasureParameters  Paremeters indicating how to compare scores

Static Fields

Max : readonly GrabPoseScore
Signature
readonly GrabPoseScore Oculus.Interaction.Grab.GrabPoseScore.Max

Methods

IsBetterThan ( referenceScore )
Calculates if the GrabPoseScore is better than other GrabPoseScore by comparing the Translational and Rotational scores based on their weights.
Signature
bool Oculus.Interaction.Grab.GrabPoseScore.IsBetterThan(GrabPoseScore referenceScore)
Parameters
referenceScore: GrabPoseScore  The score to compare against
Returns
bool  True of this score is better than the provided one, false otherwise
IsValid ()
Signature
bool Oculus.Interaction.Grab.GrabPoseScore.IsValid()
Returns
bool

Static Methods

Lerp ( from , to , t )
Linearly interpolate two scores by individually interpolating its components.
Signature
static GrabPoseScore Oculus.Interaction.Grab.GrabPoseScore.Lerp(in GrabPoseScore from, in GrabPoseScore to, float t)
Parameters
from: in GrabPoseScore  Originb score
to: in GrabPoseScore  Target score
t: float  Interpolation factor