示例#1
0
        public override void OverlapTest(CollisionFunctor cf, Part partA, Part partB)
        {
            var a = (PolyhedronPart)partA;
            var b = (PlanePart)partB;

            PolyhedronPlane.DoOverlapTest(cf, a, b, 0f);
        }
示例#2
0
        public override void SweptTest(CollisionFunctor cf, Part partA, Part partB, Vector3 delta)
        {
            var a = (PolyhedronPart)partA;
            var b = (PlanePart)partB;

            var   plane = b.Plane;
            float dx;

            Vector3.Dot(ref plane.Normal, ref delta, out dx);
            if (dx > 0f)
            {
                dx = 0f;
            }

            PolyhedronPlane.DoOverlapTest(cf, a, b, -dx);
        }