Tabnine Logo
Contact.getFixtureB
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: libgdx/libgdx

/**
 * Call this if you want to establish collision that was previously disabled by
 * ContactFilter::ShouldCollide.
 */
public void refilter() {
 if (m_body == null) {
  return;
 }
 // Flag associated contacts for filtering.
 ContactEdge edge = m_body.getContactList();
 while (edge != null) {
  Contact contact = edge.contact;
  Fixture fixtureA = contact.getFixtureA();
  Fixture fixtureB = contact.getFixtureB();
  if (fixtureA == this || fixtureB == this) {
   contact.flagForFiltering();
  }
  edge = edge.next;
 }
 World world = m_body.getWorld();
 if (world == null) {
  return;
 }
 // Touch each proxy so that new pairs may be created
 BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
 for (int i = 0; i < m_proxyCount; ++i) {
  broadPhase.touchProxy(m_proxies[i].proxyId);
 }
}
origin: libgdx/libgdx

public void destroy(Contact c) {
 Fixture fixtureA = c.getFixtureA();
 Fixture fixtureB = c.getFixtureB();
 Body bodyA = fixtureA.getBody();
 Body bodyB = fixtureB.getBody();
origin: libgdx/libgdx

public void pushContact(Contact contact) {
 Fixture fixtureA = contact.getFixtureA();
 Fixture fixtureB = contact.getFixtureB();
 if (contact.m_manifold.pointCount > 0 && !fixtureA.isSensor() && !fixtureB.isSensor()) {
  fixtureA.getBody().setAwake(true);
  fixtureB.getBody().setAwake(true);
 }
 ShapeType type1 = fixtureA.getType();
 ShapeType type2 = fixtureB.getType();
 IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator;
 creator.push(contact);
}
origin: libgdx/libgdx

Fixture fixtureB = c.getFixtureB();
origin: libgdx/libgdx

 if (edge.other == bodyA) {
  Fixture fA = edge.contact.getFixtureA();
  Fixture fB = edge.contact.getFixtureB();
  int iA = edge.contact.getChildIndexA();
  int iB = edge.contact.getChildIndexB();
fixtureB = c.getFixtureB();
indexA = c.getChildIndexA();
indexB = c.getChildIndexB();
origin: libgdx/libgdx

while (c != null) {
 Fixture fixtureA = c.getFixtureA();
 Fixture fixtureB = c.getFixtureB();
 int indexA = c.getChildIndexA();
 int indexB = c.getChildIndexB();
origin: jbox2d/jbox2d

@Override
public void preSolve(Contact contact, Manifold oldManifold) {
 super.preSolve(contact, oldManifold);
 Fixture fixtureA = contact.getFixtureA();
 Fixture fixtureB = contact.getFixtureB();
 if (fixtureA == m_platform || fixtureB == m_platform) {
  contact.setTangentSpeed(5.0f);
 }
}
origin: libgdx/libgdx

 } else {
  Fixture fA = c.getFixtureA();
  Fixture fB = c.getFixtureB();
Fixture fB = minContact.getFixtureB();
Body bA = fA.getBody();
Body bB = fB.getBody();
origin: libgdx/libgdx

for (Contact c = m_contactManager.m_contactList; c != null; c = c.getNext()) {
 Fixture fixtureA = c.getFixtureA();
 Fixture fixtureB = c.getFixtureB();
 fixtureA.getAABB(c.getChildIndexA()).getCenterToOut(cA);
 fixtureB.getAABB(c.getChildIndexB()).getCenterToOut(cB);
origin: jbox2d/jbox2d

public void beginContact(Contact contact) {
 Fixture fixtureA = contact.getFixtureA();
 Fixture fixtureB = contact.getFixtureB();
 if (fixtureA == m_sensor) {
  Object userData = fixtureB.getBody().getUserData();
  if (userData != null) {
   ((BoolWrapper) userData).tf = true;
  }
 }
 if (fixtureB == m_sensor) {
  Object userData = fixtureA.getBody().getUserData();
  if (userData != null) {
   ((BoolWrapper) userData).tf = true;
  }
 }
}
origin: jbox2d/jbox2d

public void endContact(Contact contact) {
 Fixture fixtureA = contact.getFixtureA();
 Fixture fixtureB = contact.getFixtureB();
 if (fixtureA == m_sensor) {
  Object userData = fixtureB.getBody().getUserData();
  if (userData != null) {
   ((BoolWrapper) userData).tf = false;
  }
 }
 if (fixtureB == m_sensor) {
  Object userData = fixtureA.getBody().getUserData();
  if (userData != null) {
   ((BoolWrapper) userData).tf = false;
  }
 }
}
origin: jbox2d/jbox2d

 @Override
 public void preSolve(Contact contact, Manifold oldManifold) {
  super.preSolve(contact, oldManifold);

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

  if (fixtureA != m_platform && fixtureA != m_character) {
   return;
  }

  if (fixtureB != m_character && fixtureB != m_character) {
   return;
  }

  Vec2 position = m_character.getBody().getPosition();

  if (position.y < m_top + m_radius - 3.0f * Settings.linearSlop) {
   contact.setEnabled(false);
  }
 }
}
origin: jbox2d/jbox2d

/**
 * Call this if you want to establish collision that was previously disabled by
 * ContactFilter::ShouldCollide.
 */
public void refilter() {
 if (m_body == null) {
  return;
 }
 // Flag associated contacts for filtering.
 ContactEdge edge = m_body.getContactList();
 while (edge != null) {
  Contact contact = edge.contact;
  Fixture fixtureA = contact.getFixtureA();
  Fixture fixtureB = contact.getFixtureB();
  if (fixtureA == this || fixtureB == this) {
   contact.flagForFiltering();
  }
  edge = edge.next;
 }
 World world = m_body.getWorld();
 if (world == null) {
  return;
 }
 // Touch each proxy so that new pairs may be created
 BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
 for (int i = 0; i < m_proxyCount; ++i) {
  broadPhase.touchProxy(m_proxies[i].proxyId);
 }
}
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

public void destroy(Contact c) {
 Fixture fixtureA = c.getFixtureA();
 Fixture fixtureB = c.getFixtureB();
 Body bodyA = fixtureA.getBody();
 Body bodyB = fixtureB.getBody();
origin: jbox2d/jbox2d

public void pushContact(Contact contact) {
 Fixture fixtureA = contact.getFixtureA();
 Fixture fixtureB = contact.getFixtureB();
 if (contact.m_manifold.pointCount > 0 && !fixtureA.isSensor() && !fixtureB.isSensor()) {
  fixtureA.getBody().setAwake(true);
  fixtureB.getBody().setAwake(true);
 }
 ShapeType type1 = fixtureA.getType();
 ShapeType type2 = fixtureB.getType();
 IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator;
 creator.push(contact);
}
origin: jbox2d/jbox2d

Fixture fixtureB = c.getFixtureB();
origin: jbox2d/jbox2d

 if (edge.other == bodyA) {
  Fixture fA = edge.contact.getFixtureA();
  Fixture fB = edge.contact.getFixtureB();
  int iA = edge.contact.getChildIndexA();
  int iB = edge.contact.getChildIndexB();
fixtureB = c.getFixtureB();
indexA = c.getChildIndexA();
indexB = c.getChildIndexB();
origin: jbox2d/jbox2d

while (c != null) {
 Fixture fixtureA = c.getFixtureA();
 Fixture fixtureB = c.getFixtureB();
 int indexA = c.getChildIndexA();
 int indexB = c.getChildIndexB();
origin: jbox2d/jbox2d

for (Contact c = m_contactManager.m_contactList; c != null; c = c.getNext()) {
 Fixture fixtureA = c.getFixtureA();
 Fixture fixtureB = c.getFixtureB();
 fixtureA.getAABB(c.getChildIndexA()).getCenterToOut(cA);
 fixtureB.getAABB(c.getChildIndexB()).getCenterToOut(cB);
org.jbox2d.dynamics.contactsContactgetFixtureB

Javadoc

Get the second fixture in this contact.

Popular methods of Contact

  • getFixtureA
    Get the first fixture in this contact.
  • setEnabled
    Enable/disable this contact. This can be used inside the pre-solve contact listener. The contact is
  • getManifold
    Get the contact manifold. Do not set the point count to zero. Instead call Disable.
  • 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

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Kernel (java.awt.image)
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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