org.xith3d.utility.classes.beans
Class ConnectionManager

java.lang.Object
  extended by org.xith3d.loop.opscheduler.impl.ScheduledOperationImpl
      extended by org.xith3d.utility.classes.beans.ConnectionManager
All Implemented Interfaces:
ScheduledOperation, Updatable

public class ConnectionManager
extends ScheduledOperationImpl

The Great ConnectionManager is the master of all modularity :) It permits you to "bind" different members of your objects, for example imagine you want to make a door open progressively in your game. Well, create a float interpolator (and configure it correctly). Then connect the angle of your door with this interpolator. Now every time you adjust your interpolator (setAlpha method) your door will have the corresponding angle..


Field Summary
 java.util.HashMap<java.lang.Object,Connection> connections
           
 
Constructor Summary
ConnectionManager(OperationScheduler opSched)
           
 
Method Summary
 void connect(java.lang.Object object1, java.lang.String member1, java.lang.Object object2, java.lang.String member2)
          Connect two objects, so that the specified member of the first object will (nearly) always be equal to the specified member of the second object
 void connect(Transformable p1, Transformable p2)
          Connect two placeable, so that the first placeable will have exactly the same position/angle as the second placeable
 void update(long gameTime, long frameTime, UpdatingThread.TimingMode timingMode)
          Updates this Updatable object.
 
Methods inherited from class org.xith3d.loop.opscheduler.impl.ScheduledOperationImpl
isAlive, isPersistent, setAlive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connections

public final java.util.HashMap<java.lang.Object,Connection> connections
Constructor Detail

ConnectionManager

public ConnectionManager(OperationScheduler opSched)
Method Detail

connect

public void connect(java.lang.Object object1,
                    java.lang.String member1,
                    java.lang.Object object2,
                    java.lang.String member2)
Connect two objects, so that the specified member of the first object will (nearly) always be equal to the specified member of the second object

Parameters:
object1 - The first object
member1 - The member of the first object
object2 - The second object
member2 - The member of the second object

connect

public void connect(Transformable p1,
                    Transformable p2)
Connect two placeable, so that the first placeable will have exactly the same position/angle as the second placeable

Parameters:
p1 - The first placeable
p2 - The second placeable

update

public void update(long gameTime,
                   long frameTime,
                   UpdatingThread.TimingMode timingMode)
Description copied from interface: Updatable
Updates this Updatable object.

Parameters:
gameTime - the gameTime in Milliseconds
frameTime - the frameTime in Milliseconds (needed time for the last frame)
timingMode - the TimingMode to use for frameTime.