public LeapMotionController( DataSource source ) { dataSource = source; if ( dataSource == DataSource.Record ) { recorder = new LeapMotionRecorder( FileName ); } else if ( dataSource == DataSource.Playback ) { player = new LeapMotionPlayback( FileName ); } leap.SetPolicyFlags( leap.PolicyFlags | Controller.PolicyFlag.POLICY_IMAGES ); CompositionTarget.Rendering += CompositionTarget_Rendering; }
public void Dispose() { if ( player != null ) { player.Dispose(); player = null; } if ( recorder != null ) { recorder.Dispose(); recorder = null; } }