Class ChainShape

java.lang.Object
com.codename1.gaming.physics.box2d.collision.shapes.Shape
com.codename1.gaming.physics.box2d.collision.shapes.ChainShape

public class ChainShape extends Shape
  • Field Details

    • m_vertices

      public Vec2[] m_vertices
    • m_count

      public int m_count
    • m_prevVertex

      public final Vec2 m_prevVertex
    • m_nextVertex

      public final Vec2 m_nextVertex
    • m_hasPrevVertex

      public boolean m_hasPrevVertex
    • m_hasNextVertex

      public boolean m_hasNextVertex
  • Constructor Details

    • ChainShape

      public ChainShape()
  • Method Details

    • getChildCount

      public int getChildCount()
      Specified by:
      getChildCount in class Shape
    • getChildEdge

      public void getChildEdge(EdgeShape edge, int index)
    • testPoint

      public boolean testPoint(Transform xf, Vec2 p)
      Specified by:
      testPoint in class Shape
    • raycast

      public boolean raycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex)
      Specified by:
      raycast in class Shape
    • computeAABB

      public void computeAABB(AABB aabb, Transform xf, int childIndex)
      Specified by:
      computeAABB in class Shape
    • computeMass

      public void computeMass(MassData massData, float density)
      Specified by:
      computeMass in class Shape
    • clone

      public Shape clone()
      Specified by:
      clone in class Shape
    • createLoop

      public void createLoop(Vec2[] vertices, int count)
    • createChain

      public void createChain(Vec2[] vertices, int count)
    • setPrevVertex

      public void setPrevVertex(Vec2 prevVertex)
    • setNextVertex

      public void setNextVertex(Vec2 nextVertex)