本文整理汇总了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.");
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}
示例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");
}
示例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);
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}