| Modifier and Type | Field and Description |
|---|---|
| protected long | addr
the address of the fixture |
| private Body | body
body |
| private boolean | dirtyFilter
flag to indicate if filter data needs to be updated with a JNI call |
| private final Filter | filter
the fixture filter data |
| protected Shape | shape
the shape, initialized lazy |
| private final short[] | tmp
Get the contact filtering data. |
| protected Object | userData
user specified data |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Body | |
| public float | |
| public Filter | |
| public float | |
| public float | |
| public Shape | |
| public Shape. | |
| public Object | |
| public boolean | |
| private native float | |
| private native void | |
| private native float | |
| private native float | |
| private native long | |
| private native int | |
| private native boolean | |
| private native void | |
| private native void | |
| private native void | |
| private native void | |
| private native void | |
| private native void | |
| private native boolean | |
| public void | refilter()
Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldCollide. |
| protected void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| public boolean | testPoint(float
the x-coordinate x, float the y-coordinate y)Test a point for containment in this fixture. |
| addr | back to summary |
|---|---|
| protected long addr the address of the fixture | |
| body | back to summary |
|---|---|
| private Body body body | |
| dirtyFilter | back to summary |
|---|---|
| private boolean dirtyFilter flag to indicate if filter data needs to be updated with a JNI call | |
| filter | back to summary |
|---|---|
| private final Filter filter the fixture filter data | |
| shape | back to summary |
|---|---|
| protected Shape shape the shape, initialized lazy | |
| tmp | back to summary |
|---|---|
| private final short[] tmp Get the contact filtering data. | |
| userData | back to summary |
|---|---|
| protected Object userData user specified data | |
| Fixture | back to summary |
|---|---|
| protected Fixture(Body body, long addr) Constructs a new fixture
| |
| getBody | back to summary |
|---|---|
| public Body getBody() Get the parent body of this fixture. This is NULL if the fixture is not attached. | |
| getDensity | back to summary |
|---|---|
| public float getDensity() Get the density of this fixture. | |
| getFilterData | back to summary |
|---|---|
| public Filter getFilterData() Get the contact filtering data. Modifying the returned | |
| getFriction | back to summary |
|---|---|
| public float getFriction() Get the coefficient of friction. | |
| getRestitution | back to summary |
|---|---|
| public float getRestitution() Get the coefficient of restitution. | |
| getShape | back to summary |
|---|---|
| public Shape getShape() Returns the shape of this fixture | |
| getType | back to summary |
|---|---|
| public Shape. Get the type of the child shape. You can use this to down cast to the concrete shape. | |
| getUserData | back to summary |
|---|---|
public Object getUserData()
| |
| isSensor | back to summary |
|---|---|
| public boolean isSensor() Is this fixture a sensor (non-solid)?
| |
| jniGetDensity | back to summary |
|---|---|
| private native float jniGetDensity(long addr) | |
| jniGetFilterData | back to summary |
|---|---|
| private native void jniGetFilterData(long addr, short[] filter) | |
| jniGetFriction | back to summary |
|---|---|
| private native float jniGetFriction(long addr) | |
| jniGetRestitution | back to summary |
|---|---|
| private native float jniGetRestitution(long addr) | |
| jniGetShape | back to summary |
|---|---|
| private native long jniGetShape(long addr) | |
| jniGetType | back to summary |
|---|---|
| private native int jniGetType(long addr) | |
| jniIsSensor | back to summary |
|---|---|
| private native boolean jniIsSensor(long addr) | |
| jniRefilter | back to summary |
|---|---|
| private native void jniRefilter(long addr) | |
| jniSetDensity | back to summary |
|---|---|
| private native void jniSetDensity(long addr, float density) | |
| jniSetFilterData | back to summary |
|---|---|
| private native void jniSetFilterData(long addr, short categoryBits, short maskBits, short groupIndex) | |
| jniSetFriction | back to summary |
|---|---|
| private native void jniSetFriction(long addr, float friction) | |
| jniSetRestitution | back to summary |
|---|---|
| private native void jniSetRestitution(long addr, float restitution) | |
| jniSetSensor | back to summary |
|---|---|
| private native void jniSetSensor(long addr, boolean sensor) | |
| jniTestPoint | back to summary |
|---|---|
| private native boolean jniTestPoint(long addr, float x, float y) | |
| refilter | back to summary |
|---|---|
| public void refilter() Call this if you want to establish collision that was previously disabled by b2ContactFilter::ShouldCollide. | |
| reset | back to summary |
|---|---|
| protected void reset(Body body, long addr) | |
| setDensity | back to summary |
|---|---|
| public void setDensity(float density) Set the density of this fixture. This will _not_ automatically adjust the mass of the body. You must call b2Body::ResetMassData to update the body's mass. | |
| setFilterData | back to summary |
|---|---|
| public void setFilterData(Filter filter) Set the contact filtering data. This will not update contacts until the next time step when either parent body is active and awake. This automatically calls Refilter. | |
| setFriction | back to summary |
|---|---|
| public void setFriction(float friction) Set the coefficient of friction. | |
| setRestitution | back to summary |
|---|---|
| public void setRestitution(float restitution) Set the coefficient of restitution. | |
| setSensor | back to summary |
|---|---|
| public void setSensor(boolean sensor) Set if this fixture is a sensor. | |
| setUserData | back to summary |
|---|---|
| public void setUserData(Object userData) Sets custom user data. | |
| testPoint | back to summary |
|---|---|
| public boolean testPoint(Vector2 p) Test a point for containment in this fixture.
| |
| testPoint | back to summary |
|---|---|
| public boolean testPoint(float x, float y) Test a point for containment in this fixture.
| |