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>>
    boolean
    newValuesEqual​(C other)
    if the values applied in WorldObserver.Change.apply(Object) equal
    static 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

      public boolean update​(T joint)
      Specified by:
      update in interface WorldObserver.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

      public void apply​(T joint)
      Specified by:
      apply in interface WorldObserver.Change<T extends com.badlogic.gdx.physics.box2d.Joint>
      Parameters:
      joint - the object to apply the changes since WorldObserver.Change.update(Object) to
    • newValuesEqual

      public <C extends WorldObserver.Change<T>> boolean newValuesEqual​(C other)
      Description copied from interface: WorldObserver.Change
      if the values applied in WorldObserver.Change.apply(Object) equal
      Specified by:
      newValuesEqual in interface WorldObserver.Change<T extends com.badlogic.gdx.physics.box2d.Joint>
    • reset

      public void reset()
      Specified by:
      reset in interface com.badlogic.gdx.utils.Pool.Poolable