Package org.jbox2d.collision.shapes

Examples of org.jbox2d.collision.shapes.ChainShape


          for (int i = 0; i < m_count; i++) {
            m_vertices[i].set(poly.m_vertices[i]);
          }
          break;
        case CHAIN:
          final ChainShape chain = (ChainShape) shape;
          assert (0 <= index && index < chain.m_count);

          m_buffer[0] = chain.m_vertices[index];
          if (index + 1 < chain.m_count) {
            m_buffer[1] = chain.m_vertices[index + 1];
View Full Code Here


        m_debugDraw.drawSegment(v1, v2, color);
      }
        break;

      case CHAIN: {
        ChainShape chain = (ChainShape) fixture.getShape();
        int count = chain.m_count;
        Vec2[] vertices = chain.m_vertices;

        Transform.mulToOutUnsafe(xf, vertices[0], v1);
        for (int i = 1; i < count; ++i) {
View Full Code Here

  private final EdgeShape edge = new EdgeShape();

  @Override
  public void evaluate(Manifold manifold, Transform xfA, Transform xfB) {
    ChainShape chain = (ChainShape) m_fixtureA.getShape();
    chain.getChildEdge(edge, m_indexA);
    pool.getCollision().collideEdgeAndCircle(manifold, edge, xfA,
        (CircleShape) m_fixtureB.getShape(), xfB);
  }
View Full Code Here

          for (int i = 0; i < m_count; i++) {
            m_vertices[i].set(poly.m_vertices[i]);
          }
          break;
        case CHAIN:
          final ChainShape chain = (ChainShape) shape;
          assert (0 <= index && index < chain.m_count);

          m_buffer[0] = chain.m_vertices[index];
          if (index + 1 < chain.m_count) {
            m_buffer[1] = chain.m_vertices[index + 1];
View Full Code Here

  private final EdgeShape edge = new EdgeShape();

  @Override
  public void evaluate(Manifold manifold, Transform xfA, Transform xfB) {
    ChainShape chain = (ChainShape) m_fixtureA.getShape();
    chain.getChildEdge(edge, m_indexA);
    pool.getCollision().collideEdgeAndPolygon(manifold, edge, xfA,
        (PolygonShape) m_fixtureB.getShape(), xfB);
  }
View Full Code Here

        Transform.mulToOutUnsafe(xf, edge.m_vertex2, v2);
        m_debugDraw.drawSegment(v1, v2, color);
      }
        break;
      case CHAIN: {
        ChainShape chain = (ChainShape) fixture.getShape();
        int count = chain.m_count;
        Vec2[] vertices = chain.m_vertices;

        Transform.mulToOutUnsafe(xf, vertices[0], v1);
        for (int i = 1; i < count; ++i) {
View Full Code Here

        for (int i = 0; i < m_count; i++) {
          m_vertices[i].set(poly.m_vertices[i]);
        }
        break;
      case CHAIN:
        final ChainShape chain = (ChainShape)shape;
        assert (0 <= index && index < chain.m_count);

        m_buffer[0] = chain.m_vertices[index];
        if (index + 1 < chain.m_count) {
          m_buffer[1] = chain.m_vertices[index + 1];
View Full Code Here

  private final EdgeShape edge = new EdgeShape();

  @Override
  public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {
    ChainShape chain = (ChainShape)m_fixtureA.getShape();
    chain.getChildEdge(edge, m_indexA);
    pool.getCollision().collideEdgeAndCircle(manifold, edge, xfA, (CircleShape)m_fixtureB.getShape(), xfB);
  }
View Full Code Here

  private final EdgeShape edge = new EdgeShape();

  @Override
  public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {
    ChainShape chain = (ChainShape)m_fixtureA.getShape();
    chain.getChildEdge(edge, m_indexA);
    pool.getCollision().collideEdgeAndPolygon(manifold, edge, xfA, (PolygonShape)m_fixtureB.getShape(), xfB);
  }
View Full Code Here

  private final EdgeShape edge = new EdgeShape();

  @Override
  public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {
    ChainShape chain = (ChainShape)m_fixtureA.getShape();
    chain.getChildEdge(edge, m_indexA);
    pool.getCollision().collideEdgeAndCircle(manifold, edge, xfA, (CircleShape)m_fixtureB.getShape(), xfB);
  }
View Full Code Here

TOP

Related Classes of org.jbox2d.collision.shapes.ChainShape

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.