Class Leap::CapsuleHand

class Leap.CapsuleHand : public Leap.HandModelBase

The CapsuleHand is a basic Leap hand model that generates a set of spheres and cylinders to render hands using Leap hand data. It is constructed dynamically rather than using pre-existing geometry which allows hand visuals to scale to the size of the users hand and is a reliable way to visualize the raw tracking data.

Public Functions

virtual override bool SupportsEditorPersistence ()

Returns whether or not this hand model supports editor persistence. (set to true for the CapsuleHand)

virtual override Hand GetLeapHand ()

Returns the Leap Hand object represented by this HandModelBase. Note that any physical quantities and directions obtained from the Leap Hand object are relative to the Leap Motion coordinate system, which uses a right-handed axes and units of millimeters.

Return

virtual override void SetLeapHand (Hand hand)

Assigns a Leap Hand object to this HandModelBase.

Param hand

virtual override void InitHand ()

This function is called when a new hand is detected by the Leap Motion device. Materials and Colors for the hand are set up.

void SetCustomColours (Color sphere, Color cylinder)

In-code alternative to the editor properties for setting custom sphere/cylinder colours.

Param sphere

Param cylinder

virtual override void BeginHand ()

Called after the hand is initialised. Calls the event OnBegin and sets isTracked to true. Assigns colors to materials for the hand.

virtual override void UpdateHand ()

Called once per frame when the LeapProvider calls the event OnUpdateFrame. Updates all joint sphere positions and draws the spheres and cylinders of the hand.

Properties

overrideModelType HandModelType { get; set; }

The type of the Hand model (set to Graphics)

overrideChirality Handedness { get; set; }

The chirality of handedness of this hand. This can be set in the inspector.

Color SphereColour { get; set; }

The colour of the Capsule Hand’s spheres.

Color CylinderColour { get; set; }

The colour of the Capsule Hand’s cylinders.