Tabnine Logo
WorldManifold.getPoints
Code IndexAdd Tabnine to your IDE (free)

How to use
getPoints
method
in
com.badlogic.gdx.physics.box2d.WorldManifold

Best Java code snippets using com.badlogic.gdx.physics.box2d.WorldManifold.getPoints (Showing top 7 results out of 315)

origin: libgdx/libgdx

private void drawContact (Contact contact) {
  WorldManifold worldManifold = contact.getWorldManifold();
  if (worldManifold.getNumberOfContactPoints() == 0) return;
  Vector2 point = worldManifold.getPoints()[0];
  renderer.point(point.x, point.y, 0);
}
origin: libgdx/libgdx

private void drawContact (Contact contact) {
  WorldManifold worldManifold = contact.getWorldManifold();
  if (worldManifold.getNumberOfContactPoints() == 0) return;
  Vector2 point = worldManifold.getPoints()[0];
  renderer.setColor(getColorByBody(contact.getFixtureA().getBody()));
  renderer.point(point.x, point.y, 0);
}
origin: libgdx/libgdx

private boolean isPlayerGrounded (float deltaTime) {
  groundedPlatform = null;
  Array<Contact> contactList = world.getContactList();
  for (int i = 0; i < contactList.size; i++) {
    Contact contact = contactList.get(i);
    if (contact.isTouching()
      && (contact.getFixtureA() == playerSensorFixture || contact.getFixtureB() == playerSensorFixture)) {
      Vector2 pos = player.getPosition();
      WorldManifold manifold = contact.getWorldManifold();
      boolean below = true;
      for (int j = 0; j < manifold.getNumberOfContactPoints(); j++) {
        below &= (manifold.getPoints()[j].y < pos.y - 1.5f);
      }
      if (below) {
        if (contact.getFixtureA().getUserData() != null && contact.getFixtureA().getUserData().equals("p")) {
          groundedPlatform = (Platform)contact.getFixtureA().getBody().getUserData();
        }
        if (contact.getFixtureB().getUserData() != null && contact.getFixtureB().getUserData().equals("p")) {
          groundedPlatform = (Platform)contact.getFixtureB().getBody().getUserData();
        }
        return true;
      }
      return false;
    }
  }
  return false;
}
origin: libgdx/libgdx

int numContactPoints = manifold.getNumberOfContactPoints();
for (int j = 0; j < numContactPoints; j++) {
  Vector2 point = manifold.getPoints()[j];
  renderer.point(point.x, point.y, 0);
origin: com.badlogicgames.gdx/gdx-box2d

private void drawContact (Contact contact) {
  WorldManifold worldManifold = contact.getWorldManifold();
  if (worldManifold.getNumberOfContactPoints() == 0) return;
  Vector2 point = worldManifold.getPoints()[0];
  renderer.setColor(getColorByBody(contact.getFixtureA().getBody()));
  renderer.point(point.x, point.y, 0);
}
origin: stackoverflow.com

int numPoints = contact.getWorldManifold().getNumberOfContactPoints();
for(int i = 0; i < numPoints; i++){
  Vector2 vector2 = ballBody.getLinearVelocityFromWorldPoint(worldManiFold.getPoints()[i]);
  if(vector2.y < 0) {
    contact.setEnabled(false);
origin: manuelbua/uracer-kotd

float ml = car.getCarModel().length;
float half_ml = ml * 0.5f;
Vector2[] pts = contact.getWorldManifold().getPoints();
com.badlogic.gdx.physics.box2dWorldManifoldgetPoints

Javadoc

Returns the contact points of this manifold. Use getNumberOfContactPoints to determine how many contact points there are (0,1 or 2)

Popular methods of WorldManifold

  • getNumberOfContactPoints

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • Menu (java.awt)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Table (org.hibernate.mapping)
    A relational table
  • Top plugins for WebStorm
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