RANSACVelocity
(
samplesCount
, samplesDeadZone
, minHighConfidenceSamples
)
|
Signature
Oculus.Interaction.Throw.RANSACVelocity.RANSACVelocity(int samplesCount=10, int samplesDeadZone=2, int minHighConfidenceSamples=2) Parameters samplesCount: intsamplesDeadZone: intminHighConfidenceSamples: int |
RANSACVelocity
(
samplesCount
, samplesDeadZone
)
|
Creates a new RANSACVelocity for estimating velocity.
Signature
Oculus.Interaction.Throw.RANSACVelocity.RANSACVelocity(int samplesCount=10, int samplesDeadZone=2) Parameters samplesCount: int
The size of the rolling sample buffer from which to seek consensus.
samplesDeadZone: int
The number of most recent samples to exclude from the consensus.
|
MaxSyntheticSpeed
: float
[Get][Set] |
Maximum speed (in m/s) allowed for synthetic poses.
This is used in internal calculations and should generally not need to be tuned.
Synthetic poses are generated and used by RANSACVelocity to fill tracking gaps (when Input.IHand.IsHighConfidence for a tracked hand is false, for example). Capping the allowed speed mitigates the risk of generating nonsensical synthetic poses.
Signature
float Oculus.Interaction.Throw.RANSACVelocity.MaxSyntheticSpeed |
GetSortedTimePoses
(
idx1
, idx2
, older
, younger
)
|
Signature
void Oculus.Interaction.Throw.RANSACVelocity.GetSortedTimePoses(int idx1, int idx2, out TimedPose older, out TimedPose younger) Parameters idx1: intidx2: intolder: out TimedPoseyounger: out TimedPoseReturns void |
PositionOffset
(
youngerPose
, olderPose
)
|
Signature
virtual Vector3 Oculus.Interaction.Throw.RANSACVelocity.PositionOffset(Pose youngerPose, Pose olderPose) Parameters youngerPose: PoseolderPose: PoseReturns Vector3 |
GetVelocities
(
velocity
, torque
)
|
Estimates the current translational and rotational velocities based on the available data.
If there is insufficient data to produce an estimate, returns 0 trivial velocities.
Signature
void Oculus.Interaction.Throw.RANSACVelocity.GetVelocities(out Vector3 velocity, out Vector3 torque) Parameters velocity: out Vector3
Output parameter for translational velocity.
torque: out Vector3
Output parameter for rotational velocity.
Returns void |
Initialize
()
|
Initializes a RANSACVelocity calculator, clearing its state and preparing it to receive new data.
Can be called repeatedly to reset the state of an existing RANSACVelocity.
Signature
void Oculus.Interaction.Throw.RANSACVelocity.Initialize() Returns void |
Process
(
pose
, time
, isHighConfidence
)
|
Consumes a new frame of Pose data for example, from the IGrabbable.Transform of a grabbed GrabInteractable.
The RANSACVelocity instance must be regularly supplied with such data so that velocities can be estimated when needed.
Signature
void Oculus.Interaction.Throw.RANSACVelocity.Process(Pose pose, float time, bool isHighConfidence=true) Parameters pose: Pose
The Pose observed.
time: float
The time at which pose was observed.
isHighConfidence: bool
Whether or not pose was observed with high confidence. For example, if pose is from an IGrabbable.Transform being held by an Input.IHand for which Input.IHand.IsHighConfidence is false, then pose might also be considered to be known with low confidence.
Returns void |
GetTorque
(
older
, younger
)
|
Signature
static Vector3 Oculus.Interaction.Throw.RANSACVelocity.GetTorque(TimedPose older, TimedPose younger) Parameters older: TimedPoseyounger: TimedPoseReturns Vector3 |
TimedPose
(
time
, pose
)
|
Signature
Oculus.Interaction.Throw.RANSACVelocity.TimedPose.TimedPose(float time, Pose pose) Parameters time: floatpose: Pose |
pose
: Pose |
Signature
Pose Oculus.Interaction.Throw.RANSACVelocity.TimedPose.pose |
time
: float |
Signature
float Oculus.Interaction.Throw.RANSACVelocity.TimedPose.time |