Tanoda
Leap.Unity.Interaction.SlidingWindowThrow Class Reference

The sliding window throw handler implements a simple heuristic that provides a reasonably accurate measure of the user's intended "throw direction" for a physical object. It is used as the default implementation of an Interaction Behaviour's throw handler. More...

Inheritance diagram for Leap.Unity.Interaction.SlidingWindowThrow:
Leap.Unity.Interaction.IThrowHandler

Public Member Functions

void OnHold (InteractionBehaviour intObj, ReadonlyList< InteractionController > controllers)
 Samples the current velocity and adds it to a rolling average. More...
 
void OnThrow (InteractionBehaviour intObj, InteractionController throwingController)
 Transfers the averaged velocity to the released object. More...
 
void OnHold (InteractionBehaviour intObj, ReadonlyList< InteractionController > controllers)
 Called every FixedUpdate frame while an interaction object is being held. More...
 
void OnThrow (InteractionBehaviour intObj, InteractionController controller)
 Called when an Interaction object is released by the last interaction controller holding it. More...
 

Detailed Description

The sliding window throw handler implements a simple heuristic that provides a reasonably accurate measure of the user's intended "throw direction" for a physical object. It is used as the default implementation of an Interaction Behaviour's throw handler.

Definition at line 21 of file SlidingWindowThrow.cs.

Member Function Documentation

◆ OnHold()

void Leap.Unity.Interaction.SlidingWindowThrow.OnHold ( InteractionBehaviour  intObj,
ReadonlyList< InteractionController controllers 
)

Samples the current velocity and adds it to a rolling average.

Implements Leap.Unity.Interaction.IThrowHandler.

Definition at line 66 of file SlidingWindowThrow.cs.

◆ OnThrow()

void Leap.Unity.Interaction.SlidingWindowThrow.OnThrow ( InteractionBehaviour  intObj,
InteractionController  throwingController 
)

Transfers the averaged velocity to the released object.

Implements Leap.Unity.Interaction.IThrowHandler.

Definition at line 91 of file SlidingWindowThrow.cs.


The documentation for this class was generated from the following file: