Package org.jbox2d.pooling.normal

Examples of org.jbox2d.pooling.normal.DefaultWorldPool


  @Override
  public void runBenchmarkWorld() {
    BroadPhaseStrategy strategy = new DynamicTree();

    world = new World(new Vec2(0.0f, -10.0f), new DefaultWorldPool(100, 10), strategy);
    Body ground = null;
    {
      BodyDef bd = new BodyDef();
      ground = world.createBody(bd);
View Full Code Here


   * Construct a world object.
   *
   * @param gravity the world gravity vector.
   */
  public World(Vec2 gravity) {
    this(gravity, new DefaultWorldPool(WORLD_POOL_SIZE, WORLD_POOL_CONTAINER_SIZE));
  }
View Full Code Here

   * Construct a world object.
   *
   * @param gravity the world gravity vector.
   */
  public World(Vec2 gravity) {
    this(gravity, new DefaultWorldPool(WORLD_POOL_SIZE, WORLD_POOL_CONTAINER_SIZE));
  }
View Full Code Here

   * @param output
   * @param input
   * @return
   */
  public final boolean raycast(final RayCastOutput output, final RayCastInput input) {
    return raycast(output, input, new DefaultWorldPool(4, 4));
  }
View Full Code Here

    benchmark.go();
  }

  public void setupTest(int testNum) {
    World w;
    IWorldPool pool = new DefaultWorldPool(50, 50);
    if (testNum == 0) {
      w = new World(new Vec2(0.0f, -10.0f), pool);
    } else {
      w = new World(new Vec2(0, -10), pool, new DynamicTreeFlatNodes());
    }
View Full Code Here

  private Profile m_profile;

  private ContactRegister[][] contactStacks = new ContactRegister[ShapeType.values().length][ShapeType.values().length];

  public World (Vec2 gravity) {
    this(gravity, new DefaultWorldPool(WORLD_POOL_SIZE, WORLD_POOL_CONTAINER_SIZE));
  }
View Full Code Here

  /** @deprecated please use {@link #raycast(RayCastOutput, RayCastInput, IWorldPool)} for better performance
   * @param output
   * @param input
   * @return */
  public final boolean raycast (final RayCastOutput output, final RayCastInput input) {
    return raycast(output, input, new DefaultWorldPool(4, 4));
  }
View Full Code Here

  /** Construct a world object.
   *
   * @param gravity the world gravity vector. */
  public World (Vec2 gravity) {
    this(gravity, new DefaultWorldPool(WORLD_POOL_SIZE, WORLD_POOL_CONTAINER_SIZE));
  }
View Full Code Here

  /** @deprecated please use {@link #raycast(RayCastOutput, RayCastInput, IWorldPool)} for better performance
   * @param output
   * @param input
   * @return */
  public final boolean raycast (final RayCastOutput output, final RayCastInput input) {
    return raycast(output, input, new DefaultWorldPool(4, 4));
  }
View Full Code Here

    }
    TestbedModel model = new TestbedModel();
    model.setWorldCreator(new WorldCreator() {
      @Override
      public World createWorld(Vec2 gravity) {
        return new World(gravity, new DefaultWorldPool(100, 40), new BroadPhaseJNI());
      }
    });
    final TestbedController controller =
        new TestbedController(model, UpdateBehavior.UPDATE_CALLED, MouseBehavior.NORMAL,
            new TestbedErrorHandler() {
View Full Code Here

TOP

Related Classes of org.jbox2d.pooling.normal.DefaultWorldPool

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.