CenterAndZoomToSegment2D() public method

public CenterAndZoomToSegment2D ( uint segId ) : void
segId uint
return void
Beispiel #1
0
        public virtual void OnMouseDoubleClick(System.Windows.Forms.MouseEventArgs mouseEventArgs, int width, int height)
        {
            if (mTileManager.SegmentationLoaded && !mTileManager.SegmentationChangeInProgress && mouseEventArgs.Button == System.Windows.Forms.MouseButtons.Left)
            {
                //Get the id of the segment being clicked

                var p = new Vector2((float)mouseEventArgs.X / width, (float)mouseEventArgs.Y / height);

                var clickedId = mTileManager.GetSegmentationLabelId(p);

                mEngine.CenterAndZoomToSegment2D(clickedId);
            }
        }