BEPUphysics.NarrowPhaseSystems.Pairs.MobileMeshTerrainPairHandler.UpdateContainedPairs C# (CSharp) Метод

UpdateContainedPairs() защищенный Метод

protected UpdateContainedPairs ( float dt ) : void
dt float
Результат void
        protected override void UpdateContainedPairs(float dt)
        {
            var overlappedElements = CommonResources.GetIntList();
            BoundingBox localBoundingBox;

            Vector3 sweep;
            Vector3.Multiply(ref mobileMesh.entity.linearVelocity, dt, out sweep);
            mobileMesh.Shape.GetSweptLocalBoundingBox(ref mobileMesh.worldTransform, ref mesh.worldTransform, ref sweep, out localBoundingBox);
            mesh.Shape.GetOverlaps(localBoundingBox, overlappedElements);
            for (int i = 0; i < overlappedElements.Count; i++)
            {
                TryToAdd(overlappedElements.Elements[i]);
            }

            CommonResources.GiveBack(overlappedElements);

        }