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.

Public Statics

static readonly GrabPoseScore Max[Get]

Member Functions

GrabPoseScore
( float translationScore,
float rotationScore,
PoseMeasureParameters measureParameters )
Creates a GrabPoseScore with the given values.
Parameters
translationScore
The translational score
rotationScore
The rotational score
measureParameters
Paremeters indicating how to compare scores
GrabPoseScore
( Vector3 fromPoint,
Vector3 toPoint,
bool isInside )
Calculates and creates a purely positional score.
This score has a rotational weight of 0.
Parameters
fromPoint
Desired point of measure
toPoint
Ideal point of measure
isInside
If true, the translation is stored as a negative scalar
GrabPoseScore
( in Pose poseA,
in Pose poseB,
in Pose offset,
PoseMeasureParameters measureParameters )
Calculates and creates a score from a desired pose to a reference pose.
Parameters
poseA
The desired root pose
poseB
The reference root pose
offset
Offset from the poses for scoring
measureParameters
Paremeters indicating how to compare scores
bool IsValid ( )
bool IsBetterThan
( GrabPoseScore referenceScore )
Calculates if the GrabPoseScore is better than other GrabPoseScore by comparing the Translational and Rotational scores based on their weights.
Parameters
referenceScore
The score to compare against
Returns
True of this score is better than the provided one, false otherwise

Static Member Functions

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