C# Class DeviceListener

Listen to the Leap Motion device and manage the functions linked to the controller.
Inheritance: Listener
显示文件 Open project: loic-lavergne/mckineap Class Usage Examples

Public Methods

Method 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

Method 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 method

public static GetNodeName ( string boneType ) : string
boneType string
return string

OnConnect() public method

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

OnDisconnect() public method

public OnDisconnect ( Controller controller ) : void
controller Controller
return void

OnFrame() public method

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.
return void

RecordStream() public method

public RecordStream ( Frame, frame ) : void
frame Frame,
return void

StartRecord() public method

public StartRecord ( ) : void
return void

StopRecord() public method

public StopRecord ( ) : Scene
return Scene