Package gaiasky.util

Class MasterManager

  • All Implemented Interfaces:
    IObserver

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

      • initialize

        public static void initialize()
      • hasSlaves

        public static boolean hasSlaves()
      • isSlaveConnected

        public boolean isSlaveConnected​(java.lang.String slaveName)
      • getSlaveIndex

        public int getSlaveIndex​(java.lang.String slaveName)
      • isSlaveConnected

        public boolean isSlaveConnected​(int index)
      • getSlaveStates

        public byte[] getSlaveStates()
      • boardcastCameraAndTime

        public void boardcastCameraAndTime​(Vector3d 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​(java.lang.String slave,
                                float yaw)
      • setSlavePitch

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

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

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

        public java.util.List<java.lang.String> getSlaves()
      • notify

        public void notify​(Events event,
                           java.lang.Object... data)
        Specified by:
        notify in interface IObserver