Package net.dermetfan.gdx.physics.box2d
Class WorldObserver.JointChange<T extends com.badlogic.gdx.physics.box2d.Joint>
java.lang.Object
net.dermetfan.gdx.physics.box2d.WorldObserver.JointChange<T>
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable
,WorldObserver.Change<T>
- Direct Known Subclasses:
WorldObserver.DistanceJointChange
,WorldObserver.FrictionJointChange
,WorldObserver.GearJointChange
,WorldObserver.MotorJointChange
,WorldObserver.MouseJointChange
,WorldObserver.PrismaticJointChange
,WorldObserver.RevoluteJointChange
,WorldObserver.RopeJointChange
,WorldObserver.WeldJointChange
,WorldObserver.WheelJointChange
- Enclosing class:
- WorldObserver
public static class WorldObserver.JointChange<T extends com.badlogic.gdx.physics.box2d.Joint> extends java.lang.Object implements WorldObserver.Change<T>
the changes of a
Joint
- Since:
- 0.6.0
-
Field Summary
Fields Modifier and Type Field Description java.lang.Object
newUserData
-
Constructor Summary
Constructors Constructor Description JointChange()
-
Method Summary
Modifier and Type Method Description void
apply(T joint)
<C extends WorldObserver.Change<T>>
booleannewValuesEqual(C other)
if the values applied inWorldObserver.Change.apply(Object)
equalstatic WorldObserver.JointChange
obtainFor(com.badlogic.gdx.physics.box2d.JointDef.JointType type)
void
reset()
boolean
update(T joint)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
newUserData
public java.lang.Object newUserData
-
-
Constructor Details
-
JointChange
public JointChange()
-
-
Method Details
-
obtainFor
public static WorldObserver.JointChange obtainFor(com.badlogic.gdx.physics.box2d.JointDef.JointType type)- Returns:
- a concrete JointChange from
Pools.obtain(Class)
-
update
- Specified by:
update
in interfaceWorldObserver.Change<T extends com.badlogic.gdx.physics.box2d.Joint>
- Parameters:
joint
- the object to check for changes since the last time this method was called- Returns:
- if anything changed
-
apply
- Specified by:
apply
in interfaceWorldObserver.Change<T extends com.badlogic.gdx.physics.box2d.Joint>
- Parameters:
joint
- the object to apply the changes sinceWorldObserver.Change.update(Object)
to
-
newValuesEqual
Description copied from interface:WorldObserver.Change
if the values applied inWorldObserver.Change.apply(Object)
equal- Specified by:
newValuesEqual
in interfaceWorldObserver.Change<T extends com.badlogic.gdx.physics.box2d.Joint>
-
reset
public void reset()- Specified by:
reset
in interfacecom.badlogic.gdx.utils.Pool.Poolable
-