BEPUphysics.Constraints.Collision.ContactManifoldConstraint.UpdateMaterialProperties C# (CSharp) Méthode

UpdateMaterialProperties() public méthode

Updates the material properties associated with the constraint.
public UpdateMaterialProperties ( BEPUphysics.Materials.Material materialA, BEPUphysics.Materials.Material materialB ) : void
materialA BEPUphysics.Materials.Material Material associated with the first entity of the pair.
materialB BEPUphysics.Materials.Material Material associated with the second entity of the pair.
Résultat void
        public void UpdateMaterialProperties(Material materialA, Material materialB)
        {
            if (materialA != null && materialB != null)
                MaterialManager.GetInteractionProperties(materialA, materialB, out materialInteraction);
            else if (materialA == null && materialB != null)
            {
                materialInteraction.KineticFriction = materialB.kineticFriction;
                materialInteraction.StaticFriction = materialB.staticFriction;
                materialInteraction.Bounciness = materialB.bounciness;
            }
            else if (materialA != null)
            {
                materialInteraction.KineticFriction = materialA.kineticFriction;
                materialInteraction.StaticFriction = materialA.staticFriction;
                materialInteraction.Bounciness = materialA.bounciness;
            }
            else
            {
                materialInteraction.KineticFriction = 0;
                materialInteraction.StaticFriction = 0;
                materialInteraction.Bounciness = 0;
            }
        }