Tanoda
|
A basic utility class to aid in creating pinch based actions. Once linked with a HandModelBase, it can be used to detect pinch gestures that the hand makes. More...
Public Attributes | |
float | ActivateDistance = .03f |
float | DeactivateDistance = .04f |
![]() | |
bool | ControlsTransform = true |
bool | ShowGizmos = true |
![]() | |
UnityEvent | OnActivate |
UnityEvent | OnDeactivate |
Protected Member Functions | |
virtual void | OnValidate () |
override void | ensureUpToDate () |
![]() | |
abstract void | ensureUpToDate () |
virtual void | Awake () |
virtual void | Update () |
virtual void | changeState (bool shouldBeActive) |
Protected Attributes | |
bool | _isPinching = false |
float | _lastPinchTime = 0.0f |
float | _lastUnpinchTime = 0.0f |
Vector3 | _pinchPos |
Quaternion | _pinchRotation |
![]() | |
HandModelBase | _handModel |
int | _lastUpdateFrame = -1 |
bool | _didChange = false |
Vector3 | _position |
Quaternion | _rotation |
Vector3 | _direction = Vector3.forward |
Vector3 | _normal = Vector3.up |
float | _distance |
float | _lastHoldTime = 0.0f |
float | _lastReleaseTime = 0.0f |
Vector3 | _lastPosition = Vector3.zero |
Quaternion | _lastRotation = Quaternion.identity |
Vector3 | _lastDirection = Vector3.forward |
Vector3 | _lastNormal = Vector3.up |
float | _lastDistance = 1.0f |
![]() | |
Color | OnColor = Color.green |
Color | OffColor = Color.red |
Color | LimitColor = Color.blue |
Color | DirectionColor = Color.white |
Color | NormalColor = Color.gray |
Static Protected Attributes | |
const float | MM_TO_M = 0.001f |
Properties | |
bool | IsPinching [get] |
bool | DidStartPinch [get] |
bool | DidEndPinch [get] |
![]() | |
HandModelBase | HandModel [get, set] |
virtual bool | IsHolding [get] |
Returns whether or not the dectector is currently detecting a pinch or grab. More... | |
virtual bool | DidChangeFromLastFrame [get] |
Returns whether or not the value of IsPinching is different than the value reported during the previous frame. More... | |
virtual bool | DidStartHold [get] |
Returns whether or not the value of IsHolding changed to true between this frame and the previous. More... | |
virtual bool | DidRelease [get] |
Returns whether or not the value of IsHolding changed to false between this frame and the previous. More... | |
float | LastHoldTime [get] |
Returns the value of Time.time during the most recent pinch event. More... | |
float | LastReleaseTime [get] |
Returns the value of Time.time during the most recent unpinch event. More... | |
Vector3 | Position [get] |
Returns the position value of the detected pinch or grab. If a pinch or grab is not currently being detected, returns the most recent position value. More... | |
Vector3 | LastActivePosition [get] |
Quaternion | Rotation [get] |
Returns the rotation value of the detected pinch or grab. If a pinch or grab is not currently being detected, returns the most recent rotation value. More... | |
Quaternion | LastActiveRotation [get] |
Vector3 | Direction [get] |
Vector3 | LastActiveDirection [get] |
Vector3 | Normal [get] |
Vector3 | LastActiveNormal [get] |
float | Distance [get] |
float | LastActiveDistance [get] |
![]() | |
bool | IsActive [get] |
Additional Inherited Members | |
![]() | |
virtual void | Activate () |
virtual void | Deactivate () |
A basic utility class to aid in creating pinch based actions. Once linked with a HandModelBase, it can be used to detect pinch gestures that the hand makes.
Definition at line 19 of file PinchDetector.cs.
|
protectedvirtual |
Implementations must implement this method.
Implements Leap.Unity.AbstractHoldDetector.
Definition at line 62 of file PinchDetector.cs.
|
protectedvirtual |
Definition at line 46 of file PinchDetector.cs.
|
protected |
Definition at line 38 of file PinchDetector.cs.
|
protected |
Definition at line 40 of file PinchDetector.cs.
|
protected |
Definition at line 41 of file PinchDetector.cs.
|
protected |
Definition at line 43 of file PinchDetector.cs.
|
protected |
Definition at line 44 of file PinchDetector.cs.
float Leap.Unity.PinchDetector.ActivateDistance = .03f |
Definition at line 27 of file PinchDetector.cs.
float Leap.Unity.PinchDetector.DeactivateDistance = .04f |
Definition at line 32 of file PinchDetector.cs.
|
staticprotected |
Definition at line 20 of file PinchDetector.cs.
|
get |
Definition at line 36 of file PinchDetector.cs.
|
get |
Definition at line 35 of file PinchDetector.cs.
|
get |
Definition at line 34 of file PinchDetector.cs.