コード例 #1
0
ファイル: PlaneBorderTest.cs プロジェクト: JoepBC/scientrace
        public void testPlaneBorderSide2()
        {
            Scientrace.PlaneBorder pb = new Scientrace.PlaneBorder(
                new Scientrace.Location(1,1,1),
                new Scientrace.NonzeroVector(1,1,1));
            Assert.IsTrue(pb.contains(new Scientrace.Location(0,0,3.1)));
            Assert.IsTrue(pb.contains(new Scientrace.Location(3.1,0,0)));
            Assert.IsTrue(pb.contains(new Scientrace.Location(0,3.1,0)));
            Assert.IsFalse(pb.contains(new Scientrace.Location(0,0,0)));

            Assert.IsTrue(pb.contains(new Scientrace.Location(1,1,1)));
            Assert.IsTrue(pb.contains(new Scientrace.Location(1.1,1.1,1.1)));
            Assert.IsFalse(pb.contains(new Scientrace.Location(1,0,0)));
            Assert.IsTrue(pb.contains(new Scientrace.Location(0,0,3.1)));
            Assert.IsFalse(pb.contains(new Scientrace.Location(0,0,1.9)));
        }
コード例 #2
0
        public void testPlaneBorderSide2()
        {
            Scientrace.PlaneBorder pb = new Scientrace.PlaneBorder(
                new Scientrace.Location(1, 1, 1),
                new Scientrace.NonzeroVector(1, 1, 1));
            Assert.IsTrue(pb.contains(new Scientrace.Location(0, 0, 3.1)));
            Assert.IsTrue(pb.contains(new Scientrace.Location(3.1, 0, 0)));
            Assert.IsTrue(pb.contains(new Scientrace.Location(0, 3.1, 0)));
            Assert.IsFalse(pb.contains(new Scientrace.Location(0, 0, 0)));

            Assert.IsTrue(pb.contains(new Scientrace.Location(1, 1, 1)));
            Assert.IsTrue(pb.contains(new Scientrace.Location(1.1, 1.1, 1.1)));
            Assert.IsFalse(pb.contains(new Scientrace.Location(1, 0, 0)));
            Assert.IsTrue(pb.contains(new Scientrace.Location(0, 0, 3.1)));
            Assert.IsFalse(pb.contains(new Scientrace.Location(0, 0, 1.9)));
        }
コード例 #3
0
ファイル: PlaneBorderTest.cs プロジェクト: JoepBC/scientrace
 public void testPlaneBorderSide()
 {
     Scientrace.PlaneBorder pb = new Scientrace.PlaneBorder(
         new Scientrace.Location(0,0,1),
         new Scientrace.NonzeroVector(0,0,-1));
     Assert.IsTrue(pb.contains(new Scientrace.Location(0,0,0)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(0,0,0.5)));
     Assert.IsFalse(pb.contains(new Scientrace.Location(0,0,1.5)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(0,0,1)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(1,0,0)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(0,2,0.5)));
     Assert.IsFalse(pb.contains(new Scientrace.Location(3,0,1.5)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(5,6,1)));
 }
コード例 #4
0
 public void testPlaneBorderSide()
 {
     Scientrace.PlaneBorder pb = new Scientrace.PlaneBorder(
         new Scientrace.Location(0, 0, 1),
         new Scientrace.NonzeroVector(0, 0, -1));
     Assert.IsTrue(pb.contains(new Scientrace.Location(0, 0, 0)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(0, 0, 0.5)));
     Assert.IsFalse(pb.contains(new Scientrace.Location(0, 0, 1.5)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(0, 0, 1)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(1, 0, 0)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(0, 2, 0.5)));
     Assert.IsFalse(pb.contains(new Scientrace.Location(3, 0, 1.5)));
     Assert.IsTrue(pb.contains(new Scientrace.Location(5, 6, 1)));
 }