Package org.jbox2d.dynamics

Examples of org.jbox2d.dynamics.Body.createFixture()


      BodyDef bd = new BodyDef();
      bd.type = BodyType.DYNAMIC;

      bd.position.set(230.0f, 0.5f);
      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);

      bd.position.set(230.0f, 1.5f);
      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);
View Full Code Here


      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);

      bd.position.set(230.0f, 1.5f);
      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);

      bd.position.set(230.0f, 2.5f);
      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);
View Full Code Here

      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);

      bd.position.set(230.0f, 2.5f);
      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);

      bd.position.set(230.0f, 3.5f);
      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);
View Full Code Here

      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);

      bd.position.set(230.0f, 3.5f);
      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);

      bd.position.set(230.0f, 4.5f);
      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);
    }
View Full Code Here

      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);

      bd.position.set(230.0f, 4.5f);
      body = m_world.createBody(bd);
      body.createFixture(box, 0.5f);
    }

    // Car
    {
      PolygonShape chassis = new PolygonShape();
View Full Code Here

      BodyDef bd = new BodyDef();
      Body ground = getWorld().createBody(bd);

      EdgeShape shape = new EdgeShape();
      shape.set(new Vec2(-40.0f, 0.0f), new Vec2(40.0f, 0.0f));
      ground.createFixture(shape, 0.0f);
    }

    {
      Vec2 vertices[] = new Vec2[3];
      vertices[0] = new Vec2(-0.5f, 0.0f);
View Full Code Here

      BodyDef bd = new BodyDef();
      Body ground = getWorld().createBody(bd);

      EdgeShape shape = new EdgeShape();
      shape.set(new Vec2(-20.0f, 0.0f), new Vec2(20.0f, 0.0f));
      ground.createFixture(shape, 0.0f);
    }

    // Platform
    {
      BodyDef bd = new BodyDef();
View Full Code Here

      bd.position.set(0.0f, 10.0f);
      Body body = getWorld().createBody(bd);

      PolygonShape shape = new PolygonShape();
      shape.setAsBox(3.0f, 0.5f);
      m_platform = body.createFixture(shape, 0.0f);

      m_bottom = 10.0f - 0.5f;
      m_top = 10.0f + 0.5f;
    }
View Full Code Here

      Body body = getWorld().createBody(bd);

      m_radius = 0.5f;
      CircleShape shape = new CircleShape();
      shape.m_radius = m_radius;
      m_character = body.createFixture(shape, 20.0f);

      body.setLinearVelocity(new Vec2(0.0f, -50.0f));

      m_state = State.e_unknown;
    }
View Full Code Here

      EdgeShape shape = new EdgeShape();

      shape.set(v1, v2);
      shape.m_hasVertex3 = true;
      shape.m_vertex3.set(v3);
      ground.createFixture(shape, 0.0f);

      shape.set(v2, v3);
      shape.m_hasVertex0 = true;
      shape.m_hasVertex3 = true;
      shape.m_vertex0.set(v1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.