Tanoda
Leap.Unity.Detector Class Reference
Inheritance diagram for Leap.Unity.Detector:
Leap.Unity.AbstractHoldDetector Leap.Unity.DetectorLogicGate Leap.Unity.ExtendedFingerDetector Leap.Unity.FingerDirectionDetector Leap.Unity.PalmDirectionDetector Leap.Unity.ProximityDetector Leap.Unity.PinchDetector

Public Member Functions

virtual void Activate ()
 
virtual void Deactivate ()
 

Public Attributes

UnityEvent OnActivate
 
UnityEvent OnDeactivate
 

Protected Attributes

Color OnColor = Color.green
 
Color OffColor = Color.red
 
Color LimitColor = Color.blue
 
Color DirectionColor = Color.white
 
Color NormalColor = Color.gray
 

Properties

bool IsActive [get]
 

Detailed Description

Base class for detectors.

A Detector is an object that observes some aspect of a scene and reports true when the specified conditions are met. Typically these conditions involve hand information, but this is not required.

Detector implementations must call Activate() when their conditions are met and Deactivate() when those conditions are no longer met. Implementations should also call Deactivate() when they, or the object they are a component of become disabled. Implementations can call Activate() and Deactivate() more often than is strictly necessary. This Detector base class keeps track of the IsActive status and only dispatches events when the status changes.

Since
4.1.2

Definition at line 32 of file Detector.cs.

Member Function Documentation

◆ Activate()

virtual void Leap.Unity.Detector.Activate ( )
virtual

Invoked when this detector activates. Subclasses must call this function when the detector's conditions become true.

Since
4.1.2

Definition at line 54 of file Detector.cs.

◆ Deactivate()

virtual void Leap.Unity.Detector.Deactivate ( )
virtual

Invoked when this detector deactivates. Subclasses must call this function when the detector's conditions change from true to false.

Since
4.1.2

Definition at line 66 of file Detector.cs.

Member Data Documentation

◆ DirectionColor

Color Leap.Unity.Detector.DirectionColor = Color.white
protected

Definition at line 77 of file Detector.cs.

◆ LimitColor

Color Leap.Unity.Detector.LimitColor = Color.blue
protected

Definition at line 76 of file Detector.cs.

◆ NormalColor

Color Leap.Unity.Detector.NormalColor = Color.gray
protected

Definition at line 78 of file Detector.cs.

◆ OffColor

Color Leap.Unity.Detector.OffColor = Color.red
protected

Definition at line 75 of file Detector.cs.

◆ OnActivate

UnityEvent Leap.Unity.Detector.OnActivate

Dispatched when the detector activates (becomes true).

Since
4.1.2

Definition at line 42 of file Detector.cs.

◆ OnColor

Color Leap.Unity.Detector.OnColor = Color.green
protected

Definition at line 74 of file Detector.cs.

◆ OnDeactivate

UnityEvent Leap.Unity.Detector.OnDeactivate

Dispatched when the detector deactivates (becomes false).

Since
4.1.2

Definition at line 47 of file Detector.cs.

Property Documentation

◆ IsActive

bool Leap.Unity.Detector.IsActive
get

The current detector state.

Since
4.1.2

Definition at line 36 of file Detector.cs.


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