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); }
internal override bool Hit(PickupBox pkbox, Entity entity) { Circle circle = entity as Circle; if (circle == null) { return(false); } return(MathUtils.BoundingCross(pkbox.reservedBounding, circle)); }
internal override bool Hit(PickupBox pkbox, Entity entity) { Ellipse ellipse = entity as Ellipse; if (ellipse == null) { return(false); } return(MathUtils.BoundingCross(pkbox.reservedBounding, ellipse)); }
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)); }
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)); }
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)); }
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)); }
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)); }
/// <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(); }
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))); }
internal abstract bool Hit(PickupBox pkbox, Entity entity);