当前位置: 首页>>代码示例>>C#>>正文


C# Controller.EnableGesture方法代码示例

本文整理汇总了C#中Leap.Controller.EnableGesture方法的典型用法代码示例。如果您正苦于以下问题:C# Controller.EnableGesture方法的具体用法?C# Controller.EnableGesture怎么用?C# Controller.EnableGesture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Leap.Controller的用法示例。


在下文中一共展示了Controller.EnableGesture方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Form1

 public Form1()
 {
     InitializeComponent();
     oCamera = new InventorCamera();
     controller = new Controller();
     InitializeTexBox();
     AddToLog("Component initialization.");
     Thread.Sleep(100); // wait for connection
     if (controller.Devices.IsEmpty)
     {
         AddToLog("ERROR: No connection to Leap Motion service.");
         AddToLog("ERROR: Connect device and restart application.");
         return;
     }
     else
     {
         AddToLog("Connected to Leap Motion service.");
         controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
         controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
         listener = new LeapEventListener(this);
         controller.SetPolicyFlags(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES);
         controller.AddListener(listener);
     }
     if (!oCamera.IsStarted())
         AddToLog("ERROR: Inventor instance not found.");
     else
         AddToLog("Iventor instance found. ");
     if (!oCamera.IsOpened())
         AddToLog("ERROR: Assembly, part or presentation document not found.");
     else
         AddToLog(oCamera.GetDocType() + " document found.");
 }
开发者ID:harrykeen18,项目名称:InventorIntegration,代码行数:32,代码来源:Form1.cs

示例2: OnConnect

 public override void OnConnect(Controller controller)
 {
     controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
     controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
 }
开发者ID:Zaeran,项目名称:LeapWindowsController,代码行数:7,代码来源:SampleListener.cs

示例3: OnConnect

 public override void OnConnect(Controller controller)
 {
     SafeWriteLine("Leap Connected");
     controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
     controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
 }
开发者ID:radu-chc,项目名称:Wirelessly-Controlled-Robot-Through-Advanced-Arm-Motion-Capture-Tracking-and-Gesture-Recognition,代码行数:8,代码来源:LeapListener.cs

示例4: OnInit

 public override void OnInit(Controller controller)
 {
     controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
     controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP);
     controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
     controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
     controller.SetPolicyFlags(Controller.PolicyFlag.POLICYBACKGROUNDFRAMES);
 }
开发者ID:NicolasDorier,项目名称:GestSpace,代码行数:8,代码来源:ReactiveListener.cs

示例5: OnConnect

 public override void OnConnect(Controller controller)
 {
     SafeWriteLine("Connected");
     controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
     //controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP);
     controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
     controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
 }
开发者ID:jasine,项目名称:KinectExplorer,代码行数:8,代码来源:LeapListener.cs

示例6: Start

 // Use this for initialization
 void Start()
 {
     controller = new Controller();
     controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
     controller.EnableGesture(Gesture.GestureType.TYPEINVALID);
     controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP);
     controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
     controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
 }
开发者ID:lulitd,项目名称:LEAP3DJAM,代码行数:10,代码来源:CircleGesture.cs

示例7: OnConnect

 public override void OnConnect(Controller controller)
 {
     _LogAction("Connected");
     controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
     //controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP);
     //controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
     controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
     _LogAction("Gesures Enabled");
 }
开发者ID:RossDay,项目名称:Leap,代码行数:9,代码来源:MainListener.cs

示例8: OnConnect

 public override void OnConnect(Controller controller)
 {
     controller.SetPolicyFlags(Controller.PolicyFlag.POLICY_IMAGES);
     //enable all four types of gestures
     controller.EnableGesture(Gesture.GestureType.TYPE_SWIPE);
     controller.EnableGesture(Gesture.GestureType.TYPE_KEY_TAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_SCREEN_TAP);
     controller.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
     this.eventDelegate.LeapEventNotification("onConnect");
 }
开发者ID:Fivepoints,项目名称:LeapTutorial1,代码行数:10,代码来源:MainWindow.xaml.cs

示例9: OnConnect

        public override void OnConnect(Controller controller)
        {
            Log("Leap Connected");

            // Enable gestures as appropriate
            controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
            controller.EnableGesture(Gesture.GestureType.TYPEKEYTAP);
            controller.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
            controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
        }
开发者ID:RomeoInc,项目名称:InCarGestureInteraction,代码行数:10,代码来源:LeapListener.cs

示例10: Start

 // Use this for initialization
 void Start()
 {
     print("Inizializzo controller");
     listener = new Leap.Listener();
     controller = new Leap.Controller();
     controller.AddListener(listener);
     controller.EnableGesture(Leap.Gesture.GestureType.TYPECIRCLE);
     controller.EnableGesture(Leap.Gesture.GestureType.TYPEKEYTAP);
     controller.EnableGesture(Leap.Gesture.GestureType.TYPESCREENTAP);
     controller.EnableGesture(Leap.Gesture.GestureType.TYPESWIPE);
     hasPaused=false;
 }
开发者ID:NicolaGenesin,项目名称:Leap-Motion-Hands-Tracking,代码行数:13,代码来源:CameraLeap.cs

示例11: Initialize

 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
     // TODO: Add your initialization logic here    
     currentState = StateMachine.Instance;
     currentState.state = StateMachine.ScreenState.GAME_MENU;
     StateMachine.Instance.resWidth = graphics.GraphicsDevice.Viewport.Width;
     StateMachine.Instance.resHeight = graphics.GraphicsDevice.Viewport.Height;
     leapController = new Controller();
     listener = new SingleListener();
     leapController.EnableGesture(Gesture.GestureType.TYPE_CIRCLE);
     leapController.EnableGesture(Gesture.GestureType.TYPESCREENTAP);
     leapController.AddListener(listener);
     base.Initialize();
 }
开发者ID:sukasenyumm,项目名称:WordsAppGame,代码行数:20,代码来源:Game1.cs

示例12: Start

 // Use this for initialization
 void Start()
 {
     audioSource = GameObject.FindWithTag("SFX_Source").GetComponent<AudioSource>();
     levelHandler = FindObjectOfType<LevelHandler>();
     UpdateAmmoText();
     aim = GetComponent<Aim>().transform;
     controller = new Controller();
     controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
     controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
     controller.Config.SetFloat("Gesture.Circle.MinRadius", 50.0f);
     controller.Config.Save();
     length = 15f;
     canFire = false;
     currentHand = right ? 0 : 1;
 }
开发者ID:Liljan,项目名称:Handgun,代码行数:16,代码来源:WeaponManager.cs

示例13: Start

 // Use this for initialization
 void Start()
 {
     print("Inizializzo controller");
     listener = new Leap.Listener();
     controller = new Leap.Controller();
     controller.AddListener(listener);
     controller.EnableGesture(Leap.Gesture.GestureType.TYPECIRCLE);
     controller.EnableGesture(Leap.Gesture.GestureType.TYPEKEYTAP);
     controller.EnableGesture(Leap.Gesture.GestureType.TYPESCREENTAP);
     controller.EnableGesture(Leap.Gesture.GestureType.TYPESWIPE);
     mustPause=false;
     temp=0.0f;
     scratch=false;
     audio.pitch=1.0f;
     counter=0;
 }
开发者ID:NicolaGenesin,项目名称:Musicaleap,代码行数:17,代码来源:CameraLeap.cs

示例14: OnConnect

 public override void OnConnect(Controller leapController)
 {
     leapController.Config.SetFloat("Gesture.Swipe.MinLength", 10);
     leapController.Config.SetFloat("Gesture.Swipe.MinVelocity", 100);
     leapController.Config.Save();
     leapController.EnableGesture(Gesture.GestureType.TYPESWIPE);
 }
开发者ID:RyamBaCo,项目名称:StillLife,代码行数:7,代码来源:LeapListener.cs

示例15: Start

 // Use this for initialization
 void Start()
 {
     //enable gestures you need to use here
     controller = new Controller();
     controller.EnableGesture(Gesture.GestureType.TYPESWIPE);
     //controller.EnableGesture(Gesture.GestureType.TYPECIRCLE);
 }
开发者ID:AudibleShapes,项目名称:Capstone_Prototype_1,代码行数:8,代码来源:SwipeGestures.cs


注:本文中的Leap.Controller.EnableGesture方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。