Tabnine Logo
EdgeShape.dispose
Code IndexAdd Tabnine to your IDE (free)

How to use
dispose
method
in
com.badlogic.gdx.physics.box2d.EdgeShape

Best Java code snippets using com.badlogic.gdx.physics.box2d.EdgeShape.dispose (Showing top 18 results out of 315)

origin: libgdx/libgdx

private Body createEdge (BodyType type, float x1, float y1, float x2, float y2, float density) {
  BodyDef def = new BodyDef();
  def.type = type;
  Body box = world.createBody(def);
  EdgeShape poly = new EdgeShape();
  poly.set(new Vector2(0, 0), new Vector2(x2 - x1, y2 - y1));
  box.createFixture(poly, density);
  box.setTransform(x1, y1, 0);
  poly.dispose();
  return box;
}
origin: libgdx/libgdx

Body ground = world.createBody(bd);
ground.createFixture(fd);
shape.dispose();
origin: libgdx/libgdx

@Override
protected void createWorld (World world) {
  {
    BodyDef bd = new BodyDef();
    Body ground = world.createBody(bd);
    EdgeShape shape = new EdgeShape();
    shape.set(new Vector2(-40, 0), new Vector2(40, 0));
    ground.createFixture(shape, 0);
    shape.dispose();
  }
  {
    CircleShape shape = new CircleShape();
    shape.setRadius(1.0f);
    for (int i = 0; i < e_count; i++) {
      BodyDef bd = new BodyDef();
      bd.type = BodyType.DynamicBody;
      bd.position.set(0, 4.0f + 3.0f * i);
      Body body = world.createBody(bd);
      body.createFixture(shape, 1.0f);
    }
    shape.dispose();
  }
}
origin: libgdx/libgdx

shape.set(new Vector2(-40, 0), new Vector2(40, 0));
ground.createFixture(shape, 0.0f);
shape.dispose();
origin: libgdx/libgdx

shape.set(new Vector2(-40, 0), new Vector2(40, 0));
ground.createFixture(shape, 0);
shape.dispose();
origin: libgdx/libgdx

shape.dispose();
origin: libgdx/libgdx

shape.set(new Vector2(-40, 0), new Vector2(40, 0));
ground.createFixture(shape, 0.0f);
shape.dispose();
origin: libgdx/libgdx

shape.dispose();
origin: libgdx/libgdx

@Override
protected void createWorld (World world) {
  {
    BodyDef bd = new BodyDef();
    bd.position.set(0, 0);
    Body body = world.createBody(bd);
    EdgeShape shape = new EdgeShape();
    shape.set(new Vector2(-10, 0), new Vector2(10, 0));
    body.createFixture(shape, 0);
    shape.dispose();
    PolygonShape poly = new PolygonShape();
    poly.setAsBox(0.2f, 1.0f, new Vector2(0.5f, 1.0f), 0);
    body.createFixture(poly, 0);
    poly.dispose();
  }
  {
    BodyDef bd = new BodyDef();
    bd.type = BodyType.DynamicBody;
    bd.position.set(0, 20);
    PolygonShape shape = new PolygonShape();
    shape.setAsBox(2, 0.1f);
    m_body = world.createBody(bd);
    m_body.createFixture(shape, 1);
    m_angularVelocity = 33.468121f;
    m_body.setLinearVelocity(new Vector2(0, -100));
    m_body.setAngularVelocity(m_angularVelocity);
    shape.dispose();
  }
}
origin: libgdx/libgdx

shape.set(new Vector2(-20.0f, 0), new Vector2(20.0f, 0f));
ground.createFixture(shape, 0);
shape.dispose();
origin: libgdx/libgdx

shape.set(new Vector2(-20, 0), new Vector2(20, 0));
ground.createFixture(shape, 0);
shape.dispose();
shape.set(new Vector2(-4, 1), new Vector2(-2, 1));
ground.createFixture(shape, 0);
shape.dispose();
shape.set(new Vector2(-1, 5 - d), new Vector2(-1, 3 + d));
ground.createFixture(shape, 0);
shape.dispose();
origin: libgdx/libgdx

shape.set(new Vector2(-20, 0), new Vector2(20, 0));
ground.createFixture(shape, 0);
shape.dispose();
shape.set(new Vector2(-4, 1), new Vector2(-2, 1));
ground.createFixture(shape, 0);
shape.dispose();
shape.set(new Vector2(-1, 5 - d), new Vector2(-1, 3 + d));
ground.createFixture(shape, 0);
shape.dispose();
origin: libgdx/libgdx

fd.shape = shape;
ground.createFixture(fd);
shape.dispose();
origin: libgdx/libgdx

shape.dispose();
origin: libgdx/libgdx

ground.createFixture(sd);
shape.dispose();
origin: libgdx/libgdx

Body ground = world.createBody(bd);
ground.createFixture(fd);
shape.dispose();
origin: libgdx/libgdx

shape.set(new Vector2(-40, 0), new Vector2(40, 0));
ground.createFixture(shape, 0);
shape.dispose();
origin: narfman0/GDXWorld

public static Body createEdge(World world, BodyType type, float x1, float y1, 
    float x2, float y2, float density) {
  synchronized(world){
    BodyDef def = new BodyDef();
    def.type = type;
    Body box = world.createBody(def);
    EdgeShape boxShape = new EdgeShape();		
    boxShape.set(new Vector2(0, 0), new Vector2(x2 - x1, y2 - y1));
    /*Fixture fixture = */box.createFixture(boxShape, density);
    box.setTransform(x1, y1, 0);
    boxShape.dispose();
    return box;
  }
}

com.badlogic.gdx.physics.box2dEdgeShapedispose

Popular methods of EdgeShape

  • <init>
  • set
    Set this as an isolated edge.
  • getVertex1
  • getVertex2
  • jniGetVertex0
  • jniGetVertex1
  • jniGetVertex2
  • jniGetVertex3
  • jniHasVertex0
  • jniHasVertex3
  • jniSet
  • jniSetHasVertex0
  • jniSet,
  • jniSetHasVertex0,
  • jniSetHasVertex3,
  • jniSetVertex0,
  • jniSetVertex3,
  • newEdgeShape,
  • setRadius

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now