|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.physics.box2d.Contact
public class Contact
The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if filtered). Therefore a contact object may exist that has no contact points.
Field Summary | |
---|---|
protected long |
addr
the address |
protected World |
world
the world |
protected WorldManifold |
worldManifold
the world manifold |
Constructor Summary | |
---|---|
protected |
Contact(World world,
long addr)
|
Method Summary | |
---|---|
int |
getChildIndexA()
Get the child primitive index for fixture A. |
int |
getChildIndexB()
Get the child primitive index for fixture B. |
Fixture |
getFixtureA()
Get the first fixture in this contact. |
Fixture |
getFixtureB()
Get the second fixture in this contact. |
float |
getFriction()
Get the friction. |
float |
getRestitution()
Get the restitution. |
WorldManifold |
getWorldManifold()
|
boolean |
isEnabled()
Has this contact been disabled? |
boolean |
isTouching()
|
void |
resetFriction()
Reset the friction mixture to the default value. |
void |
ResetRestitution()
Reset the restitution to the default value. |
void |
setEnabled(boolean flag)
Enable/disable this contact. |
void |
setFriction(float friction)
Override the default friction mixture. |
void |
setRestitution(float restitution)
Override the default restitution mixture. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long addr
protected World world
protected final WorldManifold worldManifold
Constructor Detail |
---|
protected Contact(World world, long addr)
Method Detail |
---|
public WorldManifold getWorldManifold()
public boolean isTouching()
public void setEnabled(boolean flag)
public boolean isEnabled()
public Fixture getFixtureA()
public Fixture getFixtureB()
public int getChildIndexA()
public int getChildIndexB()
public void setFriction(float friction)
public float getFriction()
public void resetFriction()
public void setRestitution(float restitution)
public float getRestitution()
public void ResetRestitution()
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |