示例#1
0
        internal override bool Hit(PickupBox pkbox, Entity entity)
        {
            Polyline polyline = entity as Polyline;

            if (polyline == null)
            {
                return(false);
            }

            Bounding pkBounding = pkbox.reservedBounding;

            for (int i = 1; i < polyline.NumberOfVertices; ++i)
            {
                LitMath.Line2 line = new LitMath.Line2(
                    polyline.GetPointAt(i - 1),
                    polyline.GetPointAt(i));

                if (LineHitter.BoundingIntersectWithLine(pkBounding, line))
                {
                    return(true);
                }
            }

            return(false);
        }
示例#2
0
        internal override bool Hit(PickupBox pkbox, Entity entity)
        {
            Circle circle = entity as Circle;

            if (circle == null)
            {
                return(false);
            }

            return(MathUtils.BoundingCross(pkbox.reservedBounding, circle));
        }
示例#3
0
        internal override bool Hit(PickupBox pkbox, Entity entity)
        {
            Ellipse ellipse = entity as Ellipse;

            if (ellipse == null)
            {
                return(false);
            }

            return(MathUtils.BoundingCross(pkbox.reservedBounding, ellipse));
        }
示例#4
0
        internal override bool Hit(PickupBox pkbox, Entity entity)
        {
            Xline xline = entity as Xline;

            if (xline == null)
            {
                return(false);
            }

            Bounding bounding = pkbox.reservedBounding;

            return(BoundingIntersectWithXline(bounding, xline));
        }
示例#5
0
        internal override bool Hit(PickupBox pkbox, Entity entity)
        {
            XPoint xPoint = entity as XPoint;

            if (xPoint == null)
            {
                return(false);
            }

            XPointRS xPointRS = new XPointRS();

            return(xPointRS.Cross(pkbox.reservedBounding, xPoint));
        }
示例#6
0
        internal override bool Hit(PickupBox pkbox, Entity entity)
        {
            Arc arc = entity as Arc;

            if (arc == null)
            {
                return(false);
            }

            ArcRS arcRS = new ArcRS();

            return(arcRS.Cross(pkbox.reservedBounding, arc));
        }
示例#7
0
        internal override bool Hit(PickupBox pkbox, Entity entity)
        {
            Ray ray = entity as Ray;

            if (ray == null)
            {
                return(false);
            }

            Bounding bounding = pkbox.reservedBounding;

            return(BoundingIntersectWithRay(bounding, ray));
        }
示例#8
0
        internal override bool Hit(PickupBox pkbox, Entity entity)
        {
            Text text = entity as Text;

            if (text == null)
            {
                return(false);
            }

            TextRS textRS = new TextRS();

            return(textRS.Cross(pkbox.reservedBounding, text));
        }
示例#9
0
        /// <summary>
        /// 构造函数
        /// </summary>
        internal Pointer(Presenter presenter)
        {
            _presenter = presenter;

            _pickupBox      = new PickupBox(_presenter);
            _pickupBox.side = 10;

            _locateCross        = new LocateCross(_presenter);
            _locateCross.length = 70;

            _snapNodesMgr = new SnapNodesMgr(_presenter);
            _anchorMgr    = new AnchorsMgr(_presenter);

            UpdateBitmap();
        }
示例#10
0
        internal override bool Hit(PickupBox pkbox, Entity entity)
        {
            Line line = entity as Line;

            if (line == null)
            {
                return(false);
            }

            Bounding pkBounding = pkbox.reservedBounding;

            return(LineHitter.BoundingIntersectWithLine(
                       pkBounding,
                       new LitMath.Line2(line.startPoint, line.endPoint)));
        }
示例#11
0
 internal abstract bool Hit(PickupBox pkbox, Entity entity);