Tanoda
|
Public Attributes | |
bool | ControlsTransform = true |
bool | ShowGizmos = true |
![]() | |
UnityEvent | OnActivate |
UnityEvent | OnDeactivate |
Protected Member Functions | |
abstract void | ensureUpToDate () |
virtual void | Awake () |
virtual void | Update () |
virtual void | changeState (bool shouldBeActive) |
Protected Attributes | |
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 |
Properties | |
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 base class for implementing detectors that detect a holding pose of a hand.
Such detectors might use the PinchStrength, PinchDistance, GrabStrength, or GrabAngle properties of the Hand or might use a more complex heuristic.
Definition at line 20 of file AbstractHoldDetector.cs.
|
protectedvirtual |
Definition at line 62 of file AbstractHoldDetector.cs.
|
protectedvirtual |
Definition at line 174 of file AbstractHoldDetector.cs.
|
protectedpure virtual |
Implementations must implement this method.
Implemented in Leap.Unity.PinchDetector.
|
protectedvirtual |
Definition at line 75 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 45 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 49 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 51 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 26 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 57 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 59 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 53 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 58 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 55 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 54 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 56 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 43 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 50 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 47 of file AbstractHoldDetector.cs.
|
protected |
Definition at line 48 of file AbstractHoldDetector.cs.
bool Leap.Unity.AbstractHoldDetector.ControlsTransform = true |
Whether the Transform of the object containing this Detector script is transformed by the Position and Rotation of the hand when IsHolding is true.
If false, the Transform is not affected.
Definition at line 36 of file AbstractHoldDetector.cs.
bool Leap.Unity.AbstractHoldDetector.ShowGizmos = true |
Whether to draw the detector's Gizmos for debugging. (Not every detector provides gizmos.)
Definition at line 41 of file AbstractHoldDetector.cs.
|
get |
Returns whether or not the value of IsPinching is different than the value reported during the previous frame.
Definition at line 96 of file AbstractHoldDetector.cs.
|
get |
Returns whether or not the value of IsHolding changed to false between this frame and the previous.
Definition at line 116 of file AbstractHoldDetector.cs.
|
get |
Returns whether or not the value of IsHolding changed to true between this frame and the previous.
Definition at line 106 of file AbstractHoldDetector.cs.
|
get |
Definition at line 166 of file AbstractHoldDetector.cs.
|
get |
Definition at line 170 of file AbstractHoldDetector.cs.
|
getset |
Definition at line 27 of file AbstractHoldDetector.cs.
|
get |
Returns whether or not the dectector is currently detecting a pinch or grab.
Definition at line 85 of file AbstractHoldDetector.cs.
|
get |
Definition at line 167 of file AbstractHoldDetector.cs.
|
get |
Definition at line 171 of file AbstractHoldDetector.cs.
|
get |
Definition at line 169 of file AbstractHoldDetector.cs.
|
get |
Definition at line 153 of file AbstractHoldDetector.cs.
|
get |
Definition at line 164 of file AbstractHoldDetector.cs.
|
get |
Returns the value of Time.time during the most recent pinch event.
Definition at line 126 of file AbstractHoldDetector.cs.
|
get |
Returns the value of Time.time during the most recent unpinch event.
Definition at line 136 of file AbstractHoldDetector.cs.
|
get |
Definition at line 168 of file AbstractHoldDetector.cs.
|
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.
Definition at line 147 of file AbstractHoldDetector.cs.
|
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.
Definition at line 158 of file AbstractHoldDetector.cs.