Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is a nice solution using the official SDK, but even if you're not, it can be very (!) helpful (it was for me):</p> <p>You should take a look at the (free) code available here <a href="http://www.apress.com/9781430241041" rel="nofollow">Beginning Kinect Programming with the Microsoft Kinect SDK sample code</a> you click on "Source Code/Downloads" and what's is going to interest you in the sample is the Chapter 6 (name of the folder).</p> <p>Basically they're using a static class <code>KinectInput</code> that allow to raise new event like <code>KinectCursorEnterEvent</code>, there is a cursor manager <code>KinectCursorManager</code> which does almost everything get the hand position/update the cursor ... and They use an adorner to put the cursor, with the <code>FrameworkElement</code> you want as a cursor.</p> <p>They implement the <code>HoverButton</code> you're talking about. It fires the click event after a timer elapsed (timer launched when the <code>KinectCursorEnterEvent</code> occured). The solution they propose is elegant, and allow an easy implementation of nice controls. You can easily modify the code to handle the two cursor (that's the value-added of the Kinect, isn't it?)</p> <p>having an Enumeration <code>CursorSide</code>:</p> <pre><code>public enum CursorSide { Left, Right } </code></pre> <p>and modifyong only the <code>KinectCursorManager</code> having a Dictionary of capacity 2, and the enumeration being the Key, and having a pointer on the elemtn under the cursor for each hand:</p> <pre><code> private Dictionary&lt;CursorSide, CursorAdorner&gt; _cursorAdorner; private UIElement _lastElementOverRightHand; private UIElement _lastElementOverLeftHand; </code></pre> <p>But before you have to remove the part of the code that does the selection of the primaryHand (basically the hand closest to the Kinect).</p> <p>I hope this can help somebody :-]</p> <p>The book is very interesting, you can buy it for a few bucks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload