Package gaiasky.util

Class MasterManager

java.lang.Object
gaiasky.util.MasterManager
All Implemented Interfaces:
IObserver

public class MasterManager extends Object implements IObserver
Manages a master instance which makes available state information to others in order to synchronize a session.
  • Field Details

  • Method Details

    • initialize

      public static void initialize()
    • hasSlaves

      public static boolean hasSlaves()
    • isSlaveConnected

      public boolean isSlaveConnected​(String slaveName)
    • getSlaveIndex

      public int getSlaveIndex​(String slaveName)
    • isSlaveConnected

      public boolean isSlaveConnected​(int index)
    • getSlaveStates

      public byte[] getSlaveStates()
    • boardcastCameraAndTime

      public void boardcastCameraAndTime​(Vector3b pos, Vector3d dir, Vector3d up, ITimeFrameProvider time)
      Broadcasts the given camera state and time to all the slaves.
      Parameters:
      pos - Camera position.
      dir - Camera direction.
      up - Camera up.
      time - Current time.
    • boardcastCamera

      public void boardcastCamera​(Vector3d pos, Vector3d dir, Vector3d up)
      Broadcasts the given camera state to all the slaves
      Parameters:
      pos - Camera position
      dir - Camera direction
      up - Camera up
    • setSlaveYaw

      public void setSlaveYaw​(String slave, float yaw)
    • setSlavePitch

      public void setSlavePitch​(String slave, float pitch)
    • setSlaveRoll

      public void setSlaveRoll​(String slave, float roll)
    • setSlaveFov

      public void setSlaveFov​(String slave, float fov)
    • getSlaves

      public List<String> getSlaves()
    • notify

      public void notify​(Events event, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      Parameters:
      event - The event type.
      data - The data associated with this event.