Ejemplo n.º 1
0
 private void onMouseDoubleClick(EarthmineEventArgs args)
 {
     if (args.location != null)
     {
         _emViewer.SetSubjectLocation(args.location, null, null);
     }
 }
Ejemplo n.º 2
0
        private void onMouseLeftClick(EarthmineEventArgs args)
        {
            // set the status bar
            if (args.location != null)
            {
                if (_polygonMode)
                {
                    if (_polyVerts.Count < 2)
                    {
                        _polyVerts.Add(new OverlayVertex(args.location, false));
                    }

                    // add?
                    if (_polyVerts.Count == 2)
                    {
                        _polygonMode             = false;
                        _emViewer.EnableEditMode = false;
                        _poly = new Polygon(_polyVerts);

                        // load tech shop first
                        if (_kinectProvider.textureMode == KinectProvider.TextureMode.NONE)
                        {
                            _poly.Texture = _techShop;
                        }

                        // but kick of kinect provider
                        _kinectProvider.RunWorkerAsync();

                        _emViewer.AddOverlay(_poly);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private void onViewerReady(EarthmineEventArgs args)
        {
            // LA
            //string pano_id = "1000002326738";

            // San Diego
            string pano_id = "1000003067000";

            //string pano_id = "1000003064326";

            Earthmine.Util.Logger.Instance.Log(Earthmine.Util.Logger.INFO,
                                               string.Format("Loading pano id: {0}", pano_id));
            _emViewer.SetSubjectById(pano_id, null);
        }
Ejemplo n.º 4
0
 private void onImageLoaderException(EarthmineEventArgs info)
 {
     MessageBox.Show(info.ServiceExceptionMsg, "Earthmine Exception",
                     MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
 }
Ejemplo n.º 5
0
 private void onOpenGLVersionException(EarthmineEventArgs info)
 {
     MessageBox.Show(info.ServiceExceptionMsg, "Earthmine Exception",
                     MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     this.Controls.Remove(this._emViewer.GetControl());
 }
Ejemplo n.º 6
0
        private void onKeyUp(EarthmineEventArgs args)
        {
            if (args.keyArgs.KeyCode == Keys.P)
            {
                if (!_polygonMode)
                {
                    _polygonMode             = true;
                    _emViewer.EnableEditMode = true;
                }
                else
                {
                    _polygonMode             = false;
                    _emViewer.EnableEditMode = false;
                }
            }
            else if (args.keyArgs.KeyCode == Keys.C)
            {
                _emViewer.ClearOverlays();
                _polyVerts.Clear();
                // Cancel the kinect texture gen.
                _kinectProvider.CancelAsync();
            }
            else if (args.keyArgs.KeyCode == Keys.D1)
            {
                // none, other texture...
                _kinectProvider.textureMode =
                    KinectProvider.TextureMode.NONE;
                _poly.Texture = _techShop;
            }
            else if (args.keyArgs.KeyCode == Keys.D2)
            {
                // just depth
                _kinectProvider.textureMode =
                    KinectProvider.TextureMode.DEPTH;
            }
            else if (args.keyArgs.KeyCode == Keys.D3)
            {
                // all rgb
                _kinectProvider.textureMode =
                    KinectProvider.TextureMode.RGB;
            }
            else if (args.keyArgs.KeyCode == Keys.D4)
            {
                // user rgb over depth
                _kinectProvider.textureMode =
                    KinectProvider.TextureMode.DEPTH_RGB_USER;
            }
            else if (args.keyArgs.KeyCode == Keys.D5)
            {
                // just user rgb: scene analysis
                _kinectProvider.textureMode =
                    KinectProvider.TextureMode.RGB_USER_ONLY;
            }

            /*
             * else if (args.keyArgs.KeyCode == Keys.T)
             * {
             *  if (_toggleTexture)
             *  {
             *      //_poly.Texture = _texture1;
             *      _toggleTexture = false;
             *  }
             *  else
             *  {
             *      //_poly.Texture = _texture2;
             *      _toggleTexture = true;
             *  }
             * }
             */
        }