Package com.badlogic.gdx.physics.box2d

Examples of com.badlogic.gdx.physics.box2d.Filter


    final FixtureDef fixtureDef = new FixtureDef();
    fixtureDef.density = pDensity;
    fixtureDef.restitution = pElasticity;
    fixtureDef.friction = pFriction;
    fixtureDef.isSensor = pSensor;
    final Filter filter = fixtureDef.filter;
    filter.categoryBits = pCategoryBits;
    filter.maskBits = pMaskBits;
    filter.groupIndex = pGroupIndex;
    return fixtureDef;
  }
View Full Code Here


      return fraction;
    }
  };

  final boolean contactFilter(Fixture fixtureB) {
    Filter filterB = fixtureB.getFilterData();

    if (filterA.groupIndex == filterB.groupIndex && filterA.groupIndex != 0)
      return filterA.groupIndex > 0;

    return (filterA.maskBits & filterB.categoryBits) != 0
View Full Code Here

   * @param groupIndex
   * @param maskBits
   */
  static public void setContactFilter(short categoryBits, short groupIndex,
      short maskBits) {
    filterA = new Filter();
    filterA.categoryBits = categoryBits;
    filterA.groupIndex = groupIndex;
    filterA.maskBits = maskBits;
  }
View Full Code Here

      return fraction;
    }
  };

  boolean contactFilter(Fixture fixtureB) {
    Filter filterB = fixtureB.getFilterData();

    if (filterA.groupIndex != 0 &&
      filterA.groupIndex == filterB.groupIndex)
      return filterA.groupIndex > 0;
View Full Code Here

   * @param groupIndex   - see {@link Filter#groupIndex}
   * @param maskBits     - see {@link Filter#maskBits}
   */
  static public void setContactFilter(short categoryBits, short groupIndex,
      short maskBits) {
    filterA = new Filter();
    filterA.categoryBits = categoryBits;
    filterA.groupIndex = groupIndex;
    filterA.maskBits = maskBits;
  }
View Full Code Here

      return fraction;
    }
  };

  final boolean contactFilter(Fixture fixtureB) {
    Filter filterB = fixtureB.getFilterData();

    if (filterA.groupIndex == filterB.groupIndex && filterA.groupIndex != 0)
      return filterA.groupIndex > 0;

    return (filterA.maskBits & filterB.categoryBits) != 0
View Full Code Here

   * @param groupIndex
   * @param maskBits
   */
  static public void setContactFilter(short categoryBits, short groupIndex,
      short maskBits) {
    filterA = new Filter();
    filterA.categoryBits = categoryBits;
    filterA.groupIndex = groupIndex;
    filterA.maskBits = maskBits;
  }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.physics.box2d.Filter

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.