示例#1
0
        private bool _3DControl_RcMouseMove(object sender, Gvitech.CityMaker.Controls._IRenderControlEvents_RcMouseMoveEvent e)
        {
            IPoint      pt;
            IPickResult prTemp = this._3DControl.Camera.ScreenToWorld(e.x, e.y, out pt);

            if (pt != null)
            {
                if (_rPoint != null)
                {
                    this._objectManager.DeleteObject(_rPoint.Guid);
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(_rPoint);
                    _rPoint = null;
                }
                _rPoint = this._objectManager.CreateRenderPoint(pt, this._simplePointSymbol, this._rootID);
            }
            if (prTemp != null && prTemp.Type == gviObjectType.gviObjectFeatureLayer)
            {
                if (this._hoverFL != null && this._hoverFL != this._curSelectedFL && this._curSelectedID != this._hoverID)
                {
                    this._hoverFL.UnhighlightFeature(this._hoverID);
                }

                IFeatureLayerPickResult pr = prTemp as IFeatureLayerPickResult;
                pr.FeatureLayer.HighlightFeature(pr.FeatureId, this._hightlightColor);
                this._hoverFL = pr.FeatureLayer;
                this._hoverID = pr.FeatureId;
            }
            return(false);
        }
示例#2
0
        bool AxRenderControl3D_RcMouseMove(object sender, Gvitech.CityMaker.Controls._IRenderControlEvents_RcMouseMoveEvent e)
        {
            DF3DApplication app = DF3DApplication.Application;

            if (app == null || app.Workbench == null || app.Current3DMapControl == null)
            {
                return(false);
            }
            int         x = e.x;
            int         y = e.y;
            IPoint      pt;
            IPickResult pr = app.Current3DMapControl.Camera.ScreenToWorld(x, y, out pt);

            if (pr != null && pt != null)
            {
                string coord = String.Format("{0:#.###}  {1:#.###}  {2:#.###}m", pt.X, pt.Y, pt.Z);
                app.Workbench.SetOtherInfo(coord);
            }
            else
            {
                app.Workbench.SetOtherInfo("");
            }
            return(false);
        }