Package eas.simulation.spatial.sim2D.physicalSimulation.physicsEngine

Examples of eas.simulation.spatial.sim2D.physicalSimulation.physicsEngine.CollisionEvent


            Arbiter<AgentType> arb = arbiters.get(i);
           
            if (arb.concerns(body)) {
                for (int j=0;j<arb.getNumContacts();j++) {
                    Contact contact = arb.getContact(j);
                    CollisionEvent event = new CollisionEvent(0, arb.getBody1(), arb.getBody2(), contact.getPosition(), contact.getNormal(), contact.getSeparation());
                   
                    collisions.add(event);
                }
            }
        }
View Full Code Here


    private void notifyCollision(AgentType body1, AgentType body2, ROVector2f point, ROVector2f normal, float depth) {
        if (listeners.size() == 0) {
            return;
        }
       
        CollisionEvent event = new CollisionEvent(totalTime,body1,body2,point,normal,depth);
   
        for (int i=0;i<listeners.size();i++) {
            (listeners.get(i)).collisionOccured(event);
        }
    }
View Full Code Here

TOP

Related Classes of eas.simulation.spatial.sim2D.physicalSimulation.physicsEngine.CollisionEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.