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

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


        for (int i=0;i<arbiters.size();i++) {
            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


                    if (arbiters.contains(newArb)) {
                        int index = arbiters.indexOf(newArb);
                        Arbiter<AgentType> arb = arbiters.get(index);
                        arb.update(newArb.getContacts(), newArb.getNumContacts());
                    } else {
                        Contact c = newArb.getContact(0);
                       
                        notifyCollision(bi,bj,c.getPosition(),c.getNormal(),c.getSeparation());
                        arbiters.add(newArb);
                        newArb.init();
                    }
                }
                else
View Full Code Here

TOP

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

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.