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

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

Best Java code snippets using org.jbox2d.dynamics.contacts.Contact.getFixtureA (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();
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

edge = edge.next;
Fixture fixtureA = c.getFixtureA();
Fixture fixtureB = c.getFixtureB();
origin: libgdx/libgdx

while (edge != null) {
 if (edge.other == bodyA) {
  Fixture fA = edge.contact.getFixtureA();
  Fixture fB = edge.contact.getFixtureB();
  int iA = edge.contact.getChildIndexA();
fixtureA = c.getFixtureA();
fixtureB = c.getFixtureB();
indexA = c.getChildIndexA();
origin: libgdx/libgdx

Fixture fixtureA = c.getFixtureA();
Fixture fixtureB = c.getFixtureB();
int indexA = c.getChildIndexA();
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

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

color.set(0.3f, 0.9f, 0.9f);
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);
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();
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

edge = edge.next;
Fixture fixtureA = c.getFixtureA();
Fixture fixtureB = c.getFixtureB();
origin: jbox2d/jbox2d

while (edge != null) {
 if (edge.other == bodyA) {
  Fixture fA = edge.contact.getFixtureA();
  Fixture fB = edge.contact.getFixtureB();
  int iA = edge.contact.getChildIndexA();
fixtureA = c.getFixtureA();
fixtureB = c.getFixtureB();
indexA = c.getChildIndexA();
origin: jbox2d/jbox2d

Fixture fixtureA = c.getFixtureA();
Fixture fixtureB = c.getFixtureB();
int indexA = c.getChildIndexA();
origin: jbox2d/jbox2d

color.set(0.3f, 0.9f, 0.9f);
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);
org.jbox2d.dynamics.contactsContactgetFixtureA

Javadoc

Get the first fixture in this contact.

Popular methods of 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
  • 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

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Join (org.hibernate.mapping)
  • CodeWhisperer alternatives
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