public static class WorldObserver.FixtureChange extends java.lang.Object implements WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>
Fixture| Modifier and Type | Field and Description |
|---|---|
private boolean |
destroyed |
java.lang.Float |
newDensity |
com.badlogic.gdx.physics.box2d.Filter |
newFilter |
java.lang.Float |
newFriction |
java.lang.Float |
newRestitution |
java.lang.Boolean |
newSensor |
java.lang.Object |
newUserData |
private com.badlogic.gdx.physics.box2d.Body |
oldBody |
private float |
oldDensity |
private com.badlogic.gdx.physics.box2d.Filter |
oldFilter |
private float |
oldFriction |
private float |
oldRestitution |
private boolean |
oldSensor |
private java.lang.Object |
oldUserData |
(package private) boolean |
userDataChanged
if the
Fixture.userData changed |
| Constructor and Description |
|---|
FixtureChange() |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(com.badlogic.gdx.physics.box2d.Fixture fixture) |
(package private) void |
created(com.badlogic.gdx.physics.box2d.Body body)
this should be called when this FixtureChange is going to be used for a fixture on another body to make
destroyed work correctly |
boolean |
isDestroyed() |
<C extends WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>> |
newValuesEqual(C other)
if the values applied in
WorldObserver.Change.apply(Object) equal |
void |
reset() |
boolean |
update(com.badlogic.gdx.physics.box2d.Fixture fixture) |
private void |
updateOldFilter(com.badlogic.gdx.physics.box2d.Filter newFilter) |
private transient com.badlogic.gdx.physics.box2d.Body oldBody
private transient boolean destroyed
private transient float oldDensity
private transient float oldFriction
private transient float oldRestitution
private final transient com.badlogic.gdx.physics.box2d.Filter oldFilter
private transient boolean oldSensor
private transient java.lang.Object oldUserData
public java.lang.Float newDensity
public java.lang.Float newFriction
public java.lang.Float newRestitution
public com.badlogic.gdx.physics.box2d.Filter newFilter
public java.lang.Boolean newSensor
public java.lang.Object newUserData
boolean userDataChanged
Fixture.userData changedvoid created(com.badlogic.gdx.physics.box2d.Body body)
destroyed work correctlyprivate void updateOldFilter(com.badlogic.gdx.physics.box2d.Filter newFilter)
public boolean isDestroyed()
destroyedpublic boolean update(com.badlogic.gdx.physics.box2d.Fixture fixture)
update in interface WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>fixture - the object to check for changes since the last time this method was calledpublic void apply(com.badlogic.gdx.physics.box2d.Fixture fixture)
apply in interface WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>fixture - the object to apply the changes since WorldObserver.Change.update(Object) tojava.lang.IllegalStateException - if the fixture has been destroyedpublic <C extends WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>> boolean newValuesEqual(C other)
WorldObserver.ChangeWorldObserver.Change.apply(Object) equalnewValuesEqual in interface WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>public void reset()
reset in interface com.badlogic.gdx.utils.Pool.Poolable