Codota Logo
Contact.getManifold
Code IndexAdd Codota to your IDE (free)

How to use
getManifold
method
in
org.jbox2d.dynamics.contacts.Contact

Best Java code snippets using org.jbox2d.dynamics.contacts.Contact.getManifold (Showing top 20 results out of 315)

  • Common ways to obtain Contact
private void myMethod () {
Contact c =
  • Codota IconIWorldPool argPool;new CircleContact(argPool)
  • Codota IconIWorldPool argPool;new PolygonContact(argPool)
  • Codota IconIWorldPool argPool;new PolygonAndCircleContact(argPool)
  • Smart code suggestions by Codota
}
origin: libgdx/libgdx

public void storeImpulses() {
 for (int i = 0; i < m_count; i++) {
  final ContactVelocityConstraint vc = m_velocityConstraints[i];
  final Manifold manifold = m_contacts[vc.contactIndex].getManifold();
  for (int j = 0; j < vc.pointCount; j++) {
   manifold.points[j].normalImpulse = vc.points[j].normalImpulse;
   manifold.points[j].tangentImpulse = vc.points[j].tangentImpulse;
  }
 }
}
origin: libgdx/libgdx

public WorldManifold getWorldManifold () {
  contact.getWorldManifold(worldManifold2);
  int numContactPoints = contact.getManifold().pointCount;
  worldManifold.numContactPoints = numContactPoints;
  worldManifold.normal.set(worldManifold2.normal.x, worldManifold2.normal.y);
  for (int i = 0; i < worldManifold.points.length; i++) {
    worldManifold.points[i] = new Vector2(worldManifold2.points[i].x, worldManifold2.points[i].y);
  }
  return worldManifold;
}
origin: libgdx/libgdx

Manifold manifold = m_contacts[vc.contactIndex].getManifold();
origin: jbox2d/jbox2d

public void storeImpulses() {
 for (int i = 0; i < m_count; i++) {
  final ContactVelocityConstraint vc = m_velocityConstraints[i];
  final Manifold manifold = m_contacts[vc.contactIndex].getManifold();
  for (int j = 0; j < vc.pointCount; j++) {
   manifold.points[j].normalImpulse = vc.points[j].normalImpulse;
   manifold.points[j].tangentImpulse = vc.points[j].tangentImpulse;
  }
 }
}
origin: libgdx/libgdx

final Body bodyA = fixtureA.getBody();
final Body bodyB = fixtureB.getBody();
final Manifold manifold = contact.getManifold();
origin: jbox2d/jbox2d

@Override
public void postSolve(Contact contact, ContactImpulse impulse) {
 if (m_broke) {
  // The body already broke.
  return;
 }
 // Should the body break?
 int count = contact.getManifold().pointCount;
 float maxImpulse = 0.0f;
 for (int i = 0; i < count; ++i) {
  maxImpulse = MathUtils.max(maxImpulse, impulse.normalImpulses[i]);
 }
 if (maxImpulse > 40.0f) {
  // Flag the body for breaking.
  m_break = true;
 }
}
origin: jbox2d/jbox2d

 public void preSolve(Contact contact, Manifold oldManifold) {
  Manifold manifold = contact.getManifold();

  if (manifold.pointCount == 0) {
   return;
  }

  Fixture fixtureA = contact.getFixtureA();
  Fixture fixtureB = contact.getFixtureB();

  Collision.getPointStates(state1, state2, oldManifold, manifold);

  contact.getWorldManifold(worldManifold);

  for (int i = 0; i < manifold.pointCount && pointCount < MAX_CONTACT_POINTS; i++) {
   ContactPoint cp = points[pointCount];
   cp.fixtureA = fixtureA;
   cp.fixtureB = fixtureB;
   cp.position.set(worldManifold.points[i]);
   cp.normal.set(worldManifold.normal);
   cp.state = state2[i];
   cp.normalImpulse = manifold.points[i].normalImpulse;
   cp.tangentImpulse = manifold.points[i].tangentImpulse;
   cp.separation = worldManifold.separations[i];
   ++pointCount;
  }
 }
}
origin: jbox2d/jbox2d

Manifold manifold = m_contacts[vc.contactIndex].getManifold();
origin: com.github.almasb/fxgl-physics

public void storeImpulses() {
  for (int i = 0; i < m_count; i++) {
    final ContactVelocityConstraint vc = m_velocityConstraints[i];
    final Manifold manifold = m_contacts[vc.contactIndex].getManifold();
    for (int j = 0; j < vc.pointCount; j++) {
      manifold.points[j].normalImpulse = vc.points[j].normalImpulse;
      manifold.points[j].tangentImpulse = vc.points[j].tangentImpulse;
    }
  }
}
origin: andmizi/MobikeTags

public void storeImpulses() {
 for (int i = 0; i < m_count; i++) {
  final ContactVelocityConstraint vc = m_velocityConstraints[i];
  final Manifold manifold = m_contacts[vc.contactIndex].getManifold();
  for (int j = 0; j < vc.pointCount; j++) {
   manifold.points[j].normalImpulse = vc.points[j].normalImpulse;
   manifold.points[j].tangentImpulse = vc.points[j].tangentImpulse;
  }
 }
}
origin: org.jbox2d/jbox2d-library

public void storeImpulses() {
 for (int i = 0; i < m_count; i++) {
  final ContactVelocityConstraint vc = m_velocityConstraints[i];
  final Manifold manifold = m_contacts[vc.contactIndex].getManifold();
  for (int j = 0; j < vc.pointCount; j++) {
   manifold.points[j].normalImpulse = vc.points[j].normalImpulse;
   manifold.points[j].tangentImpulse = vc.points[j].tangentImpulse;
  }
 }
}
origin: jbox2d/jbox2d

final Body bodyA = fixtureA.getBody();
final Body bodyB = fixtureB.getBody();
final Manifold manifold = contact.getManifold();
origin: org.jbox2d/jbox2d-testbed

@Override
public void postSolve(Contact contact, ContactImpulse impulse) {
 if (m_broke) {
  // The body already broke.
  return;
 }
 // Should the body break?
 int count = contact.getManifold().pointCount;
 float maxImpulse = 0.0f;
 for (int i = 0; i < count; ++i) {
  maxImpulse = MathUtils.max(maxImpulse, impulse.normalImpulses[i]);
 }
 if (maxImpulse > 40.0f) {
  // Flag the body for breaking.
  m_break = true;
 }
}
origin: org.jbox2d/jbox2d-testbed

public void preSolve(Contact contact, Manifold oldManifold) {
 Manifold manifold = contact.getManifold();
 if (manifold.pointCount == 0) {
  return;
 }
 Fixture fixtureA = contact.getFixtureA();
 Fixture fixtureB = contact.getFixtureB();
 Collision.getPointStates(state1, state2, oldManifold, manifold);
 contact.getWorldManifold(worldManifold);
 for (int i = 0; i < manifold.pointCount && pointCount < MAX_CONTACT_POINTS; i++) {
  ContactPoint cp = points[pointCount];
  cp.fixtureA = fixtureA;
  cp.fixtureB = fixtureB;
  cp.position.set(worldManifold.points[i]);
  cp.normal.set(worldManifold.normal);
  cp.state = state2[i];
  cp.normalImpulse = manifold.points[i].normalImpulse;
  cp.tangentImpulse = manifold.points[i].tangentImpulse;
  ++pointCount;
 }
}
origin: andmizi/MobikeTags

Manifold manifold = m_contacts[vc.contactIndex].getManifold();
origin: com.github.almasb/fxgl-physics

Manifold manifold = m_contacts[vc.contactIndex].getManifold();
origin: org.jbox2d/jbox2d-library

final Body bodyA = fixtureA.getBody();
final Body bodyB = fixtureB.getBody();
final Manifold manifold = contact.getManifold();
origin: andmizi/MobikeTags

final Body bodyA = fixtureA.getBody();
final Body bodyB = fixtureB.getBody();
final Manifold manifold = contact.getManifold();
origin: com.github.almasb/fxgl-physics

final Body bodyA = fixtureA.getBody();
final Body bodyB = fixtureB.getBody();
final Manifold manifold = contact.getManifold();
origin: org.jbox2d/jbox2d-library

Manifold manifold = m_contacts[vc.contactIndex].getManifold();
org.jbox2d.dynamics.contactsContactgetManifold

Javadoc

Get the contact manifold. Do not set the point count to zero. Instead call Disable.

Popular methods of Contact

  • getFixtureA
    Get the first fixture in this contact.
  • getFixtureB
    Get the second fixture in this contact.
  • setEnabled
    Enable/disable this contact. This can be used inside the pre-solve contact listener. The contact is
  • evaluate
  • flagForFiltering
    Flag this contact for filtering. Filtering will occur the next time step.
  • getChildIndexA
  • getChildIndexB
  • getNext
    Get the next contact in the world's contact list.
  • init
    initialization for pooling
  • isEnabled
    Has this contact been disabled?
  • isTouching
    Is this contact touching
  • mixFriction
    Friction mixing law. The idea is to allow either fixture to drive the restitution to zero. For examp
  • isTouching,
  • mixFriction,
  • mixRestitution,
  • update,
  • getWorldManifold,
  • setTangentSpeed,
  • getFriction,
  • getRestitution,
  • getTangentSpeed

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Reference (javax.naming)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now