|
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.Fixture
public class Fixture
Field Summary | |
---|---|
protected long |
addr
the address of the fixture |
protected Shape |
shape
the shape, initialized lazy |
protected java.lang.Object |
userData
user specified data |
Constructor Summary | |
---|---|
protected |
Fixture(Body body,
long addr)
Constructs a new fixture |
Method Summary | |
---|---|
Body |
getBody()
Get the parent body of this fixture. |
float |
getDensity()
Get the density of this fixture. |
Filter |
getFilterData()
|
float |
getFriction()
Get the coefficient of friction. |
float |
getRestitution()
Get the coefficient of restitution. |
Shape |
getShape()
Returns the shape of this fixture |
Shape.Type |
getType()
Get the type of the child shape. |
java.lang.Object |
getUserData()
|
boolean |
isSensor()
Is this fixture a sensor (non-solid)? |
void |
refilter()
Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldCollide. |
protected void |
reset(Body body,
long addr)
|
void |
setDensity(float density)
Set the density of this fixture. |
void |
setFilterData(Filter filter)
Set the contact filtering data. |
void |
setFriction(float friction)
Set the coefficient of friction. |
void |
setRestitution(float restitution)
Set the coefficient of restitution. |
void |
setSensor(boolean sensor)
Set if this fixture is a sensor. |
void |
setUserData(java.lang.Object userData)
Sets custom user data. |
boolean |
testPoint(float x,
float y)
Test a point for containment in this fixture. |
boolean |
testPoint(Vector2 p)
Test a point for containment in this fixture. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long addr
protected Shape shape
protected java.lang.Object userData
Constructor Detail |
---|
protected Fixture(Body body, long addr)
addr
- the address of the fixtureMethod Detail |
---|
protected void reset(Body body, long addr)
public Shape.Type getType()
public Shape getShape()
public void setSensor(boolean sensor)
public boolean isSensor()
public void setFilterData(Filter filter)
public Filter getFilterData()
public void refilter()
public Body getBody()
public boolean testPoint(Vector2 p)
p
- a point in world coordinates.public boolean testPoint(float x, float y)
x
- the x-coordinatey
- the y-coordinatepublic void setDensity(float density)
public float getDensity()
public float getFriction()
public void setFriction(float friction)
public float getRestitution()
public void setRestitution(float restitution)
public void setUserData(java.lang.Object userData)
public java.lang.Object getUserData()
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |