Package org.jbox2d.collision

Examples of org.jbox2d.collision.Manifold


      final Shape shapeB = fixtureB.getShape();
      final float radiusA = shapeA.m_radius;
      final float radiusB = shapeB.m_radius;
      final Body bodyA = fixtureA.getBody();
      final Body bodyB = fixtureB.getBody();
      final Manifold manifold = contact.getManifold();

      final float friction = Settings.mixFriction(fixtureA.getFriction(), fixtureB.getFriction());
      final float restitution = Settings.mixRestitution(fixtureA.getRestitution(), fixtureB.getRestitution());

      final Vec2 vA = bodyA.m_linearVelocity;
View Full Code Here


  }
 
  public void storeImpulses(){
    for( int i=0; i<m_constraintCount; i++){
      final ContactConstraint c = m_constraints[i];
      final Manifold m = c.manifold;
     
      for(int j=0; j< c.pointCount; j++){
        m.points[j].normalImpulse = c.points[j].normalImpulse;
        m.points[j].tangentImpulse = c.points[j].tangentImpulse;
      }
View Full Code Here

      Shape shapeB = fixtureB.getShape();
      float radiusA = shapeA.m_radius;
      float radiusB = shapeB.m_radius;
      Body bodyA = fixtureA.getBody();
      Body bodyB = fixtureB.getBody();
      Manifold manifold = contact.getManifold();
     
      assert(manifold.pointCount > 0);
     
//      m_constraints[i] = new TOIConstraint();
      TOIConstraint constraint = m_constraints[i];
View Full Code Here

  protected Contact(IWorldPool argPool) {
    m_fixtureA = null;
    m_fixtureB = null;
    m_nodeA = new ContactEdge();
    m_nodeB = new ContactEdge();
    m_manifold = new Manifold();
    pool = argPool;
  }
View Full Code Here

  // djm pooling
  private static final TLManifold tloldManifold = new TLManifold();

  public void update(ContactListener listener) {

    Manifold oldManifold = tloldManifold.get();
    oldManifold.set(m_manifold);

    // Re-enable this contact.
    m_flags |= ENABLED_FLAG;

    boolean touching = false;
View Full Code Here

      final Shape shapeB = fixtureB.getShape();
      final float radiusA = shapeA.m_radius;
      final float radiusB = shapeB.m_radius;
      final Body bodyA = fixtureA.getBody();
      final Body bodyB = fixtureB.getBody();
      final Manifold manifold = contact.getManifold();

      int pointCount = manifold.pointCount;
      assert (pointCount > 0);

      ContactVelocityConstraint vc = m_velocityConstraints[i];
View Full Code Here

      ContactVelocityConstraint vc = m_velocityConstraints[i];
      ContactPositionConstraint pc = m_positionConstraints[i];

      float radiusA = pc.radiusA;
      float radiusB = pc.radiusB;
      Manifold manifold = m_contacts[vc.contactIndex].getManifold();

      int indexA = vc.indexA;
      int indexB = vc.indexB;

      float mA = vc.invMassA;
View Full Code Here

  }

  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;
      }
View Full Code Here

  protected Contact (IWorldPool argPool) {
    m_fixtureA = null;
    m_fixtureB = null;
    m_nodeA = new ContactEdge();
    m_nodeB = new ContactEdge();
    m_manifold = new Manifold();
    pool = argPool;
  }
View Full Code Here

      final Shape shapeB = fixtureB.getShape();
      final float radiusA = shapeA.m_radius;
      final float radiusB = shapeB.m_radius;
      final Body bodyA = fixtureA.getBody();
      final Body bodyB = fixtureB.getBody();
      final Manifold manifold = contact.getManifold();

      int pointCount = manifold.pointCount;
      assert (pointCount > 0);

      ContactVelocityConstraint vc = m_velocityConstraints[i];
View Full Code Here

TOP

Related Classes of org.jbox2d.collision.Manifold

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.