Class CameraModule

java.lang.Object
gaiasky.script.v2.impl.APIModule
gaiasky.script.v2.impl.CameraModule
All Implemented Interfaces:
IObserver, CameraAPI

public class CameraModule extends APIModule implements IObserver, CameraAPI
The camera module contains methods and calls that modify and query the camera system in Gaia Sky.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The interactive camera module, to manipulate the camera in interactive mode.

    Fields inherited from class APIModule

    api, em, logger, me, name
    Modifier and Type
    Field
    Description
    protected final APIv2
    Reference to API object.
    protected final EventManager
    Reference to event manager.
    protected final Logger.Log
     
    protected final APIModule
    Reference to self.
    protected final String
    Module name.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new module with the given attributes.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Center the camera so that its direction vector is aligned with the direction to the focus object, removing any deviation of the line of sight.
    void
    center_focus(boolean center)
    Set the center focus property of the camera.
    protected void
    changeFocus(FocusView object, NaturalCamera cam, double waitTimeSeconds)
    Internal method to change the current camera focus object.
    void
    Method called whenever the module is disposed.
    void
    focus_mode(com.badlogic.ashley.core.Entity entity, float waitTimeSeconds)
    Set the camera in focus mode, and sets the focus object to the given Entity.
    void
    Set the camera in focus mode with the focus object identified by the given focusName.
    void
    focus_mode(String name, float wait)
    Set the camera in focus mode with the focus object identified by the given focusName.
    void
    focus_mode(String focusName, int waitTimeSeconds)
    Alias to focus_mode(String, float), but with waitTimeSeconds given as an int.
    void
    Set the camera in focus mode with the focus object identified by the given focusName.
    void
    Set the camera in focus mode with the focus object identified by the given focusName.
    void
    focus_mode_instant_go(String focusName, boolean sleep)
    Alias to focus_mode_instant(String), but with an extra boolean parameter (for internal use) that makes sure that the camera changes are flushed before returning.
    void
    Set the camera in free mode.
    Return the closest object to the camera in this instant as a IFocus.
    double[]
    Get the current camera direction vector.
    double
    Return the distance from the current postion of the camera to the surface of the object identified with the given name.
    double
    Return the (vertical) current camera field of view angle, in degrees.
    double[]
    Get the current camera orientation quaternion.
    double[]
    Get the current camera position, in km.
    double[]
    Get the current camera position, in the requested units.
    double[]
    Get the current camera up vector.
    void
    go_to_object(com.badlogic.ashley.core.Entity object, double positionDurationSeconds, double orientationDurationSeconds, boolean sync)
     
    void
    go_to_object(com.badlogic.ashley.core.Entity object, double solidAngle, double positionDurationSeconds, double orientationDurationSeconds, boolean sync)
     
    void
    go_to_object(com.badlogic.ashley.core.Entity object, double solidAngle, double positionDurationSeconds, double orientationDurationSeconds, boolean sync, AtomicBoolean stop)
     
    void
    go_to_object(String name, double positionDurationSeconds, double ori_duration)
    Move the camera to the object identified by the given name, internally using smooth camera transition calls, like CameraAPI.transition(double[], double[], double[], double).
    void
    go_to_object(String name, double positionDurationSeconds, double ori_duration, boolean sync)
    Same as CameraAPI.go_to_object(String, double, double), but with a boolean that indicates whether the call is synchronous.
    void
    go_to_object(String name, double sa, double pos_duration, double ori_duration)
    Same as CameraAPI.go_to_object(String, double, double), but with the target solid angle of the object.
    void
    go_to_object(String name, double sa, double pos_duration, double ori_duration, boolean sync)
    Same as CameraAPI.go_to_object(String, double, double, boolean), but with the target solid angle of the object.
    void
    Set the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.
    void
    notify(Event event, Object source, Object... data)
    Event notification call.
    void
    point_at_equatorial(double ra, double dec)
    Set the camera in free mode and points it to the given coordinates in equatorial system.
    void
    point_at_sky_coordinate(long ra, long dec)
     
    void
    Remove the tracking object from the camera, if any.
    void
    set_direction(double[] direction)
    Set the camera direction vector to the given vector, in the internal reference system.
    void
    set_direction(double[] dir, boolean immediate)
    Set the camera direction vector to the given vector, in the internal reference system.
    void
     
    void
    set_direction(List<?> dir, boolean immediate)
    void
    set_direction_equatorial(double ra, double dec)
    Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in equatorial coordinates.
    void
    set_direction_galactic(double l, double b)
    Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in galactic coordinates.
    void
    set_focus_lock(boolean lock)
    Activates or deactivates the camera lock to the focus reference system when in focus mode.
    void
    set_fov(float fov)
    Set the (vertical) field of view of the perspective matrix of the camera, in degrees.
    void
    set_fov(int newFov)
     
    void
    set_max_speed(int index)
    Set the maximum speed of the camera as an index pointing to a pre-set value.
    void
    set_orientation_lock(boolean lock)
    Lock or unlock the orientation of the camera to the focus object's rotation.
    void
    set_orientation_quaternion(double[] quaternion)
    Set the camera orientation to the given quaternion, given as an array of [x, y, z, w].
    void
     
    void
    set_position(double[] pos)
    Set the camera position to the given coordinates, in the internal reference system and kilometres.
    void
    set_position(double[] pos, boolean immediate)
    Set the camera position to the given coordinates, in the internal reference system and kilometres.
    void
    set_position(double[] dir, String units)
    Set the camera position to the given coordinates, in the internal reference system and the given units.
    void
    set_position(double[] pos, String units, boolean immediate)
    Set the camera position to the given coordinates, in the internal reference system and in the requested units.
    void
    set_position(double x, double y, double z)
    Component-wise version of CameraAPI.set_position(double[]).
    void
    set_position(double x, double y, double z, boolean immediate)
    void
    set_position(double x, double y, double z, String units)
    Component-wise version of CameraAPI.set_position(double[], String).
    void
    set_position(double x, double y, double z, String units, boolean immediate)
    void
    void
    set_position(List<?> vec, boolean immediate)
    void
    set_position(List<?> vec, String units)
     
    void
    set_position(List<Double> position, String units, boolean immediate)
    void
    set_position_and_focus(String name, String other, double rot, double solidAngle)
    Set the focus and instantly moves the camera to a point in the line defined by focus-other and rotated rotation degrees around focus using the camera up vector as a rotation axis.
    void
    set_position_and_focus(String focus, String other, long rotation, long solidAngle)
     
    void
    set_state(double[] pos, double[] dir, double[] up)
    Set the camera state (position, direction and up vector).
    void
    set_state(List<?> pos, List<?> dir, List<?> up)
     
    void
    set_state_and_time(double[] pos, double[] dir, double[] up, long time)
    Set the camera state (position, direction and up vector) plus the current time.
    void
    set_state_and_time(List<?> pos, List<?> dir, List<?> up, long time)
     
    void
    Set the camera to track the object with the given name.
    void
    set_up(double[] up)
    Set the camera up vector to the given vector, in the internal reference system.
    void
    set_up(double[] up, boolean immediate)
    Set the camera up vector to the given vector, in the internal reference system.
    void
    set_up(List<?> up)
     
    void
    set_up(List<?> up, boolean immediate)
     
    void
    Stop all camera motion.
    void
    transition(double[] pos, double[] dir, double[] up, double duration)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds.
    void
    transition(double[] pos, double[] dir, double[] camUp, double duration, boolean sync)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds.
    void
    transition(double[] pos, double[] dir, double[] up, double pos_duration, String pos_smooth_type, double pos_smooth_factor, double ori_duration, String ori_smooth_type, double ori_smooth_factor)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp}, with the given duration, in seconds.
    void
    transition(double[] camPos, double[] camDir, double[] camUp, long seconds)
     
    void
    transition(double[] pos, String units, double[] dir, double[] up, double duration)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds.
    void
    transition(double[] pos, String units, double[] dir, double[] up, double duration, boolean sync)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds.
    void
    transition(double[] pos, String units, double[] dir, double[] up, double pos_duration, String pos_smooth_type, double pos_smooth_factor, double ori_duration, String ori_smooth_type, double ori_smooth_factor, boolean sync)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp}, with the given duration, in seconds.
    void
    transition(double[] camPos, String units, double[] camDir, double[] camUp, double positionDurationSeconds, String positionSmoothType, double positionSmoothFactor, double orientationDurationSeconds, String orientationSmoothType, double orientationSmoothFactor, boolean sync, AtomicBoolean stop)
     
    void
    transition(double[] camPos, String units, double[] camDir, double[] camUp, long seconds)
     
    void
    transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, double seconds)
     
    void
    transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, double seconds, boolean sync)
     
    void
    transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, double positionDurationSeconds, String positionSmoothType, double positionSmoothFactor, double orientationDurationSeconds, String orientationSmoothType, double orientationSmoothFactor, boolean sync)
     
    void
    transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, long seconds)
     
    void
    transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, long seconds, boolean sync)
     
    void
    transition(List<?> camPos, List<?> camDir, List<?> camUp, double seconds)
     
    void
    transition(List<?> camPos, List<?> camDir, List<?> camUp, double seconds, boolean sync)
     
    void
    transition(List<?> camPos, List<?> camDir, List<?> camUp, double seconds, String positionSmoothType, double positionSmoothFactor, String orientationSmoothType, double orientationSmoothFactor)
     
    void
    transition(List<?> camPos, List<?> camDir, List<?> camUp, long seconds)
     
    void
    transition(List<?> camPos, List<?> camDir, List<?> camUp, long seconds, boolean sync)
     
    void
    transition_fov(double target_fov, double duration)
    Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.
    void
    transition_fov(double target_fov, double duration, String smooth_type, double smooth_factor)
    Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.
    void
    transition_fov(double target_fov, double duration, String smooth_type, double smooth_factor, boolean sync)
    Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.
    void
    transition_km(double[] pos, double[] dir, double[] up, double duration)
    Same as CameraAPI.transition(double[], double[], double[], double) but the camera position is given in Km.
    void
    transition_km(List<?> camPos, List<?> camDir, List<?> camUp, double seconds)
     
    void
    transition_km(List<?> camPos, List<?> camDir, List<?> camUp, long seconds)
     
    void
    transition_orientation(double[] dir, double[] up, double duration, String smooth_type, double smooth_factor, boolean sync)
    Create a smooth transition from the current camera orientation to the given camera orientation {camDir, camUp}, with the given duration, in seconds.
    void
    transition_orientation(double[] camDir, double[] camUp, double duration, String smooth_type, double smooth_factor, boolean sync, AtomicBoolean stop)
     
    void
    transition_orientation(List<?> camDir, List<?> camUp, double durationSeconds, String smoothType, double smoothFactor, boolean sync)
     
    void
    transition_position(double[] pos, String units, double duration, String smoothType, double smooth_factor, boolean sync)
    Create a smooth transition from the current camera position to the given camera position, with the given duration, in seconds.
    void
    transition_position(double[] camPos, String units, double duration, String smooth_type, double smooth_factor, boolean sync, AtomicBoolean stop)
     
    void
    transition_position(List<?> camPos, String units, double durationSeconds, String smoothType, double smoothFactor, boolean sync)
     
    boolean
    wait_focus(String name, long timeout)
    This method blocks until the focus is the object indicated by the name.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • interactive

      public InteractiveCameraModule interactive
      The interactive camera module, to manipulate the camera in interactive mode.
  • Constructor Details

    • CameraModule

      public CameraModule(EventManager em, APIv2 api, String name)
      Create a new module with the given attributes.
      Parameters:
      em - Reference to the event manager.
      api - Reference to the API class.
      name - Name of the module.
  • Method Details

    • focus_mode

      public void focus_mode(String name)
      Description copied from interface: CameraAPI
      Set the camera in focus mode with the focus object identified by the given focusName. It returns immediately, i.e., it does not wait for the camera direction to finish the transition that makes it point to the new focus object.
      Specified by:
      focus_mode in interface CameraAPI
      Parameters:
      name - The name of the new focus object.
    • focus_mode

      public void focus_mode(String name, float wait)
      Description copied from interface: CameraAPI
      Set the camera in focus mode with the focus object identified by the given focusName. Additionally, waitTimeSeconds contains the amount of time, in seconds, to wait for the camera transition that makes it point to the new focus object to finish. If the transition has not finished after this amount of time, the call returns. If the transition finishes before this amount of time, it returns immediately after finishing.
      Specified by:
      focus_mode in interface CameraAPI
      Parameters:
      name - The name of the new focus object.
      wait - Maximum time, in seconds, to wait for the camera to face the focus. If negative, the call waits until the camera transition is finished.
    • focus_mode

      public void focus_mode(com.badlogic.ashley.core.Entity entity, float waitTimeSeconds)
      Set the camera in focus mode, and sets the focus object to the given Entity. Additionally, waitTimeSeconds contains the amount of time, in seconds, to wait for the camera * transition that makes it point to the new focus object to finish. If the transition has not finished after this amount of time, the call returns. If the transition finishes before this amount of time, it returns immediately after finishing.
      Parameters:
      entity - Reference to the new focus Entity.
      waitTimeSeconds - Maximum time, in seconds, to wait for the camera to face the focus. If negative, the call waits until the camera transition is finished.
    • focus_mode

      public void focus_mode(String focusName, int waitTimeSeconds)
      Alias to focus_mode(String, float), but with waitTimeSeconds given as an int.
    • focus_mode_instant

      public void focus_mode_instant(String name)
      Description copied from interface: CameraAPI
      Set the camera in focus mode with the focus object identified by the given focusName. This call is different from CameraAPI.focus_mode(String) in that the camera direction vector is set to point towards the focus object instantly.
      Specified by:
      focus_mode_instant in interface CameraAPI
      Parameters:
      name - The name of the new focus object.
    • focus_mode_instant_go

      public void focus_mode_instant_go(String name)
      Description copied from interface: CameraAPI
      Set the camera in focus mode with the focus object identified by the given focusName. This call is different from CameraAPI.focus_mode(String) in that the camera is moved to the vicinity of the focus object instantly, and its direction vector is set to point towards the focus object, also instantly.
      Specified by:
      focus_mode_instant_go in interface CameraAPI
      Parameters:
      name - The name of the new focus object.
    • focus_mode_instant_go

      public void focus_mode_instant_go(String focusName, boolean sleep)
      Alias to focus_mode_instant(String), but with an extra boolean parameter (for internal use) that makes sure that the camera changes are flushed before returning.
    • changeFocus

      protected void changeFocus(FocusView object, NaturalCamera cam, double waitTimeSeconds)
      Internal method to change the current camera focus object.

      This method checks if the object is the current focus of the given camera. If it is not, it sets it as focus and waits for the transaction to commit, if necessary.

      Parameters:
      object - The new focus object.
      cam - The current camera.
      waitTimeSeconds - Max time to wait for the camera to face the focus, in seconds. If negative, we wait until the end.
    • wait_focus

      public boolean wait_focus(String name, long timeout)
      Description copied from interface: CameraAPI
      This method blocks until the focus is the object indicated by the name. There is an optional timeout time, given in milliseconds. If the focus has not been acquired after this timeout, the call returns.
      Specified by:
      wait_focus in interface CameraAPI
      Parameters:
      name - The name of the focus to wait for.
      timeout - Timeout to wait, in milliseconds. Set negative to use no timeout.
      Returns:
      True if the timeout triggered the return. False otherwise.
    • set_focus_lock

      public void set_focus_lock(boolean lock)
      Description copied from interface: CameraAPI
      Activates or deactivates the camera lock to the focus reference system when in focus mode.
      Specified by:
      set_focus_lock in interface CameraAPI
      Parameters:
      lock - Activate or deactivate the lock.
    • center_focus

      public void center_focus(boolean center)
      Description copied from interface: CameraAPI
      Set the center focus property of the camera. If set to true, the camera centers the focus in view. If set to false, the camera does not seek to center the focus object, leaving the camera in a 'free view' state.

      Note that the camera is in focus mode, so its movement is determined by the focus object. 'Free view' state and free mode are not the same thing. Use CameraAPI.free_mode() to set the camera in free mode.

      Specified by:
      center_focus in interface CameraAPI
      Parameters:
      center - Whether to center the focus or not.
    • stop

      public void stop()
      Description copied from interface: CameraAPI
      Stop all camera motion.
      Specified by:
      stop in interface CameraAPI
    • center

      public void center()
      Description copied from interface: CameraAPI
      Center the camera so that its direction vector is aligned with the direction to the focus object, removing any deviation of the line of sight. Useful to center the focus object again after turning.

      This method only has effect if the camera is in CameraAPI.focus_mode(String).

      Specified by:
      center in interface CameraAPI
    • free_mode

      public void free_mode()
      Description copied from interface: CameraAPI
      Set the camera in free mode.
      Specified by:
      free_mode in interface CameraAPI
    • set_position

      public void set_position(double[] pos)
      Description copied from interface: CameraAPI
      Set the camera position to the given coordinates, in the internal reference system and kilometres. The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, use CameraAPI.set_position(double[], boolean), with the boolean set to true.
      Specified by:
      set_position in interface CameraAPI
      Parameters:
      pos - Vector of three components in internal coordinates and Km.
    • set_position

      public void set_position(double x, double y, double z)
      Description copied from interface: CameraAPI
      Component-wise version of CameraAPI.set_position(double[]).
      Specified by:
      set_position in interface CameraAPI
    • set_position

      public void set_position(double x, double y, double z, String units)
      Description copied from interface: CameraAPI
      Component-wise version of CameraAPI.set_position(double[], String).
      Specified by:
      set_position in interface CameraAPI
    • set_position

      public void set_position(double x, double y, double z, boolean immediate)
      Description copied from interface: CameraAPI
      Specified by:
      set_position in interface CameraAPI
    • set_position

      public void set_position(double x, double y, double z, String units, boolean immediate)
      Description copied from interface: CameraAPI
      Specified by:
      set_position in interface CameraAPI
    • set_position

      public void set_position(List<?> vec, boolean immediate)
    • set_position

      public void set_position(double[] pos, boolean immediate)
      Description copied from interface: CameraAPI
      Set the camera position to the given coordinates, in the internal reference system and kilometres. The immediate parameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.
      Specified by:
      set_position in interface CameraAPI
      Parameters:
      pos - Vector of three components in internal coordinates and Km.
      immediate - Whether to apply the changes immediately, or wait for the next frame.
    • set_position

      public void set_position(double[] pos, String units, boolean immediate)
      Description copied from interface: CameraAPI
      Set the camera position to the given coordinates, in the internal reference system and in the requested units. The immediate parameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.
      Specified by:
      set_position in interface CameraAPI
      Parameters:
      pos - Vector of three components in internal coordinates and the requested units.
      units - The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
      immediate - Whether to apply the changes immediately, or wait for the next frame.
    • set_position

      public void set_position(List<Double> position, String units, boolean immediate)
    • get_position

      public double[] get_position()
      Description copied from interface: CameraAPI
      Get the current camera position, in km.
      Specified by:
      get_position in interface CameraAPI
      Returns:
      The camera position coordinates in the internal reference system, in km.
    • get_position

      public double[] get_position(String units)
      Description copied from interface: CameraAPI
      Get the current camera position, in the requested units.
      Specified by:
      get_position in interface CameraAPI
      Parameters:
      units - The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
      Returns:
      The camera position coordinates in the internal reference system and in the requested units.
    • set_position

      public void set_position(double[] dir, String units)
      Description copied from interface: CameraAPI
      Set the camera position to the given coordinates, in the internal reference system and the given units. The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, use CameraAPI.set_position(double[], boolean), with the boolean set to true.
      Specified by:
      set_position in interface CameraAPI
      Parameters:
      dir - Vector of three components in internal coordinates and the given units.
      units - The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
    • set_position

      public void set_position(List<?> vec)
    • set_position

      public void set_position(List<?> vec, String units)
    • set_direction

      public void set_direction(List<?> dir, boolean immediate)
    • set_direction

      public void set_direction(double[] dir, boolean immediate)
      Description copied from interface: CameraAPI
      Set the camera direction vector to the given vector, in the internal reference system. The immediate parameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.
      Specified by:
      set_direction in interface CameraAPI
      Parameters:
      dir - The direction vector in the internal reference system.
      immediate - Whether to apply the changes immediately, or wait for the next frame.
    • get_direction

      public double[] get_direction()
      Description copied from interface: CameraAPI
      Get the current camera direction vector.
      Specified by:
      get_direction in interface CameraAPI
      Returns:
      The camera direction vector in the internal reference system.
    • set_direction

      public void set_direction(double[] direction)
      Description copied from interface: CameraAPI
      Set the camera direction vector to the given vector, in the internal reference system.

      You can convert from spherical coordinates using the following methods:

      The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, use CameraAPI.set_direction(double[], boolean), with the boolean set to true.
      Specified by:
      set_direction in interface CameraAPI
      Parameters:
      direction - The direction vector in equatorial cartesian coordinates.
    • set_direction_equatorial

      public void set_direction_equatorial(double ra, double dec)
      Description copied from interface: CameraAPI
      Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in equatorial coordinates. This method sets the camera in free mode.
      Specified by:
      set_direction_equatorial in interface CameraAPI
      Parameters:
      ra - The right ascension, in decimal degrees.
      dec - The declination, in decimal degrees.
    • set_direction_galactic

      public void set_direction_galactic(double l, double b)
      Description copied from interface: CameraAPI
      Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in galactic coordinates. This method sets the camera in free mode.
      Specified by:
      set_direction_galactic in interface CameraAPI
      Parameters:
      l - The galactic longitude, in decimal degrees.
      b - The galactic latitude, in decimal degrees.
    • set_direction

      public void set_direction(List<?> dir)
    • set_up

      public void set_up(List<?> up, boolean immediate)
    • set_up

      public void set_up(double[] up, boolean immediate)
      Description copied from interface: CameraAPI
      Set the camera up vector to the given vector, in the internal reference system. The immediate parameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.
      Specified by:
      set_up in interface CameraAPI
      Parameters:
      up - The up vector in equatorial coordinates.
      immediate - Whether to apply the changes immediately, or wait for the next frame.
    • get_up

      public double[] get_up()
      Description copied from interface: CameraAPI
      Get the current camera up vector.
      Specified by:
      get_up in interface CameraAPI
      Returns:
      The camera up vector in the internal reference system.
    • set_up

      public void set_up(double[] up)
      Description copied from interface: CameraAPI
      Set the camera up vector to the given vector, in the internal reference system. The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, use CameraAPI.set_up(double[], boolean), with the boolean set to true.
      Specified by:
      set_up in interface CameraAPI
      Parameters:
      up - The up vector in equatorial coordinates.
    • set_up

      public void set_up(List<?> up)
    • set_state

      public void set_state(double[] pos, double[] dir, double[] up)
      Description copied from interface: CameraAPI
      Set the camera state (position, direction and up vector).
      Specified by:
      set_state in interface CameraAPI
      Parameters:
      pos - The position of the camera in internal units, not Km.
      dir - The direction of the camera.
      up - The up vector of the camera.
    • set_state

      public void set_state(List<?> pos, List<?> dir, List<?> up)
    • set_state_and_time

      public void set_state_and_time(double[] pos, double[] dir, double[] up, long time)
      Description copied from interface: CameraAPI
      Set the camera state (position, direction and up vector) plus the current time.
      Specified by:
      set_state_and_time in interface CameraAPI
      Parameters:
      pos - The position of the camera in internal units, not Km.
      dir - The direction of the camera.
      up - The up vector of the camera.
      time - The new time of the camera as the number of milliseconds since the epoch (Jan 1, 1970).
    • set_state_and_time

      public void set_state_and_time(List<?> pos, List<?> dir, List<?> up, long time)
    • set_orientation_quaternion

      public void set_orientation_quaternion(double[] quaternion)
      Description copied from interface: CameraAPI
      Set the camera orientation to the given quaternion, given as an array of [x, y, z, w].
      Specified by:
      set_orientation_quaternion in interface CameraAPI
      Parameters:
      quaternion - The 4-component quaternion.
    • set_orientation_quaternion

      public void set_orientation_quaternion(List<?> quaternion)
    • get_orientation_quaternion

      public double[] get_orientation_quaternion()
      Description copied from interface: CameraAPI
      Get the current camera orientation quaternion.
      Specified by:
      get_orientation_quaternion in interface CameraAPI
      Returns:
      The current camera orientation quaternion, as an array of [x, y, z, w].
    • set_position_and_focus

      public void set_position_and_focus(String name, String other, double rot, double solidAngle)
      Description copied from interface: CameraAPI
      Set the focus and instantly moves the camera to a point in the line defined by focus-other and rotated rotation degrees around focus using the camera up vector as a rotation axis.
      Specified by:
      set_position_and_focus in interface CameraAPI
      Parameters:
      name - The name of the focus object.
      other - The name of the other object, to the fine a line from this to focus. Usually a light source.
      rot - The rotation angle, in degrees.
      solidAngle - The target solid angle which determines the distance, in degrees.
    • set_position_and_focus

      public void set_position_and_focus(String focus, String other, long rotation, long solidAngle)
    • point_at_equatorial

      public void point_at_equatorial(double ra, double dec)
      Description copied from interface: CameraAPI
      Set the camera in free mode and points it to the given coordinates in equatorial system.
      Specified by:
      point_at_equatorial in interface CameraAPI
      Parameters:
      ra - Right ascension in degrees.
      dec - Declination in degrees.
    • point_at_sky_coordinate

      public void point_at_sky_coordinate(long ra, long dec)
    • go_to_object_instant

      public void go_to_object_instant(String name)
      Description copied from interface: CameraAPI
      Set the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.
      Specified by:
      go_to_object_instant in interface CameraAPI
      Parameters:
      name - The name of the new focus object.
    • go_to_object

      public void go_to_object(String name, double positionDurationSeconds, double ori_duration)
      Description copied from interface: CameraAPI
      Move the camera to the object identified by the given name, internally using smooth camera transition calls, like CameraAPI.transition(double[], double[], double[], double). The target position and orientation are computed first during the call execution and are not subsequently updated. This means that the camera does not follow the object if it moves. If time is activated, and the object moves, this call does not go to the object's current position at the end, but at the beginning.
      Specified by:
      go_to_object in interface CameraAPI
      Parameters:
      name - The name of the object to go to.
      positionDurationSeconds - The duration of the transition in position, in seconds.
      ori_duration - The duration of the transition in orientation, in seconds.
    • go_to_object

      public void go_to_object(String name, double sa, double pos_duration, double ori_duration)
      Description copied from interface: CameraAPI
      Same as CameraAPI.go_to_object(String, double, double), but with the target solid angle of the object.
      Specified by:
      go_to_object in interface CameraAPI
      Parameters:
      name - The name of the object to go to.
      sa - The target solid angle of the object, in degrees. This is used to compute the final distance to the object. The angle gets larger and larger as we approach the object.
      pos_duration - The duration of the transition in position, in seconds.
      ori_duration - The duration of the transition in orientation, in seconds.
    • go_to_object

      public void go_to_object(String name, double positionDurationSeconds, double ori_duration, boolean sync)
      Description copied from interface: CameraAPI
      Same as CameraAPI.go_to_object(String, double, double), but with a boolean that indicates whether the call is synchronous.
      Specified by:
      go_to_object in interface CameraAPI
      Parameters:
      name - The name of the object to go to.
      positionDurationSeconds - The duration of the transition in position, in seconds.
      ori_duration - The duration of the transition in orientation, in seconds.
      sync - If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
    • go_to_object

      public void go_to_object(String name, double sa, double pos_duration, double ori_duration, boolean sync)
      Description copied from interface: CameraAPI
      Same as CameraAPI.go_to_object(String, double, double, boolean), but with the target solid angle of the object.
      Specified by:
      go_to_object in interface CameraAPI
      Parameters:
      name - The name of the object to go to.
      sa - The target solid angle of the object, in degrees. This is used to compute the final distance to the object. The angle gets larger and larger as we approach the object.
      pos_duration - The duration of the transition in position, in seconds.
      ori_duration - The duration of the transition in orientation, in seconds.
      sync - If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
    • go_to_object

      public void go_to_object(com.badlogic.ashley.core.Entity object, double positionDurationSeconds, double orientationDurationSeconds, boolean sync)
    • go_to_object

      public void go_to_object(com.badlogic.ashley.core.Entity object, double solidAngle, double positionDurationSeconds, double orientationDurationSeconds, boolean sync)
    • go_to_object

      public void go_to_object(com.badlogic.ashley.core.Entity object, double solidAngle, double positionDurationSeconds, double orientationDurationSeconds, boolean sync, AtomicBoolean stop)
    • get_distance_to_object

      public double get_distance_to_object(String name)
      Description copied from interface: CameraAPI
      Return the distance from the current postion of the camera to the surface of the object identified with the given name. If the object is an abstract node or does not exist, it returns a negative distance.
      Specified by:
      get_distance_to_object in interface CameraAPI
      Parameters:
      name - The name or id (HIP, TYC, sourceId) of the object.
      Returns:
      The distance to the object in km if it exists, a negative value otherwise.
    • set_max_speed

      public void set_max_speed(int index)
      Description copied from interface: CameraAPI
      Set the maximum speed of the camera as an index pointing to a pre-set value. The index corresponds to one of the following values:
      1. 1 Km/h
      2. 10 Km/h
      3. 100 Km/h
      4. 1000 Km/h
      5. 1 Km/s
      6. 10 Km/s
      7. 100 Km/s
      8. 1000 Km/s
      9. 0.01 c
      10. 0.1 c
      11. 0.5 c
      12. 0.8 c
      13. 0.9 c
      14. 0.99 c
      15. 0.99999 c
      16. 1 c
      17. 2 c
      18. 10 c
      19. 1e3 c
      20. 1 AU/s
      21. 10 AU/s
      22. 1000 AU/s
      23. 10000 AU/s
      24. 1 pc/s
      25. 2 pc/s
      26. 10 pc/s
      27. 1000 pc/s
      28. unlimited
      Specified by:
      set_max_speed in interface CameraAPI
      Parameters:
      index - The index of the maximum speed setting.
    • set_tracking_object

      public void set_tracking_object(String name)
      Description copied from interface: CameraAPI
      Set the camera to track the object with the given name. In this mode, the position of the camera is still dependent on the focus object (if any), but its direction points to the tracking object.
      Specified by:
      set_tracking_object in interface CameraAPI
      Parameters:
      name - The name of the new tracking object.
    • remove_tracking_object

      public void remove_tracking_object()
      Description copied from interface: CameraAPI
      Remove the tracking object from the camera, if any.
      Specified by:
      remove_tracking_object in interface CameraAPI
    • set_orientation_lock

      public void set_orientation_lock(boolean lock)
      Description copied from interface: CameraAPI
      Lock or unlock the orientation of the camera to the focus object's rotation.
      Specified by:
      set_orientation_lock in interface CameraAPI
      Parameters:
      lock - Whether to lock or unlock the camera orientation to the focus.
    • get_closest_object

      public IFocus get_closest_object()
      Description copied from interface: CameraAPI
      Return the closest object to the camera in this instant as a IFocus.
      Specified by:
      get_closest_object in interface CameraAPI
      Returns:
      The closest object to the camera.
    • set_fov

      public void set_fov(float fov)
      Description copied from interface: CameraAPI
      Set the (vertical) field of view of the perspective matrix of the camera, in degrees.
      Specified by:
      set_fov in interface CameraAPI
      Parameters:
      fov - The new field of view value in degrees, between Constants.MIN_FOV and Constants.MAX_FOV.
    • get_fov

      public double get_fov()
      Description copied from interface: CameraAPI
      Return the (vertical) current camera field of view angle, in degrees.
      Specified by:
      get_fov in interface CameraAPI
      Returns:
      The current camera field of view angle, in degrees.
    • set_fov

      public void set_fov(int newFov)
    • transition_km

      public void transition_km(double[] pos, double[] dir, double[] up, double duration)
      Description copied from interface: CameraAPI
      Same as CameraAPI.transition(double[], double[], double[], double) but the camera position is given in Km.
      Specified by:
      transition_km in interface CameraAPI
      Parameters:
      pos - The target camera position in Km.
      dir - The target camera direction vector.
      up - The target camera up vector.
      duration - The duration of the transition in seconds.
    • transition_km

      public void transition_km(List<?> camPos, List<?> camDir, List<?> camUp, double seconds)
    • transition_km

      public void transition_km(List<?> camPos, List<?> camDir, List<?> camUp, long seconds)
    • transition

      public void transition(double[] pos, double[] dir, double[] up, double duration)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds. This function waits for the transition to finish and then returns control to the script.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Specified by:
      transition in interface CameraAPI
      Parameters:
      pos - The target camera position in the internal reference system.
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      duration - The duration of the transition in seconds.
    • transition

      public void transition(double[] pos, String units, double[] dir, double[] up, double duration)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds. This function waits for the transition to finish and then returns control to the script.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Specified by:
      transition in interface CameraAPI
      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      units - The distance units to use. One of "m", "km", "AU", "ly", "pc", "internal".
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      duration - The duration of the transition in seconds.
    • transition

      public void transition(double[] camPos, double[] camDir, double[] camUp, long seconds)
    • transition

      public void transition(double[] camPos, String units, double[] camDir, double[] camUp, long seconds)
    • transition

      public void transition(List<?> camPos, List<?> camDir, List<?> camUp, double seconds)
    • transition

      public void transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, double seconds)
    • transition

      public void transition(List<?> camPos, List<?> camDir, List<?> camUp, long seconds)
    • transition

      public void transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, long seconds)
    • transition

      public void transition(double[] pos, double[] dir, double[] camUp, double duration, boolean sync)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds. Optionally, the transition may be run synchronously or asynchronously to the current script.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Specified by:
      transition in interface CameraAPI
      Parameters:
      pos - The target camera position in the internal reference system.
      dir - The target camera direction in the internal reference system.
      camUp - The target camera up in the internal reference system.
      duration - The duration of the transition in seconds.
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition

      public void transition(double[] pos, String units, double[] dir, double[] up, double duration, boolean sync)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds. Optionally, the transition may be run synchronously or asynchronously to the current script.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Specified by:
      transition in interface CameraAPI
      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      units - The distance units to use. One of "m", "km", "AU", "ly", "pc", "internal".
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      duration - The duration of the transition in seconds.
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition

      public void transition(List<?> camPos, List<?> camDir, List<?> camUp, double seconds, String positionSmoothType, double positionSmoothFactor, String orientationSmoothType, double orientationSmoothFactor)
    • transition

      public void transition(double[] pos, double[] dir, double[] up, double pos_duration, String pos_smooth_type, double pos_smooth_factor, double ori_duration, String ori_smooth_type, double ori_smooth_factor)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp}, with the given duration, in seconds.

      This function accepts smoothing types and factors for the position and orientation.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Specified by:
      transition in interface CameraAPI
      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      pos_duration - The duration of the transition in position, in seconds.
      pos_smooth_type - The function type to use for the smoothing of positions. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      pos_smooth_factor - Smooth factor for the positions (depends on type).
      ori_duration - The duration of the transition in orientation, in seconds.
      ori_smooth_type - The function type to use for the smoothing of orientations. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      ori_smooth_factor - Smooth factor for the orientations (depends on type).
    • transition

      public void transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, double positionDurationSeconds, String positionSmoothType, double positionSmoothFactor, double orientationDurationSeconds, String orientationSmoothType, double orientationSmoothFactor, boolean sync)
    • transition

      public void transition(double[] pos, String units, double[] dir, double[] up, double pos_duration, String pos_smooth_type, double pos_smooth_factor, double ori_duration, String ori_smooth_type, double ori_smooth_factor, boolean sync)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp}, with the given duration, in seconds.

      This function accepts smoothing types and factors for the position and orientation.

      Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).

      This function puts the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Specified by:
      transition in interface CameraAPI
      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      units - The distance units to use. One of "m", "km", "AU", "ly", "pc", "internal".
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      pos_duration - The duration of the transition in position, in seconds.
      pos_smooth_type - The function type to use for the smoothing of positions. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      pos_smooth_factor - Smooth factor for the positions (depends on type).
      ori_duration - The duration of the transition in orientation, in seconds.
      ori_smooth_type - The function type to use for the smoothing of orientations. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      ori_smooth_factor - Smooth factor for the orientations (depends on type).
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition

      public void transition(double[] camPos, String units, double[] camDir, double[] camUp, double positionDurationSeconds, String positionSmoothType, double positionSmoothFactor, double orientationDurationSeconds, String orientationSmoothType, double orientationSmoothFactor, boolean sync, AtomicBoolean stop)
    • transition_position

      public void transition_position(double[] pos, String units, double duration, String smoothType, double smooth_factor, boolean sync)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera position to the given camera position, with the given duration, in seconds.

      This function accepts smoothing type and factor.

      Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).

      This function puts the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Specified by:
      transition_position in interface CameraAPI
      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      units - The distance units to use. One of "m", "km", "AU", "ly", "pc", "internal".
      duration - The duration of the transition in position, in seconds.
      smoothType - The function type to use for the smoothing of positions. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      smooth_factor - Smooth factor for the positions (depends on type).
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition_position

      public void transition_position(double[] camPos, String units, double duration, String smooth_type, double smooth_factor, boolean sync, AtomicBoolean stop)
    • transition_orientation

      public void transition_orientation(double[] dir, double[] up, double duration, String smooth_type, double smooth_factor, boolean sync)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera orientation to the given camera orientation {camDir, camUp}, with the given duration, in seconds.

      This function accepts smoothing type and factor.

      Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).

      This function puts the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Specified by:
      transition_orientation in interface CameraAPI
      Parameters:
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      duration - The duration of the transition in orientation, in seconds.
      smooth_type - The function type to use for the smoothing of orientations. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      smooth_factor - Smooth factor for the orientations (depends on type).
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition_orientation

      public void transition_orientation(double[] camDir, double[] camUp, double duration, String smooth_type, double smooth_factor, boolean sync, AtomicBoolean stop)
    • transition

      public void transition(List<?> camPos, List<?> camDir, List<?> camUp, double seconds, boolean sync)
    • transition

      public void transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, double seconds, boolean sync)
    • transition

      public void transition(List<?> camPos, List<?> camDir, List<?> camUp, long seconds, boolean sync)
    • transition

      public void transition(List<?> camPos, String units, List<?> camDir, List<?> camUp, long seconds, boolean sync)
    • transition_orientation

      public void transition_orientation(List<?> camDir, List<?> camUp, double durationSeconds, String smoothType, double smoothFactor, boolean sync)
    • transition_position

      public void transition_position(List<?> camPos, String units, double durationSeconds, String smoothType, double smoothFactor, boolean sync)
    • transition_fov

      public void transition_fov(double target_fov, double duration)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.

      This call is synchronous, i.e., returns only after the transition has finished.

      Specified by:
      transition_fov in interface CameraAPI
      Parameters:
      target_fov - The target FOV angle.
      duration - The duration of the transition, in seconds.
    • transition_fov

      public void transition_fov(double target_fov, double duration, String smooth_type, double smooth_factor)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.

      This function accepts smoothing type and factor.

      This call is synchronous, i.e., returns only after the transition has finished.

      Specified by:
      transition_fov in interface CameraAPI
      Parameters:
      target_fov - The target FOV angle.
      duration - The duration of the transition, in seconds.
      smooth_type - The function type to use for the smoothing. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      smooth_factor - Smoothing factor (depends on type). This is ignored if smooth_type is "none".
    • transition_fov

      public void transition_fov(double target_fov, double duration, String smooth_type, double smooth_factor, boolean sync)
      Description copied from interface: CameraAPI
      Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.

      This function accepts smoothing type and factor.

      Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).

      Specified by:
      transition_fov in interface CameraAPI
      Parameters:
      target_fov - The target FOV angle.
      duration - The duration of the transition, in seconds.
      smooth_type - The function type to use for the smoothing. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      smooth_factor - Smoothing factor (depends on type). This is ignored if smooth_type is "none".
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • dispose

      public void dispose()
      Description copied from class: APIModule
      Method called whenever the module is disposed. To be overwritten if necessary.
      Overrides:
      dispose in class APIModule
    • notify

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