C# Class DeviceListener

Listen to the Leap Motion device and manage the functions linked to the controller.
Inheritance: Listener
Afficher le fichier Open project: loic-lavergne/mckineap Class Usage Examples

Méthodes publiques

Méthode Description
GetNodeName ( string boneType ) : string
OnConnect ( Controller controller ) : void

Check if the device is well connected

OnDisconnect ( Controller controller ) : void
OnFrame ( Controller controller ) : void

Function called each frame. Overriding it allows to write at the frame rate of the device.

RecordStream ( Frame, frame ) : void
StartRecord ( ) : void
StopRecord ( ) : Scene

Private Methods

Méthode Description
AddChildBone ( string boneType, Node parentNode ) : Node
AddNewFrame ( Hand hand, Animation anim ) : void

Add a new frame Animation channel

BoneToNode ( Bone bone ) : QuaternionKey>.Tuple
CreateNodeHierarchy ( Hand hand ) : void

Build a Node hierachy into the scene property 'mainScene' from a Hand object

InitNodeAnimChannel ( Hand hand ) : void
RecordHand ( Hand hand ) : void

Take a Hand argument which will be converted and added into one of the animation present in the animList property

SafeWriteLine ( String line ) : void

Lock the current thread to write a message. Temporary function for Debug.

Method Details

GetNodeName() public static méthode

public static GetNodeName ( string boneType ) : string
boneType string
Résultat string

OnConnect() public méthode

Check if the device is well connected
public OnConnect ( Controller controller ) : void
controller Controller Controller that represent the device.
Résultat void

OnDisconnect() public méthode

public OnDisconnect ( Controller controller ) : void
controller Controller
Résultat void

OnFrame() public méthode

Function called each frame. Overriding it allows to write at the frame rate of the device.
public OnFrame ( Controller controller ) : void
controller Controller Controller that represent the device.
Résultat void

RecordStream() public méthode

public RecordStream ( Frame, frame ) : void
frame Frame,
Résultat void

StartRecord() public méthode

public StartRecord ( ) : void
Résultat void

StopRecord() public méthode

public StopRecord ( ) : Scene
Résultat Scene