Namespace Leap::Unity

namespace Leap.Unity

HandModelBase defines abstract methods as a template for building Leap hand models

Typedefs

TestHandPose = TestHandFactory.TestHandPose

Enums

enum LogicType

The type of logic used to combine the watched detectors.

Values:

AndGate
OrGate
enum PointingState

Defines the settings for comparing extended finger states

Values:

Extended
NotExtended
Either
enum PointingType

Settings for handling pointing conditions

  • RelativeToCamera the target direction is defined relative to the camera’s forward vector.

  • RelativeToHorizon the target direction is defined relative to the camera’s forward vector, except that it does not change with pitch.

  • RelativeToWorld the target direction is defined as a global direction that does not change with camera movement.

  • AtTarget a target object is used to determine the pointing direction.

Since

4.1.2

Values:

RelativeToCamera
RelativeToHorizon
RelativeToWorld
AtTarget
enum Chirality

Values:

Left
Right
enum ModelType

Values:

Graphics
Physics
class AbstractHoldDetector : public Leap.Unity.Detector

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.

Subclassed by Leap.Unity.PinchDetector

class AnimationCurveUtil
class AppGlobals<T> : public MonoBehaviour
class ArrayPool<T>
class AssetFolder

A convenient serializable representation of an asset folder. Only useful for editor scripts since asset folder structure is not preserved for builds. The asset folder struct itself is still available at runtime for serialization ease, but the Path property will not be available.

Subclassed by Leap.Unity.StreamingFolder

class AutoValueProxy : public MonoBehaviour, public Leap.Unity.IValueProxy

A helpful implementation of IValueProxy. The class is a monobehaviour and so can be attached to game objects. Auto-pushing can also be turned on and off. When Auto-pushing is enabled, the behaviour will push the value on every LateUpdate.

class BitConverterNonAlloc
class BoxedIndexableStruct<Element, IndexableStruct> : public Leap.Unity.IIndexable<Element>, public Leap.Unity.IPoolable

Explicit boxing class for IIndexableStructs that implements IIndexable.

This is useful when you need to pass an IIndexableStruct into a context that requires an IIndexable and you also need to avoid allocating any garbage. To avoid allocation, you can use the generic Pool to pool instances of this class and pass it around as an IIndexable.

class BoxedIndexableStructExtensions
class CapsuleHand : public Leap.Unity.HandModelBase

A basic Leap hand model constructed dynamically vs. using pre-existing geometry

class Comment : public MonoBehaviour
class ConnectionMonitor : public MonoBehaviour

The ConnectionMonitor class monitors the connection to the Leap Motion service and displays a sprite in front of the camera when a connection is not available. You can use the PluginLeapNotice sprites in the LeapMotion/Textures folder or create your own.

class DebugHand : public Leap.Unity.HandModelBase

A HandModel that draws lines for the bones in the hand and its fingers.

The debugs lines are only drawn in the Editor Scene view (when a hand is tracked) and not in the Game view. Use debug hands when you aren’t using visible hands in a scene so that you can see where the hands are in the scene view.

class DefaultCurve
class DelayBuffer<T>
class DeltaBuffer<SampleType, DerivativeType> : public Leap.Unity.DeltaBuffer<Vector3, Vector3>, public Leap.Unity.IIndexable<SampleType>

Allows you to add to a capped-size ring buffer of Ts and, when full, compute the buffer’s average change over time. DeltaBuffer without type parameters supports Vector3s; DeltaFloatBuffer supports floats, and DeltaQuaternionBuffer supports Quaternion rotations.

A ring buffer of Vector3s with a Delta() function that computes the buffer’s average change over time.

To support other types, subclass DeltaBuffer with your sample type and average change type (in many cases the these are the same) and implement the Delta() function to compute the average change of samples currently in the buffer.

The larger the buffer, the more stable but also delayed the resulting average change over time. A buffer size of 5 is a good start for 60-90 Hz updates.

class DeltaFloatBuffer : public Leap.Unity.DeltaBuffer<float, float>

A ring buffer of floats with a Delta() function that computes the buffer’s average change over time. Delta() will return zero if the buffer contains one or fewer samples.

The larger the buffer, the more stable but also delayed the resulting average change over time. A buffer size of 5 is a good start for 60-90 Hz updates.

class DeltaQuaternionBuffer : public Leap.Unity.DeltaBuffer<Quaternion, Vector3>

A ring buffer of Quaternions with a Delta() function that computes the buffer’s average change over time as an angle-axis vector. Returns Vector3.zero if the buffer contains one or fewer samples.

The larger the buffer, the more stable but also delayed the resulting average change over time. A buffer size of 5 is a good start for 60-90 Hz updates.

class Deque<T>
class Detector : public MonoBehaviour

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

Subclassed by Leap.Unity.AbstractHoldDetector, Leap.Unity.DetectorLogicGate, Leap.Unity.ExtendedFingerDetector, Leap.Unity.FingerDirectionDetector, Leap.Unity.PalmDirectionDetector, Leap.Unity.ProximityDetector

class DetectorLogicGate : public Leap.Unity.Detector

The DetectorLogicGate detector observes other detectors and activates when these other detectors match the specified logic.

A DetectorLogicGate can be configured as an AND gate or an OR gate. You can also negate the output (creating a NAND or NOR gate).

Since a DetectorLogicGate is a Detector, it can observe other DetectorLogicGate instances. However, before constructing complex logic chains, you should consider whether it is better to put such logic into a normal script.

Since

4.1.2

class DisconnectionNotice : public MonoBehaviour

Tracks the connection state of the Leap Motion hardware. If the device is unplugged or otherwise not detected, the script fades in a GUITexture object which should communicate the problem to the user.

Deprecated:

Use ConnectionMonitor in new code.

struct ><A, B> Either : public IEquatable< Either< A, B > >  public IComparable  public IComparable< Either< A, B>

A data structure that represents either a value of type A or a value of type B. The value can never be both A and B. Neither A nor B can ever be null.

class EnableDepthBuffer : public MonoBehaviour
class Enum<T>
class EnumEventTable : public ISerializationCallbackReceiver
class ExecuteAfterAttribute : public Attribute
class ExecuteAfterDefault : public Attribute
class ExecuteBeforeAttribute : public Attribute
class ExecuteBeforeDefault : public Attribute
class ExtendedFingerDetector : public Leap.Unity.Detector

Detects when specified fingers are in an extended or non-extended state.

You can specify whether each finger is extended, not extended, or in either state. This detector activates when every finger on the observed hand meets these conditions.

If added to a HandModelBase instance or one of its children, this detector checks the finger state at the interval specified by the Period variable. You can also specify which hand model to observe explicitly by setting handModel in the Unity editor or in code.

Since

4.1.2

class FingerDirectionDetector : public Leap.Unity.Detector

Detects when specified fingers are pointing in the specified manner.

Directions can be specified relative to the global frame of reference, relative to the camera frame of reference, or using a combination of the two relative to the camera direction in the x-z plane, but not changing relative to the horizon.

You can alternatively specify a target game object.

If added to a HandModelBase instance or one of its children, this detector checks the finger direction at the interval specified by the Period variable. You can also specify which hand model to observe explicitly by setting handModel in the Unity editor or in code.

Since

4.1.2

class FingerModel : public MonoBehaviour

The base class for all fingers.

This class serves as the interface between the HandController object, the parent Hand object and the concrete finger objects.

Subclasses of FingerModel must implement InitFinger() and UpdateFinger(). The InitHand() function is typically called by the parent HandModel InitHand() method; likewise, the UpdateFinger() function is typically called by the parent HandModel UpdateHand() function.

Subclassed by Leap.Unity.SkeletalFinger

class FpsLabel : public MonoBehaviour
class FrameRateControls : public MonoBehaviour

Provides control of target frame rate.

This utility is useful for verifying frame-rate independence of behaviors.

class GuiRectUtil
class HandDrop : public Leap.Unity.HandTransitionBehavior

Simple implementation HandTransitionBehavior to lerp hand models back to their starting position and orientation with tracking ends

class HandEnableDisable : public Leap.Unity.HandTransitionBehavior
class HandModel : public Leap.Unity.HandModelBase

The base class for all hand models, both graphics and physics.

This class serves as the interface between the HandController object and the concrete hand object containing the graphics and physics of a hand.

Subclasses of HandModel must implement InitHand() and UpdateHand(). The UpdateHand() function is called in the Unity Update() phase for graphics HandModel instances; and in the Unity FixedUpdate() phase for physics objects. InitHand() is called once, when the hand is created and is followed by a call to UpdateHand().

Subclassed by Leap.Unity.SkeletalHand

class HandModelBase : public MonoBehaviour

Subclassed by Leap.Unity.CapsuleHand, Leap.Unity.DebugHand, Leap.Unity.HandModel, Leap.Unity.HandsModule.HandBinder

class Hands

Static convenience methods and extension methods for getting useful Hand data.

class HandTransitionBehavior : public MonoBehaviour

A component to be attached to a HandModelBase to handle starting and ending of tracking. HandReset is called when tracking begins. HandFinish is called when tracking ends.

Subclassed by Leap.Unity.HandDrop, Leap.Unity.HandEnableDisable

class HandUtils

Utility methods for constructing and manipulating Leap hand object data.

struct Hash : public IEnumerable, public IEquatable<Hash>
interface ICanReportDuplicateInformation

Subclassed by Leap.Unity.SerializableDictionary< TKey, TValue >, Leap.Unity.SerializableHashSet< T >

interface IIndexable<T>

This easy-to-implement interface represents the ability to index into a collection of elements of type T. IIndexables inherit Query() via an extension method.

IIndexable is fire-and-forget if your implementer is a reference type (class). If the implementing type is a struct, be mindful of boxing, and consider using IIndexableStruct and pooling instead.

Subclassed by Leap.Unity.RingBuffer< T >

class IIndexableExtensions
interface IIndexableStruct<T, ThisIndexableType>

This is a definition-friendly interface that new “indexable” struct definitions can implement to make it a little easier to implement foreach and Query() operations for their struct. (You can use the IndexableStructEnumerator for this purpose, you just have to pass it type arguments that correspond to your struct type.)

Unlike IIndexable, IIndexableStruct cannot utilize extension methods to automatically give consumers of the interface access to foreach and Query operations because consumption of a struct via an interface parameter forces the struct to be boxed, which causes allocation. As such, IIndexableStruct does not directly implement IIndexable.

(This all may change in C# 8 when we get traits, but Unity is still in the C# 4 stone age.)

interface IMinHeapNode
struct IndexableEnumerator<Element>
struct IndexableStructEnumerator<Element, IndexableStruct>

A two-generic-argument variant of an enumerator that allows an IIndexableStruct to quickly define an Enumerator that avoids allocation.

class InternalUtility
interface IPoolable

Implement this interface to recieve a callback whenever your object is spawned from a pool.

Subclassed by Leap.Unity.Animation.IInterpolator, Leap.Unity.BoxedIndexableStruct< Element, IndexableStruct >

interface IProgressView

This interface describes a generic way to update the progress of an action.

interface ISerializableDictionary

Subclassed by Leap.Unity.SerializableDictionary< TKey, TValue >

interface IValueProxy

A simple interface that allows an object to act as a ‘proxy’ interface to another object. The proxy can store a serialized representation of a value on another object. The value of the proxy can either be updated from the object (pull), or be pushed out to the object (push).

This interface is normally used in animation systems where something that needs to be animated does not have an easily animatable representation. The proxy stands in as the animatable representation, while still allowing normal reads and writes.

Subclassed by Leap.Unity.AutoValueProxy

class KeyEnableBehaviors : public MonoBehaviour
class KeyEnableGameObjects : public MonoBehaviour
struct KinematicState
class LeapColor

Contains color constants like UnityEngine.Color, but for all the colors you can think of. If you can think of a color that doesn’t exist here, add it!

(Note: This class exists for convenience, not runtime speed.)

class LeapEyeDislocator : public MonoBehaviour

Moves the camera to each eye position on pre-render. Only necessary for image pass-through (IR viewer) scenarios.

class LeapImageRetriever : public MonoBehaviour

Acquires images from a LeapServiceProvider and uploads image data as shader global data for use by any shaders that render those images.

Note: To use the LeapImageRetriever, you must be on version 2.1 or newer and you must enable “Allow Images” in your Leap Motion settings.

class LeapProfiling

Utility class used by the LeapServiceProvider for profiling the LeapCSharp dll

class LeapProvider : public MonoBehaviour

Provides Frame object data to the Unity application by firing events as soon as Frame data is available. Frames contain all currently tracked Hands in view of the Leap Motion Controller.

Subclassed by Leap.Unity.LeapServiceProvider, Leap.Unity.LeapTestProvider, Leap.Unity.PostProcessProvider

class LeapProviderExtensions
class LeapServiceProvider : public Leap.Unity.LeapProvider

The LeapServiceProvider provides tracked Leap Hand data and images from the device via the Leap service running on the client machine.

Subclassed by Leap.Unity.LeapXRServiceProvider

class LeapTestProvider : public Leap.Unity.LeapProvider
class LeapXRPinchLocomotion : public MonoBehaviour

Ensure this script is on your player object and set to execute before the LeapXRServiceProvider

class LeapXRServiceProvider : public Leap.Unity.LeapServiceProvider

The LeapXRServiceProvider expands on the standard LeapServiceProvider to account for the offset of the Leap device with respect to the attached HMD and warp tracked hand positions based on the motion of the headset to account for the differing latencies of the two tracking systems.

class ListAndArrayExtensions
class MainCameraProvider
class ><T> Maybe : public IEquatable< Maybe< T > >  public IComparable  public IComparable< Maybe< T>

A struct that represents a value that could or could not exist. Unlike the built-int nullable types, you are unable to access the value unless it does exist, and will never recieve a null value.

class MinHeap<T>
struct Movement
class MovementExtensions
class MultiTypedList<BaseType, A, B, C, D, E, F, G, H> : public MultiTypedList, public IList<BaseType>, public Leap.Unity.MultiTypedList<BaseType>, public Leap.Unity.MultiTypedList<BaseType, A, B>, public Leap.Unity.MultiTypedList<BaseType, A, B, C>, public Leap.Unity.MultiTypedList<BaseType, A, B, C, D>, public Leap.Unity.MultiTypedList<BaseType, A, B, C, D, E>, public Leap.Unity.MultiTypedList<BaseType, A, B, C, D, E, F>, public Leap.Unity.MultiTypedList<BaseType, A, B, C, D, E, F, G>

Represents an ordered collection of objects of type BaseType.

Unlike normal List objects, when MultiTypedList is serialized it is able to support a certain amount of polymorphism. To use MultiTypedList you must specify exactly which types could possibly added. You must also pre-declare a non-generic version of the chosen class, much in the same style as UnityEvent.

class MultiTypedListUtil
class MultiTypedReference<BaseType, A, B, C, D> : public Leap.Unity.MultiTypedReference<BaseType>, public Leap.Unity.MultiTypedReference<BaseType, A, B>, public Leap.Unity.MultiTypedReference<BaseType, A, B, C>

Represents a single reference to a value of type BaseType.

Unlike a normal reference, when MultiTypedReference is serialized it is able to support a certain amount of polymorphism. To use MultiTypedReference you must specify exactly which types could possibly be referenced. To must also pre-declare a non-generic version of the chosen class, mucgh in the same style as UnityEvent.

class MultiTypedReferenceUtil
class PalmDirectionDetector : public Leap.Unity.Detector

Detects whether the palm of the hand is pointing toward the specified direction. The detector activates when the palm direction is within OnAngle degrees of the desired direction and deactivates when it becomes more than OffAngle degrees.

Directions can be specified relative to the global frame of reference, relative to the camera frame of reference, or using a combination of the two relative to the camera direction in the x-z plane, but not changing relative to the horizon.

You can alternatively specify a target game object.

If added to a HandModelBase instance or one of its children, this detector checks the palm direction at the interval specified by the Period variable. You can also specify which hand model to observe explicitly by setting handModel in the Unity editor or in code.

Since

4.1.2

class PinchDetector : public Leap.Unity.AbstractHoldDetector

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.

class PipeFileSyntax
class Pool<T>

A very lightweight pool implementation. When you call Spawn, an object of type T will be returned. If the pool was not empty, the T will be taken from the pool. If the pool was empty, a new T will be constructed and returned instead. Calling recycle will return a T to the pool.

It is not required to implement the IPoolable interface to use the Pool class, which allows you to pool types such as List or Dictionary, types which you have no control over. But make sure that you clean up these objects before you recycle them!

Example workflow for types you DO NOT have control over:

// " // (XML fix for Visual Studio)

var obj = Pool\<T\>.Spawn();
obj.Init(stuff);

//Do something with obj

obj.Clear();
Pool\<T\>.Recycle(obj);

// " // (Close XML fix for Visual Studio)

Example workflow for types you DO have control over:

// " // (XML fix for Visual Studio)

var obj = Pool\<T\>.Spawn();
obj.Init(stuff);

// Do something with obj

obj.Dispose(); // e.g. call Recycle(this) in the Dispose() implementation

// " // (Close XML fix for Visual Studio)

class PoseExtensions
class PostProcessProvider : public Leap.Unity.LeapProvider
class ProduceConsumeBuffer<T>
struct ProfilerSample : public IDisposable

A utility struct for ease of use when you want to wrap a piece of code in a Profiler.BeginSample/EndSample. Usage:

using(new ProfilerSample(“Sample Name”)) { code you want to profile }

class ProgressBar

This class allows you to easily give feedback of an action as it completes.

The progress bar is represented as a single ‘Chunk’ that is made of a certain number of sections. The progress bar is hierarchical, and so each section can itself be another chunk.

class ProximityDetector : public Leap.Unity.Detector

Detects when the parent GameObject is within the specified distance of one of the target objects.

Since

4.1.2

class ProximityEvent : public UnityEvent<GameObject>

An event class that is dispatched by a ProximityDetector when the detector’s game object comes close enough to a game object in its target list. The event parameters provide the proximate game object.

Since

4.1.2

struct ReadonlyHashSet<T>

A simple wrapper around HashSet to provide readonly access. Useful when you want to return a HashSet to someone but you want to make sure they don’t muck it up!

struct ReadonlyList<T>

A simple wrapper around List to provide readonly access. Useful when you want to return a list to someone but you want to make sure they don’t muck it up!

struct ><T> ReadonlySlice : public Leap.Unity.IIndexableStruct< T, ReadonlySlice< T>
class ReadonlySliceExtensions
class RigidFinger : public Leap.Unity.SkeletalFinger

A physics finger model for our rigid hand made out of various cube Unity Colliders.

class RigidHand : public Leap.Unity.SkeletalHand

A physics model for our rigid hand made out of various Unity Collider.

class RingBuffer<T> : public Leap::Unity::IIndexable<T>
class SDictionaryAttribute : public PropertyAttribute
class SerializableDictionary<TKey, TValue> : public Leap.Unity.SerializableDictionaryBase, public IEnumerable<KeyValuePair<TKey, TValue>>, public Leap.Unity.ICanReportDuplicateInformation, public ISerializationCallbackReceiver, public Leap.Unity.ISerializableDictionary

In order to have this class be serialized, you will always need to create your own non-generic version specific to your needs. This is the same workflow that exists for using the UnityEvent class as well.

class SerializableDictionaryBase

Subclassed by Leap.Unity.SerializableDictionary< TKey, TValue >

class SerializableHashSet<T> : public Leap.Unity.SerializableHashSetBase, public Leap.Unity.ICanReportDuplicateInformation, public ISerializationCallbackReceiver, public IEnumerable<T>
class SerializableHashSetBase

Subclassed by Leap.Unity.SerializableHashSet< T >

struct SerializableType : public ISerializationCallbackReceiver
class SHashSetAttribute : public PropertyAttribute
struct SingleLayer : public IEquatable<SingleLayer>

An object you can use to represent a single Unity layer as a dropdown in the inspector. Can be converted back and forth between the integer representation Unity usually uses in its own methods.

class SkeletalFinger : public Leap.Unity.FingerModel

A finger object consisting of discrete, component parts for each bone.

The graphic objects can include both bones and joints, but both are optional.

Subclassed by Leap.Unity.RigidFinger

class SkeletalHand : public Leap.Unity.HandModel

A hand object consisting of discrete, component parts.

The hand can have game objects for the palm, wrist and forearm, as well as fingers.

Subclassed by Leap.Unity.RigidHand

struct ><T> Slice : public Leap.Unity.IIndexableStruct< T, Slice< T>
class SliceExtensions
class SlidingMax
class SmoothedFloat

Time-step independent exponential smoothing.

When moving at a constant speed: speed * delay = Value - SmoothedFloat.value.

class SmoothedQuaternion

Time-step independent exponential smoothing.

When moving at a constant speed: speed * delay = Value - ExponentialSmoothing.value.

class SmoothedVector3

Time-step independent exponential smoothing.

When moving at a constant speed: speed * delay = Value - SmoothedVector3.value.

class StreamingAsset : public Leap.Unity.StreamingFolder, public ISerializationCallbackReceiver
class StreamingFolder : public Leap.Unity.AssetFolder, public ISerializationCallbackReceiver

Subclassed by Leap.Unity.StreamingAsset

class TransformHistory

Implements a resample-able transform history.

class TransformUtil
class Type<T>
class UnityMatrixExtension

Unity extentions for the Leap Motion LeapTransform class.

class UnityQuaternionExtension

Unity extentions for Leap Quaternion class.

class UnityVectorExtension

Unity extentions for Leap Vector class.

class Utils
class XRHeightOffset : public MonoBehaviour
class XRSupportUtil

Wraps various (but not all) “XR” calls with Unity 5.6-supporting “VR” calls via #ifdefs.

namespace Animation

Enums

enum Direction

Values:

Forward
Backward
enum SmoothType

Values:

Linear
Smooth
SmoothEnd
SmoothStart
class Ease

Utility functions for producing smooth motion.

struct HermitePoseSpline : public Leap.Unity.Animation.ISpline<Pose, Movement>, public Leap.Unity.Animation.ISpline<Vector3, Vector3>

Represents a spline for poses positions and rotations that travel from one position and rotation in space to another over a specified time frame. The two endpoints are specified, as well as the instantaneous velocity and angular velocity at those two endpoints.

You may ask for the position, rotation, velocity, or angular velocity at any time along the spline’s duration.

class HermitePoseSplineExtensions
struct HermiteQuaternionSpline : public Leap.Unity.Animation.ISpline<Quaternion, Vector3>

Represents a spline for the rotation of a rigid body from one orientation in space to another over a specified time frame. The two endpoints are specified, as well as the instantaneous angular velocity at those two endpoints.

You may ask for the position, rotation, velocity, or angular velocity at any time along the spline’s duration.

struct HermiteSpline

Represents a spline that travels from one point in space to another over a specified time frame. The two endpoints are specified, as well as the instantaneous velocity at these two endpoints.

You may ask for the position or the velocity at any time during the splines duration.

struct HermiteSpline2

Represents a spline that travels from one point in space to another over a specified time frame. The two endpoints are specified, as well as the instantaneous velocity at these two endpoints.

You may ask for the position or the velocity at any time during the splines duration.

struct HermiteSpline3

Represents a spline that travels from one point in space to another over a specified time frame. The two endpoints are specified, as well as the instantaneous velocity at these two endpoints.

You may ask for the position or the velocity at any time during the splines duration.

interface IInterpolator : public Leap.Unity.IPoolable, public IDisposable

Implement this interface to add your own interpolators to Tween!

interface ISpline<XType, dXType>
class Mathq

Quaternion math.

struct PoseSplineSequence : public Leap.Unity.IIndexable<HermitePoseSpline>, public Leap.Unity.Animation.ISpline<Pose, Movement>, public Leap.Unity.Animation.ISpline<Vector3, Vector3>
class PoseSplineSequenceExtensions
class TransformTweenBehaviour : public MonoBehaviour

This is a wrapper MonoBehaviour that demonstrates and exposes some of the basic functionality of the Tween library. Tweens can interpolate between more than just Transform properties, so don’t be afraid to roll your own.

struct Tween
namespace Examples
class TransformPoseSpline : public MonoBehaviour, public Leap.Unity.RuntimeGizmos.IRuntimeGizmoComponent
namespace Attachments

Enums

enum AttachmentPointFlags

Flags for attachment points on the hand.

Values:

None
Wrist
Palm
ThumbProximalJoint
ThumbDistalJoint
ThumbTip
IndexKnuckle
IndexMiddleJoint
IndexDistalJoint
IndexTip
MiddleKnuckle
MiddleMiddleJoint
MiddleDistalJoint
MiddleTip
RingKnuckle
RingMiddleJoint
RingDistalJoint
RingTip
PinkyKnuckle
PinkyMiddleJoint
PinkyDistalJoint
PinkyTip
class AttachmentHand : public MonoBehaviour

This MonoBehaviour is managed by an AttachmentHands component on a parent MonoBehaviour. Instead of adding AttachmentHand directly to a GameObject, add an AttachmentHands component to a parent GameObject to manage the construction and updating of AttachmentHand objects.

class AttachmentHandEnableDisable : public MonoBehaviour
class AttachmentHands : public MonoBehaviour

Add an GameObject with this script to your scene if you would like to have a Transform hierarchy that will follow various important points on a hand, whether for visuals or for logic. The AttachmentHands object will maintain two child objects, one for each of the player’s hands. Use the Inspector to customize which points you’d like to see in the hierarchy beneath the individual AttachmentHand objects.

class AttachmentPointBehaviour : public MonoBehaviour

Simple container class for storing a reference to the attachment point this transform corresponds to within an AttachmentHand. Also contains mappings from a single AttachmentPointFlags flag constant to the relevant bone on a Leap.Hand; these mappings can be accessed statically via GetLeapHandPointData().

Can also be used to refer to a single AttachmentPointFlags flag constant (implicit conversion).

class AttachmentPointFlagsExtensions
namespace Attributes

Typedefs

UnityObject = UnityEngine.Object

Enums

enum AutoFindLocations

Values:

Object
Children
Parents
Scene
All
enum FileDialogType

Values:

Open
Save
Folder
class AutoFindAttribute : public Attribute
class CombinablePropertyAttribute : public PropertyAttribute

Subclassed by Leap.Unity.Attributes.CurveBoundsAttribute, Leap.Unity.Attributes.DisableAttribute, Leap.Unity.Attributes.DisableIfBase, Leap.Unity.Attributes.EditTimeOnly, Leap.Unity.Attributes.EditorGUIPanelAttribute, Leap.Unity.Attributes.EnumFlags, Leap.Unity.Attributes.FileChooserAttribute, Leap.Unity.Attributes.ImplementsInterfaceAttribute, Leap.Unity.Attributes.ImplementsTypeNameDropdownAttribute, Leap.Unity.Attributes.Incrementable, Leap.Unity.Attributes.InspectorNameAttribute, Leap.Unity.Attributes.MaxValue, Leap.Unity.Attributes.MinMax, Leap.Unity.Attributes.MinValue, Leap.Unity.Attributes.OnEditorChangeAttribute, Leap.Unity.Attributes.QuickButtonAttribute, Leap.Unity.Attributes.RunTimeOnlyAttribute, Leap.Unity.Attributes.UnitsAttribute

class CurveBoundsAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IFullPropertyDrawer

You can use this attribute to mark that an AnimationCurve can only have values that fall within specific bounds. The user will be prevented from entering a curve that lies outside of these bounds.

Subclassed by Leap.Unity.Attributes.UnitCurveAttribute

class DisableAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IPropertyDisabler
class DisableIf : public Leap.Unity.Attributes.DisableIfBase
class DisableIfAll : public Leap.Unity.Attributes.DisableIfBase
class DisableIfAny : public Leap.Unity.Attributes.DisableIfBase
class DisableIfBase : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IPropertyDisabler

Conditionally disables a property based on the value of another property. The only condition types that are currently supported are bool types, and enum types. The property has two arguments names ‘equalTo’ and ‘notEqualTo’. Exactly one of them must be specified, like so:

[DisableIf(“myBoolProperty”, isEqualTo: true)] [DisableIf(“myEnumProperty”, isNotEqualTo: MyEnum.Value)] [DisableIfAny(“bool1”, “bool2”, isEqualTo: false)] [DisableIfAll(“cond1”, “cond2”, “cond3”, isNotEqualTo: true)]

Subclassed by Leap.Unity.Attributes.DisableIf, Leap.Unity.Attributes.DisableIfAll, Leap.Unity.Attributes.DisableIfAny, Leap.Unity.Attributes.DisableIfEqual, Leap.Unity.Attributes.DisableIfNotEqual

class DisableIfEqual : public Leap.Unity.Attributes.DisableIfBase
class DisableIfNotEqual : public Leap.Unity.Attributes.DisableIfBase
class EditorGUIPanelAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.ITopPanelDrawer
class EditTimeOnly : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IPropertyDisabler
class EnumFlags : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IFullPropertyDrawer
class FileChooserAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IAfterFieldAdditiveDrawer

Subclassed by Leap.Unity.Attributes.FolderChooserAttribute, Leap.Unity.Attributes.ReadFileChooserAttribute, Leap.Unity.Attributes.WriteFileChooserAttribute

class FolderChooserAttribute : public Leap.Unity.Attributes.FileChooserAttribute
interface IAdditiveDrawer

Subclassed by Leap.Unity.Attributes.IAfterFieldAdditiveDrawer, Leap.Unity.Attributes.IAfterLabelAdditiveDrawer, Leap.Unity.Attributes.IBeforeFieldAdditiveDrawer, Leap.Unity.Attributes.IBeforeLabelAdditiveDrawer

interface IAfterFieldAdditiveDrawer : public Leap.Unity.Attributes.IAdditiveDrawer

Subclassed by Leap.Unity.Attributes.FileChooserAttribute, Leap.Unity.Attributes.Incrementable, Leap.Unity.Attributes.QuickButtonAttribute, Leap.Unity.Attributes.UnitsAttribute

interface IAfterLabelAdditiveDrawer : public Leap.Unity.Attributes.IAdditiveDrawer
interface IBeforeFieldAdditiveDrawer : public Leap.Unity.Attributes.IAdditiveDrawer
interface IBeforeLabelAdditiveDrawer : public Leap.Unity.Attributes.IAdditiveDrawer
interface IFullPropertyDrawer

Subclassed by Leap.Unity.Attributes.CurveBoundsAttribute, Leap.Unity.Attributes.EnumFlags, Leap.Unity.Attributes.ImplementsInterfaceAttribute, Leap.Unity.Attributes.ImplementsTypeNameDropdownAttribute, Leap.Unity.Attributes.InspectorNameAttribute, Leap.Unity.Attributes.MinMax

class ImplementsInterfaceAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IPropertyConstrainer, public Leap.Unity.Attributes.IFullPropertyDrawer, public Leap.Unity.Attributes.ISupportDragAndDrop
class ImplementsTypeNameDropdownAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IFullPropertyDrawer

Place this attribute on a serialized string field to have it render as a dropdown menu that is automatically populated with implementing types of the type provided to the attribute. The string field will contain the type name selected by the user. This can be converted into a Type reference via reflection and used to construct objects by their type, for example, or to construct ScriptableObjects by their type.

class Incrementable : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IAfterFieldAdditiveDrawer
class InspectorNameAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IFullPropertyDrawer
interface IPropertyConstrainer

Subclassed by Leap.Unity.Attributes.ImplementsInterfaceAttribute, Leap.Unity.Attributes.MaxValue, Leap.Unity.Attributes.MinValue

interface IPropertyDisabler

Subclassed by Leap.Unity.Attributes.DisableAttribute, Leap.Unity.Attributes.DisableIfBase, Leap.Unity.Attributes.EditTimeOnly, Leap.Unity.Attributes.RunTimeOnlyAttribute

interface ISupportDragAndDrop

Subclassed by Leap.Unity.Attributes.ImplementsInterfaceAttribute

interface ITopPanelDrawer

Subclassed by Leap.Unity.Attributes.EditorGUIPanelAttribute

class MaxValue : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IPropertyConstrainer
class MinMax : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IFullPropertyDrawer
class MinValue : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IPropertyConstrainer
class OnEditorChangeAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute

Use the OnChange attribute to recieve a callback whenever a field is changed. The callback can be in the form of:

  • A method accepting zero arguments

  • A method accepting a single argument matching the field type (new value is passed in as the argument)

  • A property matching the type of the field (the setter is called with the new value)

class QuickButtonAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IAfterFieldAdditiveDrawer
class ReadFileChooserAttribute : public Leap.Unity.Attributes.FileChooserAttribute
class RunTimeOnlyAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IPropertyDisabler
class UnitCurveAttribute : public Leap.Unity.Attributes.CurveBoundsAttribute

You can use this attribute to mark that an AnimationCurve can only have values that range from 0 to 1. The user will be prevented from entering a curve that lies outside of these bounds.

class UnitsAttribute : public Leap.Unity.Attributes.CombinablePropertyAttribute, public Leap.Unity.Attributes.IAfterFieldAdditiveDrawer
class WriteFileChooserAttribute : public Leap.Unity.Attributes.FileChooserAttribute
namespace Drawing
class Drawer

Simple drawing interface abstraction (intended for debug drawing, not production!) with statically-accessible backend implementations via HyperMegaLines, Unity Debug drawing, and Unity Gizmo drawing.

class DrawerExtensions
namespace Encoding
interface IInterpolable<T>

An interface that signifies this class can interpolate via the standard techniques

class VectorHand : public Leap.Unity.Encoding.IInterpolable<VectorHand>

A Vector-based encoding of a Leap Hand.

You can Encode a VectorHand from a Leap hand, Decode a VectorHand into a Leap hand, convert the VectorHand to a compressed byte representation using FillBytes, and decompress back into a VectorHand using FromBytes.

Also see CurlHand for a more compressed but slightly less articulated encoding. TODO: CurlHand not yet brought in from Networking module!

class VectorHandExtensions
namespace Examples
class IgnoreCollisionsInChildren : public MonoBehaviour

This utility script scans through its Transform’s children and tells PhysX to ignore collisions between all pairs of Colliders it finds. This is particlarly useful, for example, for interfaces, where buttons shouldn’t collide with other buttons.

This is not the recommended strategy in general: It is much more optimal for your application to put interface objects on a layer and disable self-collision for that layer in your Physics settings (Edit / Project Settings / Physics).

namespace Geometry

Typedefs

UnityEngine.Rect UnityRect

Enums

enum VerticalOrigin

Values:

Top
Bottom
struct Bezier
struct Bipyramid
struct Box
struct Capsule
class CapsuleExtensions
struct Circle
class CircleExtensions
class Collision
struct Direction3

A struct very similar to Vector3, but that prevents itself from ever being converted to Vector3.zero. If the Direction3’s components would ever be un-normalizable (normalize to Vector3.zero), it will instead return Vector3.forward. (Direction3 implicitly converts to a normalized Vector3.)

Because of this sanitizing behavior, “default(Direction3)” is stored as all zero components, but is converted to Vector3.forward upon implicit conversion to Vector3.

struct Frustum
class GeometryUtils
struct LeapGrid
struct LocalBox
struct LocalCircle
struct LocalFrustum
struct LocalPlane

A transformless Plane defined by a position and normal vector.

class LocalPlaneExtensions
struct LocalRect : public Leap.Unity.Encoding.IInterpolable<LocalRect>
struct LocalSegment2
struct LocalSegment3
struct LocalSphere
class MarginExtensions
struct Margins
struct Plane
struct Point
class PointExtensions
struct Rect
struct Sphere
class SphereExtensions
struct SphericalSection
namespace HandsModule

Enums

enum BoundTypes

Values:

THUMB_METACARPAL
THUMB_PROXIMAL
THUMB_INTERMEDIATE
THUMB_DISTAL
INDEX_METACARPAL
INDEX_PROXIMAL
INDEX_INTERMEDIATE
INDEX_DISTAL
MIDDLE_METACARPAL
MIDDLE_PROXIMAL
MIDDLE_INTERMEDIATE
MIDDLE_DISTAL
RING_METACARPAL
RING_PROXIMAL
RING_INTERMEDIATE
RING_DISTAL
PINKY_METACARPAL
PINKY_PROXIMAL
PINKY_INTERMEDIATE
PINKY_DISTAL
WRIST
ELBOW
class BoneNameDefinitions

Used to define what bones names are valid for each finger

class BoundBone
class BoundFinger
class BoundHand
class HandBinder : public Leap.Unity.HandModelBase
class HandBinderAutoBinder
class HandBinderUtilities
class SerializedTransform
class TransformStore
namespace Infix
class Infix

Unity math operations like Vector3.Dot put in extension methods so they can be used in as infix operations, e.g., a.Dot(b).

namespace Interaction

Enums

enum ContactForceMode

Values:

Object
UI
enum IgnoreHoverMode

Specified on a per-object basis to allow Interaction objects to ignore hover for the left hand, right hand, or both hands.

Values:

None
Left
Right
Both
enum ControllerType

The Interaction Engine can be controlled by hands tracked by the Leap Motion Controller, or by remote-style held controllers such as the Oculus Touch or Vive controller.

Values:

Hand
XRController
enum HandDataMode

Values:

PlayerLeft
PlayerRight
Custom
class ActivityManager<T>

ActivityManager is a wrapper around PhysX sphere queries for arbitrary Unity objects. “Active” objects are objects found in the latest query. It’s also possible to get the sets of objects that just began or stopped being active since the last query; this requires enabling the trackStateChanges setting.

class Anchor : public MonoBehaviour
class AnchorableBehaviour : public MonoBehaviour

AnchorableBehaviours mix well with InteractionBehaviours you’d like to be able to pick up and place in specific locations, specified by other GameObjects with an Anchor component.

class AnchorGroup : public MonoBehaviour
class AnchorSet : public Leap.Unity.SerializableHashSet<Anchor>
class FromMatrixExtension
class IInteractionBehaviourExtensions
class InteractionBehaviour : public MonoBehaviour, public IInteractionBehaviour

InteractionBehaviours are components that enable GameObjects to interact with interaction controllers (InteractionControllerBase) in a physically intuitive way.

By default, they represent objects that can be poked, prodded, smacked, grasped, and thrown around by Interaction controllers, including Leap hands. They also provide a thorough public API with settings and hovering, contact, and grasping callbacks for creating physical interfaces or overriding the default physical behavior of the object.

In documentation and some method calls, GameObjects with an InteractionBehaviour component may be referred to as interaction objects.

Subclassed by Leap.Unity.Interaction.InteractionButton

class InteractionButton : public Leap.Unity.Interaction.InteractionBehaviour

A physics-enabled button. Activated by physically pressing the button, with events for press and unpress. /summary>

Subclassed by Leap.Unity.Interaction.InteractionSlider, Leap.Unity.Interaction.InteractionToggle

class InteractionController : public MonoBehaviour, public IInternalInteractionController

Subclassed by Leap.Unity.Interaction.InteractionHand, Leap.Unity.Interaction.InteractionXRController

class InteractionControllerSet : public Leap.Unity.SerializableHashSet<InteractionController>
class InteractionHand : public Leap.Unity.Interaction.InteractionController
class InteractionManager : public MonoBehaviour, public IInternalInteractionManager, public Leap.Unity.RuntimeGizmos.IRuntimeGizmoComponent
class InteractionSlider : public Leap.Unity.Interaction.InteractionButton

A physics-enabled slider. Sliding is triggered by physically pushing the slider to its compressed position. Increasing the horizontal and vertical slide limits allows it to act as either a 1D or 2D slider. /summary>

class InteractionToggle : public Leap.Unity.Interaction.InteractionButton

A physics-enabled toggle. Toggling is triggered by physically pushing the toggle to its compressed position.

class InteractionXRController : public Leap.Unity.Interaction.InteractionController
class KabschSolver
class PhysicsCallbacks : public MonoBehaviour
class Vector3Extensions
namespace Examples
class HideInteractionHandWhenControllerMoving : public MonoBehaviour

This simple example script disables the InteractionHand script and has event outputs to drive hiding Leap hand renderers when it detects that an InteractionXRController is tracked and moving (e.g. it has been picked up).

It also does some basic checks with hand distance so that you can see your hands when you put the controller down and you hide the hands when they’re obviously holding the controller (e.g. tracked as very close to the controller).

namespace Internal

Functions

delegate void GraspedMovementEvent (Vector3 oldPosition, Quaternion oldRotation, Vector3 newPosition, Quaternion newRotation, List<InteractionController> graspingControllers)
namespace Query
struct Query<T>

A Query object is a type of immutable ordered collection of elements that can be used to perform useful queries. These queries are very similar to LINQ style queries, providing useful methods such as Where, Select, Concat, etc….

The Query struct and its interfaces use a pooling strategy backed by ArrayPool to incur an amortized cost of zero GC allocations.

A Query struct is immutable, and so cannot be modified once it has been created. You can use a query in few ways:

  • The simplest way is to call an operator method such as Where or Select. These methods CONSUME the query to produce a new query. Trying to use the original query after it has been consumed will cause a runtime error.

  • The next way is to call a collapsing operator, which will consume the query and produce a non-query value or other side-effect. Examples of collapsing operators are First, Last, or ElementAt.

  • The last way to use a query is to Deconstruct it, by calling a Deconstruct method to destroy the query and get access to its underlying data. You will be responsible for cleaning up or disposing the data you get.

class QueryCollapseExtensions
class QueryConversionExtensions
class QueryOperatorExtensions

A collection of extension methods that operate on a Query structure. All of these methods destroy the original query and return a new Query based on the original.

class Values
namespace RuntimeGizmos
interface IRuntimeGizmoComponent

Have your MonoBehaviour implement this interface to be able to draw runtime gizmos. You must also have a RuntimeGizmoManager component in the scene to recieve callbacks.

Subclassed by Leap.Unity.Animation.Examples.TransformPoseSpline, Leap.Unity.Interaction.InteractionManager, Leap.Unity.RuntimeGizmos.RuntimeColliderGizmos, Leap.Unity.Splines.TransformCatmullRomSpline

class RuntimeColliderGizmos : public MonoBehaviour, public Leap.Unity.RuntimeGizmos.IRuntimeGizmoComponent
class RuntimeGizmoDrawer
class RuntimeGizmoExtensions
class RuntimeGizmoManager : public MonoBehaviour
class RuntimeGizmoToggle : public MonoBehaviour

This class controls the display of all the runtime gizmos that are either attatched to this gameObject, or a child of this gameObject. Enable this component to allow the gizmos to be drawn, and disable it to hide them.

namespace Space
class IdentityTransformer : public Leap.Unity.Space.ITransformer
interface IRadialTransformer : public Leap.Unity.Space.ITransformer

Subclassed by Leap.Unity.Space.LeapCylindricalSpace.Transformer, Leap.Unity.Space.LeapSphericalSpace.Transformer

interface ISpaceComponent
interface ITransformer

Subclassed by Leap.Unity.Space.IRadialTransformer, Leap.Unity.Space.IdentityTransformer

class ITransformerExtensions
class LeapCylindricalSpace : public Leap.Unity.Space.LeapRadialSpace
class LeapRadialSpace : public Leap.Unity.Space.LeapSpace

Subclassed by Leap.Unity.Space.LeapCylindricalSpace, Leap.Unity.Space.LeapSphericalSpace

class LeapSpace : public Leap.Unity.Space.LeapSpaceAnchor

Subclassed by Leap.Unity.Space.LeapRadialSpace

class LeapSpaceAnchor : public MonoBehaviour

Subclassed by Leap.Unity.Space.LeapSpace

class LeapSphericalSpace : public Leap.Unity.Space.LeapRadialSpace
namespace Splines
class BSpline : public MonoBehaviour
class CatmullRom

Interpolate between points using Catmull-Rom splines.

class TransformCatmullRomSpline : public MonoBehaviour, public Leap.Unity.RuntimeGizmos.IRuntimeGizmoComponent
namespace Swizzle
class Swizzle