Replace pannable world map image by Google Earth globe in Kinect sample

こ雲淡風輕ζ 提交于 2020-01-13 18:08:01

问题


I need basic guidance on how to control Google Earth using Kinect Hand gestures instead of using mouse/keyboard navigation.

I have ran Kinect Developer toolkit sample, and there is one named interactive gallery in C# that allows panning world map (It's a static image). Here is the link to it's documentation, Kinect interactive gallery

I exactly want to create the same thing but allowing the world globe to be moved,zoom and rotate using hand gestures instead of a simple map image.

Currently I ran Google Earth in WPF application using a google earth plugin and using it via web browser component. here is the code,

   public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
    }

    void MainWindow_Loaded(object sender, RoutedEventArgs e)
    {
        string PLUGIN_URL = @"http://earth-api-samples.googlecode.com/svn/trunk/demos/desktop-embedded/pluginhost.html";
        Uri url = new Uri(PLUGIN_URL);
        this.browser.Navigate(url);

       // this.browser.ObjectForScripting = this;



    }
}

I have also tried controlling it by controlling mouse cursor using Kinect but it is not providing good user experience.

I would like to add grip gesture to pan the globe. I went through the kinect samples code, the documentation is not very good and I don't know where the grip gesture is being handled and corresponding event is fired.

Here is WorldMap.xaml code that displays world map image:

`<PannableContentModel xmlns="clr-namespace:Microsoft.Samples.Kinect.InteractionGallery.Models;assembly=InteractionGallery-WPF" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<PannableContentModel.ImageUri>
    <x:Uri>pack://application:,,,/Content/PannableContentScreen/PannableMapImage.jpg</x:Uri>
</PannableContentModel.ImageUri>

` I would like to display a Google earth globe instead.

Any help will be appreciated!

来源:https://stackoverflow.com/questions/26023232/replace-pannable-world-map-image-by-google-earth-globe-in-kinect-sample

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!