示例#1
0
        public void ConstructorSingle_MinMax(float3[] vertices, float3 min, float3 max)
        {
            var actual = new OBBf(vertices);

            for (var i = 0; i < 3; i++)
            {
                Assert.Equal(min[i], actual.Min[i], fPrecision);
                Assert.Equal(max[i], actual.Max[i], fPrecision);
            }
        }
示例#2
0
        public void IntersectsOBBf_IsFalse()
        {
            var obb = new OBBf(new float3[3] {
                new float3(0, 0, 0), new float3(4, 0, 0), new float3(2, 5, 5)
            });
            var plane = new PlaneF()
            {
                A = 1, B = 0, C = 0, D = 5
            };

            Assert.False(plane.Intersects(obb));
        }
示例#3
0
 public void InsideOrIntersectingOBBf_IsTrue(PlaneF plane, OBBf obb)
 {
     Assert.True(plane.InsideOrIntersecting(obb));
 }