Package net.dermetfan.gdx.physics.box2d
Class WorldObserver.FixtureChange
java.lang.Object
net.dermetfan.gdx.physics.box2d.WorldObserver.FixtureChange
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable,WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>
- Enclosing class:
- WorldObserver
public static class WorldObserver.FixtureChange extends java.lang.Object implements WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>
the changes of a
Fixture-
Field Summary
Fields Modifier and Type Field Description java.lang.FloatnewDensitycom.badlogic.gdx.physics.box2d.FilternewFilterjava.lang.FloatnewFrictionjava.lang.FloatnewRestitutionjava.lang.BooleannewSensorjava.lang.ObjectnewUserData -
Constructor Summary
Constructors Constructor Description FixtureChange() -
Method Summary
Modifier and Type Method Description voidapply(com.badlogic.gdx.physics.box2d.Fixture fixture)booleanisDestroyed()<C extends WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>>
booleannewValuesEqual(C other)if the values applied inWorldObserver.Change.apply(Object)equalvoidreset()booleanupdate(com.badlogic.gdx.physics.box2d.Fixture fixture)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
newDensity
public java.lang.Float newDensity -
newFriction
public java.lang.Float newFriction -
newRestitution
public java.lang.Float newRestitution -
newFilter
public com.badlogic.gdx.physics.box2d.Filter newFilter -
newSensor
public java.lang.Boolean newSensor -
newUserData
public java.lang.Object newUserData
-
-
Constructor Details
-
FixtureChange
public FixtureChange()
-
-
Method Details
-
isDestroyed
public boolean isDestroyed()- Returns:
- the
destroyed
-
update
public boolean update(com.badlogic.gdx.physics.box2d.Fixture fixture)- Specified by:
updatein interfaceWorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>- Parameters:
fixture- the object to check for changes since the last time this method was called- Returns:
- if anything changed
-
apply
public void apply(com.badlogic.gdx.physics.box2d.Fixture fixture)- Specified by:
applyin interfaceWorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>- Parameters:
fixture- the object to apply the changes sinceWorldObserver.Change.update(Object)to- Throws:
java.lang.IllegalStateException- if the fixture has beendestroyed
-
newValuesEqual
public <C extends WorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>> boolean newValuesEqual(C other)Description copied from interface:WorldObserver.Changeif the values applied inWorldObserver.Change.apply(Object)equal- Specified by:
newValuesEqualin interfaceWorldObserver.Change<com.badlogic.gdx.physics.box2d.Fixture>
-
reset
public void reset()- Specified by:
resetin interfacecom.badlogic.gdx.utils.Pool.Poolable
-