LightBuzz / Vitruvius

A set of easy-to-use Kinect utilities that will speed-up the development of your projects.
http://vitruviuskinect.com
Apache License 2.0
229 stars 82 forks source link

Toggle Skeleton at Kinect v2 WPF demo leaves back garbage #19

Open birbilis opened 8 years ago

birbilis commented 8 years ago

When toggling off skeleton at Kinect v2 WPF demo (don't remember if WinRT demo does it), it leaves back the old skeleton "frozen". It would be more consistent if it removed the old skeleton when toggling it off

Vangos commented 8 years ago

Could you ensure that UserReporter_BodyLeft is called?

Thanks!

birbilis commented 8 years ago

What I mean is that pressing the toggle button to hide the skeleton should clear the old skeleton from the display, not just mark some flag that it shouldn't be updating the skeleton anymore. Will check the code in a moment to see what it does and try to fix it

birbilis commented 8 years ago

fixed the issue at both WinRT and WPF samples for Kinect v2. The fix is available at the latest pull request (also added diagrams to WinRT version etc.)

    private void Skeleton_Unchecked(object sender, RoutedEventArgs e)
    {
        _displaySkeleton = false;
        viewer.Clear(); //calling this after setting _displaySkeleton=false to clear any previously drawn skeleton
    }

btw, I've done a few edits with the two recent pull requests to WPF and WinRT versions for Kinect v2 (now that I got myself a v2 sensor too).

Problem is I might cause you a harder time merging these and maybe I should refrain for doing any more changes/fixes till you upload the new version where you said you're using linked files shared between WPF/WinRT/Unity. E.g. I've added missing files to solution (like IBitmapGenerator interface that was available but not used at WPF version and now added it to both WPF and WinRT version and have the abstract BitmapGenerator class implement it [the change isn't breaking any client code]). Also added solution folders for diagrams etc. that I'm afraid you might accidentally skip when merging in the new version

Also, I see some other fork that has added some extra gestures that might be useful. I can help merging stuff from it manually after you upload the new version