Esempio n. 1
0
 public void instantaniousContact(ref CollisionInformation collisionInformation)
 {
     foreach (ICollisionHandler iCollisionHandler in collisionHandlers)
     {
         iCollisionHandler.instantaniousContact(ref collisionInformation);
     }
 }
Esempio n. 2
0
 // normal is normalized
 public void endContact(ref CollisionInformation collisionInformation)
 {
     foreach (ICollisionHandler iCollisionHandler in collisionHandlers)
     {
         iCollisionHandler.endContact(ref collisionInformation);
     }
 }
Esempio n. 3
0
        // for the case when no begin/end information is accesible or if the engine is configured this way that it doesn't take track of begin/end of a contact
        public void instantaniousParticleContact(ref CollisionInformation collisionInformation, out EnumParticleCollisionResponse particleResponse)
        {
            EnumParticleCollisionResponse?nonneutralParticleResponse = null;

            foreach (ICollisionHandler iCollisionHandler in collisionHandlers)
            {
                EnumParticleCollisionResponse calleeParticleResponse;
                iCollisionHandler.instantaniousParticleContact(ref collisionInformation, out calleeParticleResponse);
                if (calleeParticleResponse != EnumParticleCollisionResponse.NEUTRAL)
                {
                    nonneutralParticleResponse = calleeParticleResponse;
                }
            }

            particleResponse = nonneutralParticleResponse == null ? EnumParticleCollisionResponse.REFLECT : nonneutralParticleResponse.Value;
        }