public static NuGenBox2D operator*(NuGenBox2D b, NuGenTrafo2D t) { NuGenBox2D result = NuGenBox2D.Empty; result += b.LL * t; result += b.LU * t; result += b.UL * t; result += b.UU * t; return(result); }
//[Test] public void InitTest() { NuGenBox2D b = new NuGenBox2D(new NuGenPnt2D(1, 2), new NuGenPnt2D(4, 5)); //Assert.AreEqual(new NuGenPnt2D(1,2), b.Lower); //Assert.AreEqual(new NuGenPnt2D(4,5), b.Upper); //Assert.AreEqual(new NuGenPnt2D(1,2), b.LL); //Assert.AreEqual(new NuGenPnt2D(1,5), b.LU); //Assert.AreEqual(new NuGenPnt2D(4,2), b.UL); //Assert.AreEqual(new NuGenPnt2D(4,5), b.UU); }
public override bool Equals(object obj) { NuGenBox2D x = (NuGenBox2D)obj; return(lower == x.Lower && upper == x.Upper); }
public static bool ApproxEqual(NuGenBox2D a, NuGenBox2D b) { return (NuGenVector.ApproxEquals(a.Lower, b.Lower) && NuGenVector.ApproxEquals(a.Upper, b.Upper)); }
public bool IsOnBorder(NuGenBox2D b) { return(IsInsideOrOnBorder(b) && !IsInside(b)); }
public bool IsInsideOrOnBorder(NuGenBox2D b) { return(lower <= b.lower && upper >= b.upper); }
public bool IsInside(NuGenBox2D b) { return(lower < b.lower && upper > b.upper); }
//[Test] public void InitTest() { NuGenBox2D b = new NuGenBox2D(new NuGenPnt2D(1,2), new NuGenPnt2D(4,5)); //Assert.AreEqual(new NuGenPnt2D(1,2), b.Lower); //Assert.AreEqual(new NuGenPnt2D(4,5), b.Upper); //Assert.AreEqual(new NuGenPnt2D(1,2), b.LL); //Assert.AreEqual(new NuGenPnt2D(1,5), b.LU); //Assert.AreEqual(new NuGenPnt2D(4,2), b.UL); //Assert.AreEqual(new NuGenPnt2D(4,5), b.UU); }
public static bool ApproxEqual(NuGenBox2D a, NuGenBox2D b) { return NuGenVector.ApproxEquals(a.Lower, b.Lower) && NuGenVector.ApproxEquals(a.Upper, b.Upper); }
public bool IsOnBorder(NuGenBox2D b) { return IsInsideOrOnBorder(b) && !IsInside(b); }
public bool IsInsideOrOnBorder(NuGenBox2D b) { return lower <= b.lower && upper >= b.upper; }
public bool IsInside(NuGenBox2D b) { return lower < b.lower && upper > b.upper; }