BEPUphysics.NarrowPhaseSystems.Pairs.StaticGroupMobileMeshPairHandler.UpdateContainedPairs C# (CSharp) Method

UpdateContainedPairs() protected method

protected UpdateContainedPairs ( ) : void
return void
        protected override void UpdateContainedPairs()
        {
            var overlappedElements = PhysicsResources.GetCollidableList();
            staticGroup.Shape.CollidableTree.GetOverlaps(mesh.boundingBox, overlappedElements);
            for (int i = 0; i < overlappedElements.Count; i++)
            {
                var staticCollidable = overlappedElements.Elements[i] as StaticCollidable;
                TryToAdd(overlappedElements.Elements[i], mesh, staticCollidable != null ? staticCollidable.Material : staticGroup.Material);
            }

            PhysicsResources.GiveBack(overlappedElements);

        }
StaticGroupMobileMeshPairHandler