Package net.phys2d.raw.collide

Examples of net.phys2d.raw.collide.Collider


   * @param dt The amount of time that's passed since we last checked collision
   * @return The number of points at which the two bodies contact
   */
  public static int collide(Contact[] contacts, Body bodyA, Body bodyB, float dt)
  {
    Collider collider;
    try {
      collider = collFactory.createCollider(bodyA, bodyB);
    } catch (ColliderUnavailableException e) {
      System.out.println(e.getMessage()
          + "\n Ignoring any possible collision between the bodies in question");
      return 0;
    }
   
    return collider.collide(contacts, bodyA, bodyB);
  }
View Full Code Here


{
  private static ColliderFactory collFactory = new ColliderFactory();

  public static strictfp int collide(Contact[] paramArrayOfContact, Body paramBody1, Body paramBody2, float paramFloat)
  {
    Collider localCollider;
    try
    {
      localCollider = collFactory.createCollider(paramBody1, paramBody2);
    }
    catch (ColliderUnavailableException localColliderUnavailableException)
    {
      System.out.println(localColliderUnavailableException.getMessage() + "\n Ignoring any possible collision between the bodies in question");
      return 0;
    }
    return localCollider.collide(paramArrayOfContact, paramBody1, paramBody2);
  }
View Full Code Here

TOP

Related Classes of net.phys2d.raw.collide.Collider

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.