C# Class LMWidgets.LeapPhysicsBase

Base class for physics. Handles state changes between Interacting and Reflecting.
Inheritance: UnityEngine.MonoBehaviour
Exibir arquivo Open project: leapmotion/ImageGrid

Protected Properties

Property Type Description
m_pivot Vector3
m_target UnityEngine.GameObject
m_targetPivot Vector3

Protected Methods

Method Description
ApplyConstraints ( ) : void
ApplyInteractions ( ) : void
ApplyPhysics ( ) : void
Awake ( ) : void
FixedUpdate ( ) : void
OnTriggerEnter ( Collider collider ) : void

Change the state of the physics to "Interacting" if no other hands were interacting and if the collider is a hand

OnTriggerExit ( Collider collider ) : void

Change the state of the physics to "Reflecting" if the object exiting is the hand

ResetPivots ( ) : void

Resets the pivots

onInteractionDisabled ( ) : void

Called when widget becomes non-interactable.

Implement this function to handle changes to the widget when interaction is disabled (ie. starting a disable animation)

onInteractionEnabled ( ) : void

Called when widget becomes interactable.

Implement this function to handle changes to the widget when interaction is enabled (ie. starting an enable animation)

Private Methods

Method Description
IsHand ( Collider collider ) : bool

Returns true or false by checking if "HandModel" exits in the parent of the collider

Method Details

ApplyConstraints() protected abstract method

protected abstract ApplyConstraints ( ) : void
return void

ApplyInteractions() protected abstract method

protected abstract ApplyInteractions ( ) : void
return void

ApplyPhysics() protected abstract method

protected abstract ApplyPhysics ( ) : void
return void

Awake() protected method

protected Awake ( ) : void
return void

FixedUpdate() protected method

protected FixedUpdate ( ) : void
return void

OnTriggerEnter() protected method

Change the state of the physics to "Interacting" if no other hands were interacting and if the collider is a hand
protected OnTriggerEnter ( Collider collider ) : void
collider UnityEngine.Collider
return void

OnTriggerExit() protected method

Change the state of the physics to "Reflecting" if the object exiting is the hand
protected OnTriggerExit ( Collider collider ) : void
collider UnityEngine.Collider
return void

ResetPivots() protected method

Resets the pivots
protected ResetPivots ( ) : void
return void

onInteractionDisabled() protected method

Called when widget becomes non-interactable.
Implement this function to handle changes to the widget when interaction is disabled (ie. starting a disable animation)
protected onInteractionDisabled ( ) : void
return void

onInteractionEnabled() protected method

Called when widget becomes interactable.
Implement this function to handle changes to the widget when interaction is enabled (ie. starting an enable animation)
protected onInteractionEnabled ( ) : void
return void

Property Details

m_pivot protected_oe property

protected Vector3 m_pivot
return Vector3

m_target protected_oe property

protected GameObject,UnityEngine m_target
return UnityEngine.GameObject

m_targetPivot protected_oe property

protected Vector3 m_targetPivot
return Vector3