Class World

java.lang.Object
com.codename1.gaming.physics.box2d.dynamics.World

public class World extends Object
  • Field Details

    • WORLD_POOL_SIZE

      public static final int WORLD_POOL_SIZE
      See Also:
    • WORLD_POOL_CONTAINER_SIZE

      public static final int WORLD_POOL_CONTAINER_SIZE
      See Also:
    • NEW_FIXTURE

      public static final int NEW_FIXTURE
      See Also:
    • LOCKED

      public static final int LOCKED
      See Also:
    • CLEAR_FORCES

      public static final int CLEAR_FORCES
      See Also:
    • activeContacts

      public int activeContacts
    • contactPoolCount

      public int contactPoolCount
    • m_flags

      protected int m_flags
    • m_contactManager

      protected ContactManager m_contactManager
  • Constructor Details

  • Method Details

    • setAllowSleep

      public void setAllowSleep(boolean flag)
    • setSubStepping

      public void setSubStepping(boolean subStepping)
    • isSubStepping

      public boolean isSubStepping()
    • isAllowSleep

      public boolean isAllowSleep()
    • popContact

      public Contact popContact(Fixture fixtureA, int indexA, Fixture fixtureB, int indexB)
    • pushContact

      public void pushContact(Contact contact)
    • getPool

      public IWorldPool getPool()
    • setDestructionListener

      public void setDestructionListener(DestructionListener listener)
    • setContactFilter

      public void setContactFilter(ContactFilter filter)
    • setContactListener

      public void setContactListener(ContactListener listener)
    • setDebugDraw

      public void setDebugDraw(DebugDraw debugDraw)
    • createBody

      public Body createBody(BodyDef def)
    • destroyBody

      public void destroyBody(Body body)
    • createJoint

      public Joint createJoint(JointDef def)
    • destroyJoint

      public void destroyJoint(Joint j)
    • step

      public void step(float dt, int velocityIterations, int positionIterations)
    • clearForces

      public void clearForces()
    • drawDebugData

      public void drawDebugData()
    • queryAABB

      public void queryAABB(QueryCallback callback, AABB aabb)
    • raycast

      public void raycast(RayCastCallback callback, Vec2 point1, Vec2 point2)
    • getBodyList

      public Body getBodyList()
    • getJointList

      public Joint getJointList()
    • getContactList

      public Contact getContactList()
    • isSleepingAllowed

      public boolean isSleepingAllowed()
    • setSleepingAllowed

      public void setSleepingAllowed(boolean sleepingAllowed)
    • setWarmStarting

      public void setWarmStarting(boolean flag)
    • isWarmStarting

      public boolean isWarmStarting()
    • setContinuousPhysics

      public void setContinuousPhysics(boolean flag)
    • isContinuousPhysics

      public boolean isContinuousPhysics()
    • getProxyCount

      public int getProxyCount()
    • getBodyCount

      public int getBodyCount()
    • getJointCount

      public int getJointCount()
    • getContactCount

      public int getContactCount()
    • getTreeHeight

      public int getTreeHeight()
    • getTreeBalance

      public int getTreeBalance()
    • getTreeQuality

      public float getTreeQuality()
    • setGravity

      public void setGravity(Vec2 gravity)
    • getGravity

      public Vec2 getGravity()
    • isLocked

      public boolean isLocked()
    • setAutoClearForces

      public void setAutoClearForces(boolean flag)
    • getAutoClearForces

      public boolean getAutoClearForces()
    • getContactManager

      public ContactManager getContactManager()
    • getProfile

      public Profile getProfile()