BEPUphysics.NarrowPhaseSystems.Pairs.CompoundTerrainPairHandler.UpdateContainedPairs C# (CSharp) Méthode

UpdateContainedPairs() protected méthode

protected UpdateContainedPairs ( ) : void
Résultat void
        protected override void UpdateContainedPairs()
        {           
            //Could go other way; get triangles in mesh that overlap the compound.
            //Could be faster sometimes depending on the way it's set up.
            var overlappedElements = PhysicsResources.GetCompoundChildList();
            compoundInfo.hierarchy.Tree.GetOverlaps(terrain.boundingBox, overlappedElements);
            for (int i = 0; i < overlappedElements.Count; i++)
            {
                TryToAdd(overlappedElements.Elements[i].CollisionInformation, terrain, overlappedElements.Elements[i].Material, terrain.Material);

            }

            PhysicsResources.GiveBack(overlappedElements);
        }