Ejemplo n.º 1
0
 public void Set(SPointRect Obj_)
 {
     TopRight.Set(Obj_.TopRight);
     TopLeft.Set(Obj_.TopLeft);
     BottomLeft.Set(Obj_.BottomLeft);
     BottomRight.Set(Obj_.BottomRight);
 }
Ejemplo n.º 2
0
 public SPointRect(SPointRect Obj_)
 {
     TopRight    = Obj_.TopRight;
     TopLeft     = Obj_.TopLeft;
     BottomLeft  = Obj_.BottomLeft;
     BottomRight = Obj_.BottomRight;
 }
Ejemplo n.º 3
0
 public static bool IsOverlappedPointPointRect(SPoint Point_, SPointRect PointRect_)
 {
     return(
         CBase.ThetaOfTwoVectors(PointRect_.TopLeft.Sub(PointRect_.TopRight), Point_.Sub(PointRect_.TopRight)) < 0.0 &&
         CBase.ThetaOfTwoVectors(PointRect_.BottomLeft.Sub(PointRect_.TopLeft), Point_.Sub(PointRect_.TopLeft)) < 0.0 &&
         CBase.ThetaOfTwoVectors(PointRect_.BottomRight.Sub(PointRect_.BottomLeft), Point_.Sub(PointRect_.BottomLeft)) < 0.0 &&
         CBase.ThetaOfTwoVectors(PointRect_.TopRight.Sub(PointRect_.BottomRight), Point_.Sub(PointRect_.BottomRight)) < 0.0);
 }
Ejemplo n.º 4
0
 public static bool IsOverlappedCirclePointRect(SCircle Circle_, SPointRect PointRect_)
 {
     return(
         IsOverlappedPointPointRect(Circle_, new SPointRect(new SPoint(PointRect_.TopRight.X, PointRect_.TopRight.Y + Circle_.Radius), new SPoint(PointRect_.TopLeft.X, PointRect_.TopLeft.Y + Circle_.Radius), new SPoint(PointRect_.BottomLeft.X, PointRect_.BottomLeft.Y - Circle_.Radius), new SPoint(PointRect_.BottomRight.X, PointRect_.BottomRight.Y - Circle_.Radius))) ||
         IsOverlappedPointPointRect(Circle_, new SPointRect(new SPoint(PointRect_.TopRight.X + Circle_.Radius, PointRect_.TopRight.Y), new SPoint(PointRect_.TopLeft.X - Circle_.Radius, PointRect_.TopLeft.Y), new SPoint(PointRect_.BottomLeft.X - Circle_.Radius, PointRect_.BottomLeft.Y), new SPoint(PointRect_.BottomRight.X + Circle_.Radius, PointRect_.BottomRight.Y))) ||
         IsOverlappedPointCircle(Circle_, new SCircle(PointRect_.TopRight, Circle_.Radius)) ||
         IsOverlappedPointCircle(Circle_, new SCircle(PointRect_.TopLeft, Circle_.Radius)) ||
         IsOverlappedPointCircle(Circle_, new SCircle(PointRect_.BottomLeft, Circle_.Radius)) ||
         IsOverlappedPointCircle(Circle_, new SCircle(PointRect_.BottomRight, Circle_.Radius))
         );
 }