Class EventScriptingInterface

java.lang.Object
gaiasky.script.EventScriptingInterface
All Implemented Interfaces:
IObserver, IScriptingInterface

public class EventScriptingInterface extends Object implements IScriptingInterface, IObserver
Implementation of the scripting interface using the event system
  • Method Details

    • instance

      public static EventScriptingInterface instance()
    • activateRealTimeFrame

      public void activateRealTimeFrame()
      Description copied from interface: IScriptingInterface
      Sets the current time frame to real time. All the commands executed after this command becomes active will be in the real time frame (clock ticks).
      Specified by:
      activateRealTimeFrame in interface IScriptingInterface
    • activateSimulationTimeFrame

      public void activateSimulationTimeFrame()
      Description copied from interface: IScriptingInterface
      Sets the current time frame to simulation time. All the commands executed after this command becomes active will be in the simulation time frame (simulation clock in the app).
      Specified by:
      activateSimulationTimeFrame in interface IScriptingInterface
    • setHeadlineMessage

      public void setHeadlineMessage(String headline)
      Description copied from interface: IScriptingInterface
      Sets a headline message that will appear in a big font in the screen.
      Specified by:
      setHeadlineMessage in interface IScriptingInterface
      Parameters:
      headline - The headline text.
    • setSubheadMessage

      public void setSubheadMessage(String subhead)
      Description copied from interface: IScriptingInterface
      Sets a subhead message that will appear in a small font below the headline.
      Specified by:
      setSubheadMessage in interface IScriptingInterface
      Parameters:
      subhead - The subhead text.
    • clearHeadlineMessage

      public void clearHeadlineMessage()
      Description copied from interface: IScriptingInterface
      Clears the headline messge.
      Specified by:
      clearHeadlineMessage in interface IScriptingInterface
    • clearSubheadMessage

      public void clearSubheadMessage()
      Description copied from interface: IScriptingInterface
      Clears the subhead message.
      Specified by:
      clearSubheadMessage in interface IScriptingInterface
    • clearAllMessages

      public void clearAllMessages()
      Description copied from interface: IScriptingInterface
      Clears both the subhead and the headline messages.
      Specified by:
      clearAllMessages in interface IScriptingInterface
    • disableInput

      public void disableInput()
      Description copied from interface: IScriptingInterface
      Disables all input events from mouse, keyboard, touchscreen, etc.
      Specified by:
      disableInput in interface IScriptingInterface
    • enableInput

      public void enableInput()
      Description copied from interface: IScriptingInterface
      Enables all input events.
      Specified by:
      enableInput in interface IScriptingInterface
    • setCinematicCamera

      public void setCinematicCamera(boolean cinematic)
      Description copied from interface: IScriptingInterface
      Enables or disables the cinematic camera mode.
      Specified by:
      setCinematicCamera in interface IScriptingInterface
      Parameters:
      cinematic - Whether to enable or disable the cinematic mode.
    • setCameraFocus

      public void setCameraFocus(String focusName)
      Description copied from interface: IScriptingInterface
      Sets the camera in focus mode with the focus object that bears the given focusName. It returns immediately, so it does not wait for the camera direction to point to the focus.
      Specified by:
      setCameraFocus in interface IScriptingInterface
      Parameters:
      focusName - The name of the new focus object.
    • setCameraFocus

      public void setCameraFocus(String focusName, float waitTimeSeconds)
      Description copied from interface: IScriptingInterface
      Sets the camera in focus mode with the focus object that bears the given focusName. The amount of time to block and wait for the camera to face the focus can also be specified in waitTimeSeconds.
      Specified by:
      setCameraFocus in interface IScriptingInterface
      Parameters:
      focusName - The name of the new focus object.
      waitTimeSeconds - Maximum time in seconds to wait for the camera to face the focus. If negative, we wait indefinitely.
    • setCameraFocus

      public void setCameraFocus(String focusName, int waitTimeSeconds)
    • setCameraFocusInstant

      public void setCameraFocusInstant(String focusName)
      Description copied from interface: IScriptingInterface
      Sets the camera in focus mode with the given focus object. It also instantly sets the camera direction vector to point towards the focus.
      Specified by:
      setCameraFocusInstant in interface IScriptingInterface
      Parameters:
      focusName - The name of the new focus object.
    • setCameraFocusInstantAndGo

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

      public void setCameraFocusInstantAndGo(String focusName, boolean sleep)
    • setCameraLock

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

      public void setCameraCenterFocus(boolean centerFocus)
      Description copied from interface: IScriptingInterface
      Whether to look for the focus constantly when in focus mode and center it in the view or whether the view must be free. Use True to center the focus (default behaviour) and False to set it to a free view.
      Specified by:
      setCameraCenterFocus in interface IScriptingInterface
      Parameters:
      centerFocus - Whether to center the focus or not.
    • setCameraFree

      public void setCameraFree()
      Description copied from interface: IScriptingInterface
      Sets the camera in free mode.
      Specified by:
      setCameraFree in interface IScriptingInterface
    • setCameraFov1

      public void setCameraFov1()
      Description copied from interface: IScriptingInterface
      Sets the camera in FoV1 mode. The camera is positioned in Gaia's focal plane and observes what Gaia observes through its field of view 1.
      Specified by:
      setCameraFov1 in interface IScriptingInterface
    • setCameraFov2

      public void setCameraFov2()
      Description copied from interface: IScriptingInterface
      Sets the camera in FoV2 mode. The camera is positioned in Gaia's focal plane and observes what Gaia observes through its field of view 2.
      Specified by:
      setCameraFov2 in interface IScriptingInterface
    • setCameraFov1and2

      public void setCameraFov1and2()
      Description copied from interface: IScriptingInterface
      Sets the camera in Fov1 and 2 mode. The camera is positioned in Gaia's focal plane and observes what Gaia observes through its two fields of view.
      Specified by:
      setCameraFov1and2 in interface IScriptingInterface
    • setCameraPostion

      public void setCameraPostion(double[] vec)
      Description copied from interface: IScriptingInterface
      Sets the camera position to the given coordinates, in Km, equatorial system.
      Specified by:
      setCameraPostion in interface IScriptingInterface
      Parameters:
      vec - Vector of three components in internal coordinates and Km.
    • setCameraPosition

      public void setCameraPosition(double[] vec)
      Description copied from interface: IScriptingInterface
      Sets the camera position to the given coordinates, in Km, equatorial system.
      Specified by:
      setCameraPosition in interface IScriptingInterface
      Parameters:
      vec - Vector of three components in internal coordinates and Km.
    • setCameraPosition

      public void setCameraPosition(double x, double y, double z)
      Description copied from interface: IScriptingInterface
      Sets the camera position to the given coordinates, in Km, equatorial system.
      Specified by:
      setCameraPosition in interface IScriptingInterface
      Parameters:
      x - The x component.
      y - The y component.
      z - The z component.
    • setCameraPosition

      public void setCameraPosition(List vec)
    • getCameraPosition

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

      public void setCameraDirection(double[] dir)
      Description copied from interface: IScriptingInterface
      Sets the camera direction vector to the given vector, equatorial system.
      Specified by:
      setCameraDirection in interface IScriptingInterface
      Parameters:
      dir - The direction vector in equatorial coordinates.
    • setCameraDirection

      public void setCameraDirection(List dir)
    • getCameraDirection

      public double[] getCameraDirection()
      Description copied from interface: IScriptingInterface
      Gets the current camera direction vector.
      Specified by:
      getCameraDirection in interface IScriptingInterface
      Returns:
      The camera direction vector in the internal reference system.
    • setCameraUp

      public void setCameraUp(double[] up)
      Description copied from interface: IScriptingInterface
      Sets the camera up vector to the given vector, equatorial system.
      Specified by:
      setCameraUp in interface IScriptingInterface
      Parameters:
      up - The up vector in equatorial coordinates.
    • setCameraUp

      public void setCameraUp(List up)
    • getCameraUp

      public double[] getCameraUp()
      Description copied from interface: IScriptingInterface
      Gets the current camera up vector.
      Specified by:
      getCameraUp in interface IScriptingInterface
      Returns:
      The camera up vector in the internal reference system.
    • setCameraPositionAndFocus

      public void setCameraPositionAndFocus(String focus, String other, double rotation, double viewAngle)
      Description copied from interface: IScriptingInterface
      Sets 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:
      setCameraPositionAndFocus in interface IScriptingInterface
      Parameters:
      focus - The name of the focus object.
      other - The name of the other object, to the fine a line from this to foucs. Usually a light source.
      rotation - The rotation angle, in degrees.
      viewAngle - The view angle which determines the distance, in degrees.
    • setCameraPositionAndFocus

      public void setCameraPositionAndFocus(String focus, String other, long rotation, long viewAngle)
    • pointAtSkyCoordinate

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

      public void pointAtSkyCoordinate(long ra, long dec)
    • setCameraSpeed

      public void setCameraSpeed(float speed)
      Description copied from interface: IScriptingInterface
      Changes the speed multiplier of the camera and its acceleration.
      Specified by:
      setCameraSpeed in interface IScriptingInterface
      Parameters:
      speed - The new speed, from 0 to 100.
    • setCameraSpeed

      public void setCameraSpeed(int speed)
    • getCameraSpeed

      public double getCameraSpeed()
      Description copied from interface: IScriptingInterface
      Gets the current physical speed of the camera in km/h.
      Specified by:
      getCameraSpeed in interface IScriptingInterface
      Returns:
      The current speed of the camera in km/h.
    • setRotationCameraSpeed

      public void setRotationCameraSpeed(float speed)
      Description copied from interface: IScriptingInterface
      Changes the speed of the camera when it rotates around a focus.
      Specified by:
      setRotationCameraSpeed in interface IScriptingInterface
      Parameters:
      speed - The new rotation speed, from 0 to 100.
    • setRotationCameraSpeed

      public void setRotationCameraSpeed(int speed)
    • setTurningCameraSpeed

      public void setTurningCameraSpeed(float speed)
      Description copied from interface: IScriptingInterface
      Changes the turning speed of the camera.
      Specified by:
      setTurningCameraSpeed in interface IScriptingInterface
      Parameters:
      speed - The new turning speed, from 1 to 100.
    • setTurningCameraSpeed

      public void setTurningCameraSpeed(int speed)
    • setCameraSpeedLimit

      public void setCameraSpeedLimit(int index)
      Description copied from interface: IScriptingInterface
      Sets the speed limit of the camera given an index. The index corresponds to the following:
      • 0 - 100 Km/h
      • 1 - 0.5 c
      • 2 - 0.8 c
      • 3 - 0.9 c
      • 4 - 0.99 c
      • 5 - 0.99999 c
      • 6 - 1 c
      • 7 - 2 c
      • 8 - 10 c
      • 9 - 1e3 c
      • 10 - 1 AU/s
      • 11 - 10 AU/s
      • 12 - 1000 AU/s
      • 13 - 10000 AU/s
      • 14 - 1 pc/s
      • 15 - 2 pc/s
      • 16 - 10 pc/s
      • 17 - 1000 pc/s
      • 18 - unlimited
      Specified by:
      setCameraSpeedLimit in interface IScriptingInterface
      Parameters:
      index - The index of the top speed.
    • setCameraOrientationLock

      public void setCameraOrientationLock(boolean lock)
      Description copied from interface: IScriptingInterface
      Locks or unlocks the orientation of the camera to the focus object's rotation.
      Specified by:
      setCameraOrientationLock in interface IScriptingInterface
      Parameters:
      lock - Whether to lock or unlock the camera orientation to the focus.
    • cameraForward

      public void cameraForward(double cameraForward)
      Description copied from interface: IScriptingInterface
      Adds a forward movement to the camera with the given value. If value is negative the movement is backwards.
      Specified by:
      cameraForward in interface IScriptingInterface
      Parameters:
      cameraForward - The magnitude of the movement, between -1 and 1.
    • cameraForward

      public void cameraForward(long value)
    • cameraRotate

      public void cameraRotate(double deltaX, double deltaY)
      Description copied from interface: IScriptingInterface
      Adds a rotation movement to the camera around the current focus, or a pitch/yaw if in free mode.

      If the camera is not using the cinematic behaviour (IScriptingInterface.setCinematicCamera(boolean), the rotation movement will not be permanent. Use the cinematic behaviour to have the camera continue to rotate around the focus.

      Specified by:
      cameraRotate in interface IScriptingInterface
      Parameters:
      deltaX - The x component, between 0 and 1. Positive is right and negative is left.
      deltaY - The y component, between 0 and 1. Positive is up and negative is down.
    • cameraRotate

      public void cameraRotate(double deltaX, long deltaY)
    • cameraRotate

      public void cameraRotate(long deltaX, double deltaY)
    • cameraRoll

      public void cameraRoll(double roll)
      Description copied from interface: IScriptingInterface
      Adds a roll force to the camera.
      Specified by:
      cameraRoll in interface IScriptingInterface
      Parameters:
      roll - The intensity of the roll.
    • cameraRoll

      public void cameraRoll(long roll)
    • cameraTurn

      public void cameraTurn(double deltaX, double deltaY)
      Description copied from interface: IScriptingInterface
      Adds a turn force to the camera (yaw and/or pitch). If the camera is in focus mode, it permanently deviates the line of sight from the focus until centered again. If the camera is not using the cinematic behaviour (IScriptingInterface.setCinematicCamera(boolean), the turn will not be permanent. Use the cinematic behaviour to have the turn persist in time.
      Specified by:
      cameraTurn in interface IScriptingInterface
      Parameters:
      deltaX - The x component, between 0 and 1. Positive is right and negative is left.
      deltaY - The y component, between 0 and 1. Positive is up and negative is down.
    • cameraTurn

      public void cameraTurn(double deltaX, long deltaY)
    • cameraTurn

      public void cameraTurn(long deltaX, double deltaY)
    • cameraTurn

      public void cameraTurn(long deltaX, long deltaY)
    • cameraYaw

      public void cameraYaw(double amount)
      Description copied from interface: IScriptingInterface
      Adds a yaw to the camera. Same as IScriptingInterface.cameraTurn(double, double) with deltaY set to zero.
      Specified by:
      cameraYaw in interface IScriptingInterface
      Parameters:
      amount - The amount.
    • cameraYaw

      public void cameraYaw(long amount)
    • cameraPitch

      public void cameraPitch(double amount)
      Description copied from interface: IScriptingInterface
      Adds a pitch to the camera. Same as IScriptingInterface.cameraTurn(double, double) with deltaX set to zero.
      Specified by:
      cameraPitch in interface IScriptingInterface
      Parameters:
      amount - The amount.
    • cameraPitch

      public void cameraPitch(long amount)
    • cameraStop

      public void cameraStop()
      Description copied from interface: IScriptingInterface
      Stops all camera motion.
      Specified by:
      cameraStop in interface IScriptingInterface
    • cameraCenter

      public void cameraCenter()
      Description copied from interface: IScriptingInterface
      Centers the camera to the focus, removing any deviation of the line of sight. Useful to center the focus object again after turning.
      Specified by:
      cameraCenter in interface IScriptingInterface
    • getClosestObjectToCamera

      public IFocus getClosestObjectToCamera()
      Description copied from interface: IScriptingInterface
      Returns the closest object to the camera in this instant as a IFocus.
      Specified by:
      getClosestObjectToCamera in interface IScriptingInterface
      Returns:
      The closest object to the camera.
    • setFov

      public void setFov(float newFov)
      Description copied from interface: IScriptingInterface
      Changes the field of view of the camera.
      Specified by:
      setFov in interface IScriptingInterface
      Parameters:
      newFov - The new field of view value in degrees, between Constants.MIN_FOV and Constants.MAX_FOV.
    • setFov

      public void setFov(int newFov)
    • setVisibility

      public void setVisibility(String key, boolean visible)
      Description copied from interface: IScriptingInterface
      Specified by:
      setVisibility in interface IScriptingInterface
    • setComponentTypeVisibility

      public void setComponentTypeVisibility(String key, boolean visible)
      Description copied from interface: IScriptingInterface
      Sets the component described by the given name visible or invisible.
      Specified by:
      setComponentTypeVisibility in interface IScriptingInterface
      Parameters:
      key - The key of the component: "element.stars", "element.planets", "element.moons", etc. See ComponentTypes.ComponentType.
      visible - The visible value.
    • getComponentTypeVisibility

      public boolean getComponentTypeVisibility(String key)
      Description copied from interface: IScriptingInterface
      Gets the visibility of the component type described by the key. Examples of keys are "element.stars", "element.planets" or "element.moons". See ComponentTypes.ComponentType.
      Specified by:
      getComponentTypeVisibility in interface IScriptingInterface
      Parameters:
      key - The key of the component type to query.
      Returns:
      The visibility of the component type.
    • setObjectVisibility

      public boolean setObjectVisibility(String name, boolean visible)
      Description copied from interface: IScriptingInterface
      Sets the visibility of a particular object. Use this method to hide individual objects.
      Specified by:
      setObjectVisibility in interface IScriptingInterface
      Parameters:
      name - The name of the object. Must be an instance of IVisibilitySwitch.
      visible - The visible status to set. Set to false to hide the object. True to make it visible.
      Returns:
      True if the visibility was set successfully, false if there were errors.
    • getObjectVisibility

      public boolean getObjectVisibility(String name)
      Description copied from interface: IScriptingInterface
      Gets the visibility of a particular object.
      Specified by:
      getObjectVisibility in interface IScriptingInterface
      Parameters:
      name - The name of the object. Must be an instance of IVisibilitySwitch.
      Returns:
      The visibility status of the object, if it exists.
    • setLabelSizeFactor

      public void setLabelSizeFactor(float factor)
      Description copied from interface: IScriptingInterface
      Sets the label size factor. The label size will be multiplied by this.
      Specified by:
      setLabelSizeFactor in interface IScriptingInterface
      Parameters:
      factor - Factor in Constants.MIN_LABEL_SIZE and Constants.MAX_LABEL_SIZE.
    • setLabelSizeFactor

      public void setLabelSizeFactor(int factor)
    • setLineWidthFactor

      public void setLineWidthFactor(float factor)
      Description copied from interface: IScriptingInterface
      Sets the line width factor. The line width will be multiplied by this.
      Specified by:
      setLineWidthFactor in interface IScriptingInterface
      Parameters:
      factor - Factor in Constants.MIN_LINE_WIDTH and Constants.MAX_LINE_WIDTH.
    • setLineWidthFactor

      public void setLineWidthFactor(int factor)
    • setProperMotionsNumberFactor

      public void setProperMotionsNumberFactor(float factor)
      Description copied from interface: IScriptingInterface
      Sets the number factor of proper motion vectors that are visible. In [1,100].
      Specified by:
      setProperMotionsNumberFactor in interface IScriptingInterface
      Parameters:
      factor - Factor in [1,100].
    • setProperMotionsColorMode

      public void setProperMotionsColorMode(int mode)
      Description copied from interface: IScriptingInterface
      Sets the color mode of proper motion vectors.
      Specified by:
      setProperMotionsColorMode in interface IScriptingInterface
      Parameters:
      mode - The color mode:
      • 0 - direction: the normalised cartesian velocity components XYZ are mapped to the color channels RGB.
      • 1 - magnitude (speed): the magnitude of the velocity vector is mapped using a rainbow scheme (blue-green-yellow-red) with the color map limit at 100 Km/s.
      • 2 - has radial velocity: blue for stars with radial velocity, red for stars without.
      • 3 - redshift from Sun: blue stars have negative radial velocity (from the Sun), red stars have positive radial velocity (from the Sun). Blue is mapped to -100 Km/s, red is mapped to 100 Km/s.
      • 4 - redshift from camera: blue stars have negative radial velocity (from the camera), red stars have positive radial velocity (from the camera). Blue is mapped to -100 Km/s, red is mapped to 100 Km/s.
      • 5 - single color: same color for all velocity vectors.
    • setProperMotionsArrowheads

      public void setProperMotionsArrowheads(boolean arrowheadsEnabled)
      Description copied from interface: IScriptingInterface
      Sets whether to show arrowheads or not for the velocity vectors.
      Specified by:
      setProperMotionsArrowheads in interface IScriptingInterface
      Parameters:
      arrowheadsEnabled - Whether to show the velocity vectors with arrowheads.
    • setProperMotionsNumberFactor

      public void setProperMotionsNumberFactor(int factor)
    • setUnfilteredProperMotionsNumberFactor

      public void setUnfilteredProperMotionsNumberFactor(float factor)
    • setProperMotionsLengthFactor

      public void setProperMotionsLengthFactor(float factor)
      Description copied from interface: IScriptingInterface
      Sets the length of the proper motion vectors, in [500,30000].
      Specified by:
      setProperMotionsLengthFactor in interface IScriptingInterface
      Parameters:
      factor - Factor in [500,30000].
    • setProperMotionsLengthFactor

      public void setProperMotionsLengthFactor(int factor)
    • setProperMotionsMaxNumber

      public void setProperMotionsMaxNumber(long maxNumber)
      Description copied from interface: IScriptingInterface
      Sets the maximum number of proper motion vectors to add per star group.
      Specified by:
      setProperMotionsMaxNumber in interface IScriptingInterface
      Parameters:
      maxNumber - The maximum number of proper motion vectors per star group.
    • getProperMotionsMaxNumber

      public long getProperMotionsMaxNumber()
      Description copied from interface: IScriptingInterface
      Returns the current maximum number of velocity vectors per star group.
      Specified by:
      getProperMotionsMaxNumber in interface IScriptingInterface
      Returns:
      Max number of velocity vectors per star group.
    • setCrosshairVisibility

      public void setCrosshairVisibility(boolean visible)
      Description copied from interface: IScriptingInterface
      Sets the visibility of all cross-hairs.
      Specified by:
      setCrosshairVisibility in interface IScriptingInterface
      Parameters:
      visible - The visibility state, which applies to all cross-hairs.
    • setFocusCrosshairVisibility

      public void setFocusCrosshairVisibility(boolean visible)
      Description copied from interface: IScriptingInterface
      Sets the visibility of the focus object crosshair.
      Specified by:
      setFocusCrosshairVisibility in interface IScriptingInterface
      Parameters:
      visible - The visibility state.
    • setClosestCrosshairVisibility

      public void setClosestCrosshairVisibility(boolean visible)
      Description copied from interface: IScriptingInterface
      Sets the visibility of the closest object crosshair.
      Specified by:
      setClosestCrosshairVisibility in interface IScriptingInterface
      Parameters:
      visible - The visibility state.
    • setHomeCrosshairVisibility

      public void setHomeCrosshairVisibility(boolean visible)
      Description copied from interface: IScriptingInterface
      Sets the visibility of the home object crosshair.
      Specified by:
      setHomeCrosshairVisibility in interface IScriptingInterface
      Parameters:
      visible - The visibility state.
    • setMinimapVisibility

      public void setMinimapVisibility(boolean visible)
      Description copied from interface: IScriptingInterface
      Shows or hides the minimap.
      Specified by:
      setMinimapVisibility in interface IScriptingInterface
      Parameters:
      visible - The visibility state.
    • setAmbientLight

      public void setAmbientLight(float ambientLight)
      Description copied from interface: IScriptingInterface
      Sets the ambient light to a certain value.
      Specified by:
      setAmbientLight in interface IScriptingInterface
      Parameters:
      ambientLight - The value of the ambient light in [0,1].
    • setAmbientLight

      public void setAmbientLight(int value)
    • setSimulationTime

      public void setSimulationTime(int year, int month, int day, int hour, int min, int sec, int millisec)
      Description copied from interface: IScriptingInterface
      Sets the time of the application, in UTC.
      Specified by:
      setSimulationTime in interface IScriptingInterface
      Parameters:
      year - The year to represent.
      month - The month-of-year to represent, from 1 (January) to 12 (December).
      day - The day-of-month to represent, from 1 to 31.
      hour - The hour-of-day to represent, from 0 to 23.
      min - The minute-of-hour to represent, from 0 to 59.
      sec - The second-of-minute to represent, from 0 to 59.
      millisec - The millisecond-of-second, from 0 to 999.
    • setSimulationTime

      public void setSimulationTime(long time)
      Description copied from interface: IScriptingInterface
      Sets the time of the application. The long value represents specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
      Specified by:
      setSimulationTime in interface IScriptingInterface
      Parameters:
      time - Number of milliseconds since the epoch (Jan 1, 1970).
    • getSimulationTime

      public long getSimulationTime()
      Description copied from interface: IScriptingInterface
      Returns the current simulation time as the number of milliseconds since Jan 1, 1970 GMT.
      Specified by:
      getSimulationTime in interface IScriptingInterface
      Returns:
      Number of milliseconds since the epoch (Jan 1, 1970).
    • getSimulationTimeArr

      public int[] getSimulationTimeArr()
      Description copied from interface: IScriptingInterface
      Returns the current UTC simulation time in an array.
      Specified by:
      getSimulationTimeArr in interface IScriptingInterface
      Returns:
      The current simulation time in an array with the given indices.
      • 0 - The year.
      • 1 - The month, from 1 (January) to 12 (December).
      • 2 - The day-of-month, from 1 to 31.
      • 3 - The hour-of-day, from 0 to 23.
      • 4 - The minute-of-hour, from 0 to 59.
      • 5 - The second-of-minute, from 0 to 59.
      • 6 - The millisecond-of-second, from 0 to 999.
    • startSimulationTime

      public void startSimulationTime()
      Description copied from interface: IScriptingInterface
      Starts the simulation.
      Specified by:
      startSimulationTime in interface IScriptingInterface
    • stopSimulationTime

      public void stopSimulationTime()
      Description copied from interface: IScriptingInterface
      Stops the simulation time.
      Specified by:
      stopSimulationTime in interface IScriptingInterface
    • isSimulationTimeOn

      public boolean isSimulationTimeOn()
      Description copied from interface: IScriptingInterface
      Queries whether the time is on or not.
      Specified by:
      isSimulationTimeOn in interface IScriptingInterface
      Returns:
      True if the time is on, false otherwise.
    • setSimulationPace

      public void setSimulationPace(double warp)
      Specified by:
      setSimulationPace in interface IScriptingInterface
    • setSimulationPace

      public void setSimulationPace(long warp)
    • setTimeWarp

      public void setTimeWarp(double warp)
      Description copied from interface: IScriptingInterface
      Sets the simulation time warp factor.
      Specified by:
      setTimeWarp in interface IScriptingInterface
      Parameters:
      warp - The warp as a factor of real physical time pace. 2.0 sets the time to be twice as fast as real time.
    • setTimeWarp

      public void setTimeWarp(long warp)
    • setTargetTime

      public void setTargetTime(long ms)
      Description copied from interface: IScriptingInterface
      Sets a time bookmark in the global clock that, when reached, the clock automatically stops.
      Specified by:
      setTargetTime in interface IScriptingInterface
      Parameters:
      ms - The time as the number of milliseconds since the epoch (Jan 1, 1970).
    • setTargetTime

      public void setTargetTime(int year, int month, int day, int hour, int min, int sec, int millisec)
      Description copied from interface: IScriptingInterface
      Sets a time bookmark in the global clock that, when reached, the clock automatically stops.
      Specified by:
      setTargetTime in interface IScriptingInterface
      Parameters:
      year - The year to represent.
      month - The month-of-year to represent, from 1 (January) to 12 (December).
      day - The day-of-month to represent, from 1 to 31.
      hour - The hour-of-day to represent, from 0 to 23.
      min - The minute-of-hour to represent, from 0 to 59.
      sec - The second-of-minute to represent, from 0 to 59.
      millisec - The millisecond-of-second, from 0 to 999.
    • unsetTargetTime

      public void unsetTargetTime()
      Description copied from interface: IScriptingInterface
      Unsets the target time bookmark from the global clock, if any.
      Specified by:
      unsetTargetTime in interface IScriptingInterface
    • setStarBrightness

      public void setStarBrightness(float brightness)
      Description copied from interface: IScriptingInterface
      Sets the star brightness value.
      Specified by:
      setStarBrightness in interface IScriptingInterface
      Parameters:
      brightness - The brightness value, between 0 and 100.
    • setStarBrightnessPower

      public void setStarBrightnessPower(float power)
      Description copied from interface: IScriptingInterface
      Sets the star brightness power profile value. This allows for adjusting the shape of the curve: brightness = brightness^power. Default value is 0.6.
      Specified by:
      setStarBrightnessPower in interface IScriptingInterface
      Parameters:
      power - The power value.
    • setStarBrightness

      public void setStarBrightness(int brightness)
    • getStarBrightness

      public float getStarBrightness()
      Description copied from interface: IScriptingInterface
      Gets the star brightness value.
      Specified by:
      getStarBrightness in interface IScriptingInterface
      Returns:
      The brightness value, between 0 and 100.
    • setStarSize

      public void setStarSize(float size)
      Description copied from interface: IScriptingInterface
      Sets the size of the rasterized stars, in pixels.
      Specified by:
      setStarSize in interface IScriptingInterface
      Parameters:
      size - The size value in pixels, between Constants.MIN_STAR_POINT_SIZE and Constants.MAX_STAR_POINT_SIZE.
    • setStarSize

      public void setStarSize(int size)
    • getStarSize

      public float getStarSize()
      Description copied from interface: IScriptingInterface
      Gets the current star size value in pixels.
      Specified by:
      getStarSize in interface IScriptingInterface
      Returns:
      The size value, in pixels.
    • getStarMinOpacity

      public float getStarMinOpacity()
      Description copied from interface: IScriptingInterface
      Gets the minimum star opacity.
      Specified by:
      getStarMinOpacity in interface IScriptingInterface
      Returns:
      The minimum opacity value.
    • getMinStarOpacity

      public float getMinStarOpacity()
    • setStarMinOpacity

      public void setStarMinOpacity(float minOpacity)
      Description copied from interface: IScriptingInterface
      Sets the minimum star opacity.
      Specified by:
      setStarMinOpacity in interface IScriptingInterface
      Parameters:
      minOpacity - The minimum opacity value, between Constants.MIN_STAR_MIN_OPACITY and Constants.MAX_STAR_MIN_OPACITY.
    • setMinStarOpacity

      public void setMinStarOpacity(float minOpacity)
    • setStarTextureIndex

      public void setStarTextureIndex(int index)
      Description copied from interface: IScriptingInterface
      Sets the star texture index, in [1, 4]

      1 - horizontal spike 2 - god rays 3 - horizontal and vertical spikes 4 - simple radial profile

      Specified by:
      setStarTextureIndex in interface IScriptingInterface
      Parameters:
      index - The new star texture index
    • setStarGroupNearestNumber

      public void setStarGroupNearestNumber(int n)
      Description copied from interface: IScriptingInterface
      Sets the number of nearest stars to be processed for each star group. This will limit the number of stars that are rendered with billboards, labels and velocity vectors.
      Specified by:
      setStarGroupNearestNumber in interface IScriptingInterface
      Parameters:
      n - The new number of nearest stars
    • setStarGroupBillboard

      public void setStarGroupBillboard(boolean flag)
      Description copied from interface: IScriptingInterface
      Enable or disable the rendering of close stars as billboards.
      Specified by:
      setStarGroupBillboard in interface IScriptingInterface
      Parameters:
      flag - The state flag
    • setOrbitSolidAngleThreshold

      public void setOrbitSolidAngleThreshold(float angleDeg)
      Description copied from interface: IScriptingInterface
      Sets the solid angle below which orbits fade and disappear.
      Specified by:
      setOrbitSolidAngleThreshold in interface IScriptingInterface
      Parameters:
      angleDeg - The threshold angle in degrees
    • setProjectionYaw

      public void setProjectionYaw(float yaw)
      Description copied from interface: IScriptingInterface
      Sets the projection yaw angle (if this is a slave instance), in degrees. The yaw angle turns the camera to the right. This function is intended for multi-projector setups, to configure slaves without restarting Gaia Sky.
      Specified by:
      setProjectionYaw in interface IScriptingInterface
      Parameters:
      yaw - The yaw angle in degrees.
    • setProjectionPitch

      public void setProjectionPitch(float pitch)
      Description copied from interface: IScriptingInterface
      Sets the projection pitch angle (if this is a slave instance), in degrees. The pitch angle turns the camera up. This function is intended for multi-projector setups, to configure slaves without restarting Gaia Sky.
      Specified by:
      setProjectionPitch in interface IScriptingInterface
      Parameters:
      pitch - The pitch angle in degrees.
    • setProjectionRoll

      public void setProjectionRoll(float roll)
      Description copied from interface: IScriptingInterface
      Sets the projection roll angle (if this is a slave instance), in degrees. The roll angle rolls the camera clockwise. This function is intended for multi-projector setups, to configure slaves without restarting Gaia Sky.
      Specified by:
      setProjectionRoll in interface IScriptingInterface
      Parameters:
      roll - The roll angle in degrees.
    • setProjectionFov

      public void setProjectionFov(float newFov)
      Description copied from interface: IScriptingInterface
      Same as IScriptingInterface.setFov(float), but bypassing the restriction of an active projection in the slave (slaves that have an active projection do not accept fov modification events).
      Specified by:
      setProjectionFov in interface IScriptingInterface
      Parameters:
      newFov - The field of view angle.
    • setLimitFps

      public void setLimitFps(double limitFps)
      Description copied from interface: IScriptingInterface
      Limits the frame rate of Gaia Sky.
      Specified by:
      setLimitFps in interface IScriptingInterface
      Parameters:
      limitFps - The new maximum frame rate as a double-precision floating point number. Set zero or negative to unlimited.
    • setLimitFps

      public void setLimitFps(int limitFps)
      Description copied from interface: IScriptingInterface
      Limits the frame rate of Gaia Sky.
      Specified by:
      setLimitFps in interface IScriptingInterface
      Parameters:
      limitFps - The new maximum frame rate as an integer number. Set zero or negative to unlimited.
    • setMinStarOpacity

      public void setMinStarOpacity(int opacity)
    • configureFrameOutput

      public void configureFrameOutput(int width, int height, int fps, String folder, String namePrefix)
      Description copied from interface: IScriptingInterface
      Configures the frame output system, setting the resolution of the images, the target frames per second, the output folder and the image name prefix. This function sets the frame output mode to 'redraw'.
      Specified by:
      configureFrameOutput in interface IScriptingInterface
      Parameters:
      width - Width of images.
      height - Height of images.
      fps - Target frames per second (number of images per second).
      folder - The output folder path.
      namePrefix - The file name prefix.
    • configureFrameOutput

      public void configureFrameOutput(int width, int height, double fps, String folder, String namePrefix)
      Description copied from interface: IScriptingInterface
      Configures the frame output system, setting the resolution of the images, the target frames per second, the output folder and the image name prefix. This function sets the frame output mode to 'redraw'.
      Specified by:
      configureFrameOutput in interface IScriptingInterface
      Parameters:
      width - Width of images.
      height - Height of images.
      fps - Target frames per second (number of images per second).
      folder - The output folder path.
      namePrefix - The file name prefix.
    • configureRenderOutput

      public void configureRenderOutput(int width, int height, int fps, String folder, String namePrefix)
      Description copied from interface: IScriptingInterface
      Configures the frame output system, setting the resolution of the images, the target frames per second, the output folder and the image name prefix.
      Specified by:
      configureRenderOutput in interface IScriptingInterface
      Parameters:
      width - Width of images.
      height - Height of images.
      fps - Target frames per second (number of images per second).
      folder - The output folder path.
      namePrefix - The file name prefix.
    • setFrameOutputMode

      public void setFrameOutputMode(String screenshotMode)
      Description copied from interface: IScriptingInterface
      Sets the frame output mode. Possible values are 'redraw' or 'simple'. Simple mode is faster and just outputs the last frame rendered to the Gaia Sky window, with the same resolution and containing the UI elements. Redraw mode redraws the last frame using the resolution configured using IScriptingInterface.configureFrameOutput(int, int, int, String, String) and it does not draw the UI elements.
      Specified by:
      setFrameOutputMode in interface IScriptingInterface
      Parameters:
      screenshotMode - The screenshot mode. 'simple' or 'redraw'.
    • isFrameOutputActive

      public boolean isFrameOutputActive()
      Description copied from interface: IScriptingInterface
      Is the frame output system on?
      Specified by:
      isFrameOutputActive in interface IScriptingInterface
      Returns:
      True if the render output is active.
    • isRenderOutputActive

      public boolean isRenderOutputActive()
      Description copied from interface: IScriptingInterface
      Is the frame output system on?
      Specified by:
      isRenderOutputActive in interface IScriptingInterface
      Returns:
      True if the frame output is active.
    • getFrameOutputFps

      public double getFrameOutputFps()
      Description copied from interface: IScriptingInterface
      Gets the current FPS setting in the frame output system.
      Specified by:
      getFrameOutputFps in interface IScriptingInterface
      Returns:
      The FPS setting.
    • getRenderOutputFps

      public double getRenderOutputFps()
      Description copied from interface: IScriptingInterface
      Gets the current FPS setting in the frame output system.
      Specified by:
      getRenderOutputFps in interface IScriptingInterface
      Returns:
      The FPS setting.
    • setFrameOutput

      public void setFrameOutput(boolean active)
      Description copied from interface: IScriptingInterface
      Activates or deactivates the image output system. If called with true, the system starts outputting images right away.
      Specified by:
      setFrameOutput in interface IScriptingInterface
      Parameters:
      active - Whether to activate or deactivate the frame output system.
    • getObject

      public SceneGraphNode getObject(String name)
      Description copied from interface: IScriptingInterface
      Gets an object from the scene graph by name or id (HIP, TYC, Gaia SourceId).
      Specified by:
      getObject in interface IScriptingInterface
      Parameters:
      name - The name or id (HIP, TYC, Gaia SourceId) of the object.
      Returns:
      The object as a SceneGraphNode, or null if it does not exist.
    • getObject

      public SceneGraphNode getObject(String name, double timeOutSeconds)
      Description copied from interface: IScriptingInterface
      Gets an object by name or id (HIP, TYC, Gaia SourceID), optionally waiting until the object is available, with a timeout.
      Specified by:
      getObject in interface IScriptingInterface
      Parameters:
      name - The name or id (HIP, TYC, Gaia SourceId) of the object.
      timeOutSeconds - The timeout in seconds to wait until returning. If negative, it waits indefinitely.
      Returns:
      The object if it exists, or null if it does not and block is false, or if block is true and the timeout has passed.
    • setObjectSizeScaling

      public void setObjectSizeScaling(String name, double scalingFactor)
      Description copied from interface: IScriptingInterface
      Sets the given size scaling factor to the object identified by name. This method will only work with model objects such as planets, asteroids, satellites, etc. It will not work with orbits, stars or any other types.

      Also, use this with caution, as scaling the size of objects can have unintended side effects, and remember to set the scaling back to 1.0 at the end of your script.

      Specified by:
      setObjectSizeScaling in interface IScriptingInterface
      Parameters:
      name - The name or id of the object.
      scalingFactor - The scaling factor to scale the size of that object.
    • setOrbitCoordinatesScaling

      public void setOrbitCoordinatesScaling(String name, double scalingFactor)
      Description copied from interface: IScriptingInterface
      Sets the given orbit coordinates scaling factor to the AbstractOrbitCoordinates identified by name. See AbstractOrbitCoordinates and its subclasses.

      Also, use this with caution, as scaling coordinates may have unintended side effects, and remember to set the scaling back to 1.0 at the end of your script.

      Specified by:
      setOrbitCoordinatesScaling in interface IScriptingInterface
      Parameters:
      name - The name of the coordinates object (OrbitLintCoordinates, EclipticCoordinates, SaturnVSOP87, UranusVSOP87, EarthVSOP87, MercuryVSOP87, ..., PlutoCoordinates, GaiaCoordinates, MoonAACoordinates).
      scalingFactor - The scaling factor.
    • refreshAllOrbits

      public void refreshAllOrbits()
      Description copied from interface: IScriptingInterface
      Forces all orbits to refresh immediately.
      Specified by:
      refreshAllOrbits in interface IScriptingInterface
    • getObjectRadius

      public double getObjectRadius(String name)
      Description copied from interface: IScriptingInterface
      Gets the size of the object identified by name, in Km, by name or id (HIP, TYC, sourceId).
      Specified by:
      getObjectRadius in interface IScriptingInterface
      Parameters:
      name - The name or id (HIP, TYC, sourceId) of the object.
      Returns:
      The radius of the object in Km. If the object identifed by name or id (HIP, TYC, sourceId). does not exist, it returns a negative value.
    • goToObject

      public void goToObject(String name)
      Description copied from interface: IScriptingInterface
      Runs a seamless trip to the object with the name focusName until the object view angle is 20 degrees.
      Specified by:
      goToObject in interface IScriptingInterface
      Parameters:
      name - The name or id (HIP, TYC, sourceId) of the object.
    • goToObject

      public void goToObject(String name, double angle)
      Description copied from interface: IScriptingInterface
      Runs a seamless trip to the object with the name focusName until the object view angle viewAngle is met. If angle is negative, the default angle is 20 degrees.
      Specified by:
      goToObject in interface IScriptingInterface
      Parameters:
      name - The name or id (HIP, TYC, sourceId) of the object.
      angle - The target view angle of the object, in degrees. The angle gets larger and larger as we approach the object.
    • goToObject

      public void goToObject(String name, double viewAngle, float waitTimeSeconds)
      Description copied from interface: IScriptingInterface
      Runs a seamless trip to the object with the name focusName until the object view angle viewAngle is met. If angle is negative, the default angle is 20 degrees. If waitTimeSeconds is positive, it indicates the number of seconds to wait (block the function) for the camera to face the focus before starting the forward movement. This very much depends on the turn velocity of the camera. See IScriptingInterface.setTurningCameraSpeed(float).
      Specified by:
      goToObject in interface IScriptingInterface
      Parameters:
      name - The name or id (HIP, TYC, sourceId) of the object.
      viewAngle - The target view angle of the object, in degrees. The angle gets larger and larger as we approach the object.
      waitTimeSeconds - The seconds to wait for the camera direction vector and the vector from the camera position to the target object to be aligned.
    • goToObject

      public void goToObject(String name, double viewAngle, int waitTimeSeconds)
    • goToObject

      public void goToObject(String name, long viewAngle, int waitTimeSeconds)
    • goToObject

      public void goToObject(String name, long viewAngle, float waitTimeSeconds)
    • goToObject

      public void goToObject(String name, double viewAngle, int waitTimeSeconds, AtomicBoolean stop)
    • goToObject

      public void goToObject(IFocus object, double viewAngle, int waitTimeSeconds, AtomicBoolean stop)
    • goToObjectInstant

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

      public void landOnObject(String name)
      Description copied from interface: IScriptingInterface
      Lands on the object with the given name, if it is an instance of Planet. The land location is determined by the line of sight from the current position of the camera to the object.
      Specified by:
      landOnObject in interface IScriptingInterface
      Parameters:
      name - The proper name of the object.
    • landAtObjectLocation

      public void landAtObjectLocation(String name, String locationName)
      Description copied from interface: IScriptingInterface
      Lands on the object with the given name, if it is an instance of Planet, at the location with the given name, if it exists.
      Specified by:
      landAtObjectLocation in interface IScriptingInterface
      Parameters:
      name - The proper name of the object.
      locationName - The name of the location to land on
    • landAtObjectLocation

      public void landAtObjectLocation(String name, String locationName, AtomicBoolean stop)
    • landAtObjectLocation

      public void landAtObjectLocation(IFocus object, String locationName, AtomicBoolean stop)
    • landAtObjectLocation

      public void landAtObjectLocation(String name, double longitude, double latitude)
      Description copied from interface: IScriptingInterface
      Lands on the object with the given name, if it is an instance of Planet, at the location specified in by [latitude, longitude], in degrees.
      Specified by:
      landAtObjectLocation in interface IScriptingInterface
      Parameters:
      name - The proper name of the object.
      longitude - The location longitude, in degrees.
      latitude - The location latitude, in degrees.
    • getDistanceTo

      public double getDistanceTo(String name)
      Description copied from interface: IScriptingInterface
      Returns the distance 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:
      getDistanceTo in interface IScriptingInterface
      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.
    • getStarParameters

      public double[] getStarParameters(String id)
      Description copied from interface: IScriptingInterface
      Returns the star parameters given its identifier or name, if the star exists and it is loaded.
      Specified by:
      getStarParameters in interface IScriptingInterface
      Parameters:
      id - The star identifier or name.
      Returns:
      An array with (ra [deg], dec [deg], parallax [mas], pmra [mas/yr], pmdec [mas/yr], radvel [km/s], appmag [mag], red [0,1], green [0,1], blue [0,1]) if the star exists and is loaded, null otherwise.
    • getObjectPosition

      public double[] getObjectPosition(String name)
      Description copied from interface: IScriptingInterface
      Gets the current position of the object identified by name in the internal coordinate system and internal units. If the object does not exist, it returns null
      Specified by:
      getObjectPosition in interface IScriptingInterface
      Parameters:
      name - The name or id (HIP, TYC, sourceId) of the object.
      Returns:
      A 3-vector with the object's position in the internal reference system.
    • setGuiScrollPosition

      public void setGuiScrollPosition(float pixelY)
      Description copied from interface: IScriptingInterface
      Sets the vertical scroll position in the GUI.
      Specified by:
      setGuiScrollPosition in interface IScriptingInterface
      Parameters:
      pixelY - The pixel to set the scroll position to.
    • setGuiScrollPosition

      public void setGuiScrollPosition(int pixelY)
    • enableGui

      public void enableGui()
      Description copied from interface: IScriptingInterface
      Enables the GUI rendering. This makes the user interface to be rendered and updated again if it was previously disabled. Otherwise, it has no effect.
      Specified by:
      enableGui in interface IScriptingInterface
    • disableGui

      public void disableGui()
      Description copied from interface: IScriptingInterface
      Disables the GUI rendering. This causes the user interface to no longer be rendered or updated.
      Specified by:
      disableGui in interface IScriptingInterface
    • displayMessageObject

      public void displayMessageObject(int id, String message, float x, float y, float r, float g, float b, float a, float fontSize)
      Description copied from interface: IScriptingInterface
      Adds a new one-line message in the screen with the given id and the given coordinates. If an object already exists with the given id, it is removed. However, if a message object already exists with the same id, its properties are updated. The messages placed with this method will not appear in the screenshots/frames in advanced mode. This is intended for running interactively only.
      Specified by:
      displayMessageObject in interface IScriptingInterface
      Parameters:
      id - A unique identifier, used to identify this message when you want to remove it.
      message - The string message, to be displayed in one line. But explicit newline breaks the line.
      x - The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.
      y - The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.
      r - The red component of the color in [0,1].
      g - The green component of the color in [0,1].
      b - The blue component of the color in [0,1].
      a - The alpha component of the color in [0,1].
      fontSize - The size of the font. The system will use the existing font closest to the chosen size and scale it up or down to match the desired size. Scaling can cause artifacts, so to ensure the best font quality, stick to the existing sizes.
    • displayMessageObject

      public void displayMessageObject(int id, String message, double x, double y, double[] color, double fontSize)
      Description copied from interface: IScriptingInterface
      Same as IScriptingInterface.displayImageObject(int, String, float, float, float, float, float, float) but using an array for the color instead of giving each component separately.
      Specified by:
      displayMessageObject in interface IScriptingInterface
      Parameters:
      id - A unique identifier, used to identify this message when you want to remove it.
      message - The string message, to be displayed in one line. But explicit newline breaks the line.
      x - The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.
      y - The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.
      color - The color as an array of {red, green, blue, alpha} where each element is in [0,1].
      fontSize - The size of the font. The system will use the existing font closest to the chosen size and scale it up or down to match the desired size. Scaling can cause artifacts, so to ensure the best font quality, stick to the existing sizes.
    • displayMessageObject

      public void displayMessageObject(int id, String message, double x, double y, List color, double fontSize)
    • displayMessageObject

      public void displayMessageObject(int id, String message, float x, float y, float r, float g, float b, float a, int fontSize)
    • displayTextObject

      public void displayTextObject(int id, String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, float fontSize)
      Description copied from interface: IScriptingInterface
      Adds a new multi-line text in the screen with the given id, coordinates and size. If an object already exists with the given id, it is removed. However, if a text object already exists with the same id, its properties are updated. The texts placed with this method will not appear in the screenshots/frames in advanced mode. This is intended for running interactively only.
      Specified by:
      displayTextObject in interface IScriptingInterface
      Parameters:
      id - A unique identifier, used to identify this message when you want to remove it.
      text - The string message, to be displayed line-wrapped in the box defined by maxWidth and maxHeight. Explicit newline still breaks the line.
      x - The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.
      y - The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.
      maxWidth - The maximum width in screen percentage [0,1]. Set to 0 to let the system decide.
      maxHeight - The maximum height in screen percentage [0,1]. Set to 0 to let the system decide.
      r - The red component of the color in [0,1].
      g - The green component of the color in [0,1].
      b - The blue component of the color in [0,1].
      a - The alpha component of the color in [0,1].
      fontSize - The size of the font. The system will use the existing font closest to the chosen size.
    • displayTextObject

      public void displayTextObject(int id, String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, int fontSize)
    • displayImageObject

      public void displayImageObject(int id, String path, float x, float y, float r, float g, float b, float a)
      Description copied from interface: IScriptingInterface
      Adds a new image object at the given coordinates. If an object already exists with the given id, it is removed. However, if an image object already exists with the same id, its properties are updated.
      Warning: This method will only work in the asynchronous mode. Run the script with the "asynchronous" check box activated!
      Specified by:
      displayImageObject in interface IScriptingInterface
      Parameters:
      id - A unique identifier, used to identify this message when you want to remove it.
      path - The path to the image. It can either be an absolute path (not recommended) or a path relative to the Gaia Sky folder.
      x - The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.
      y - The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.
      r - The red component of the color in [0,1].
      g - The green component of the color in [0,1].
      b - The blue component of the color in [0,1].
      a - The alpha component of the color in [0,1].
    • displayImageObject

      public void displayImageObject(int id, String path, double x, double y, double[] color)
      Description copied from interface: IScriptingInterface
      Same as IScriptingInterface.displayImageObject(int, String, float, float, float, float, float, float) but using a double array for the color instead of each component separately.
      Specified by:
      displayImageObject in interface IScriptingInterface
      Parameters:
      id - A unique identifier, used to identify this message when you want to remove it.
      path - The path to the image. It can either be an absolute path (not recommended) or a path relative to the Gaia Sky folder.
      x - The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.
      y - The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.
      color - The color as an array of {red, green, blue, alpha} where each element is in [0,1].
    • displayImageObject

      public void displayImageObject(int id, String path, double x, double y, List color)
    • displayImageObject

      public void displayImageObject(int id, String path, float x, float y)
      Description copied from interface: IScriptingInterface
      Adds a new image object at the given coordinates. If an object already exists with the given id, it is removed. However, if an image object already exists with the same id, its properties are updated.
      The messages placed with this method will not appear in the screenshots/frames in advanced mode. This is intended for running interactively only.
      Specified by:
      displayImageObject in interface IScriptingInterface
      Parameters:
      id - A unique identifier, used to identify this message when you want to remove it.
      path - The path to the image. It can either be an absolute path (not recommended) or a path relative to the Gaia Sandbox folder.
      x - The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.
      y - The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.
    • removeAllObjects

      public void removeAllObjects()
      Description copied from interface: IScriptingInterface
      Removes all objects.
      Specified by:
      removeAllObjects in interface IScriptingInterface
    • removeObject

      public void removeObject(int id)
      Description copied from interface: IScriptingInterface
      Removes the item with the given id.
      Specified by:
      removeObject in interface IScriptingInterface
      Parameters:
      id - Integer with the integer id of the object to remove.
    • removeObjects

      public void removeObjects(int[] ids)
      Description copied from interface: IScriptingInterface
      Removes the items with the given ids. They can either messages, images or whatever else.
      Specified by:
      removeObjects in interface IScriptingInterface
      Parameters:
      ids - Vector with the integer ids of the objects to remove
    • removeObjects

      public void removeObjects(List ids)
    • maximizeInterfaceWindow

      public void maximizeInterfaceWindow()
      Description copied from interface: IScriptingInterface
      Maximizes the interface window.
      Specified by:
      maximizeInterfaceWindow in interface IScriptingInterface
    • minimizeInterfaceWindow

      public void minimizeInterfaceWindow()
      Description copied from interface: IScriptingInterface
      Minimizes the interface window.
      Specified by:
      minimizeInterfaceWindow in interface IScriptingInterface
    • setGuiPosition

      public void setGuiPosition(float x, float y)
      Description copied from interface: IScriptingInterface
      Moves the interface window to a new position.
      Specified by:
      setGuiPosition in interface IScriptingInterface
      Parameters:
      x - The new x coordinate of the new top-left corner of the window, in [0,1] from left to right.
      y - The new y coordinate of the new top-left corner of the window, in [0,1] from bottom to top.
    • setGuiPosition

      public void setGuiPosition(int x, int y)
    • setGuiPosition

      public void setGuiPosition(float x, int y)
    • setGuiPosition

      public void setGuiPosition(int x, float y)
    • waitForInput

      public void waitForInput()
      Description copied from interface: IScriptingInterface
      Blocks the execution until any kind of input (keyboard, mouse, etc.) is received.
      Specified by:
      waitForInput in interface IScriptingInterface
    • waitForEnter

      public void waitForEnter()
      Description copied from interface: IScriptingInterface
      Blocks the execution until the Enter key is pressed.
      Specified by:
      waitForEnter in interface IScriptingInterface
    • waitForInput

      public void waitForInput(int keyCode)
      Description copied from interface: IScriptingInterface
      Blocks the execution until the given key or button is pressed.
      Specified by:
      waitForInput in interface IScriptingInterface
      Parameters:
      keyCode - The key or button code. Please see Input.
    • getScreenWidth

      public int getScreenWidth()
      Description copied from interface: IScriptingInterface
      Returns the screen width in pixels.
      Specified by:
      getScreenWidth in interface IScriptingInterface
      Returns:
      The screen width in pixels.
    • getScreenHeight

      public int getScreenHeight()
      Description copied from interface: IScriptingInterface
      Returns the screen height in pixels.
      Specified by:
      getScreenHeight in interface IScriptingInterface
      Returns:
      The screen height in pixels.
    • getPositionAndSizeGui

      public float[] getPositionAndSizeGui(String name)
      Description copied from interface: IScriptingInterface
      Returns the size and position of the GUI element that goes by the given name or null if such element does not exist. Warning> This will only work in asynchronous mode.
      Specified by:
      getPositionAndSizeGui in interface IScriptingInterface
      Parameters:
      name - The name of the gui element.
      Returns:
      A vector of floats with the position (0, 1) of the bottom left corner in pixels from the bottom-left of the screen and the size (2, 3) in pixels of the element.
    • expandGuiComponent

      public void expandGuiComponent(String name)
      Description copied from interface: IScriptingInterface
      Expands the component with the given name.
      Specified by:
      expandGuiComponent in interface IScriptingInterface
      Parameters:
      name - The name, as in `CameraComponent` or `ObjectsComponent`
    • collapseGuiComponent

      public void collapseGuiComponent(String name)
      Description copied from interface: IScriptingInterface
      Collapses the component with the given name.
      Specified by:
      collapseGuiComponent in interface IScriptingInterface
      Parameters:
      name - The name, as in `CameraComponent` or `ObjectsComponent`
    • getVersionNumber

      public String getVersionNumber()
      Description copied from interface: IScriptingInterface
      Returns the version number string.
      Specified by:
      getVersionNumber in interface IScriptingInterface
      Returns:
      The version number string.
    • waitFocus

      public boolean waitFocus(String name, long timeoutMs)
      Description copied from interface: IScriptingInterface
      Blocks the script until the focus is the object indicated by the name. There is an optional time out.
      Specified by:
      waitFocus in interface IScriptingInterface
      Parameters:
      name - The name of the focus to wait for.
      timeoutMs - Timeout in ms to wait. Set negative to disable timeout.
      Returns:
      True if the timeout ran out. False otherwise.
    • setCameraRecorderFps

      public void setCameraRecorderFps(double targetFps)
      Description copied from interface: IScriptingInterface
      Sets the target frame rate of the camera recorder. This will cap the frame rate of Gaia Sky to this value while the camera is recording. When playing the camera file back, you are responsible to set the right frame rate.
      Specified by:
      setCameraRecorderFps in interface IScriptingInterface
      Parameters:
      targetFps - The target frame rate for the camera recorder.
    • preloadTexture

      public void preloadTexture(String path)
      Description copied from interface: IScriptingInterface
      Pre-loads the given image as a texture for later use. The texture will be cached for later use.
      Specified by:
      preloadTexture in interface IScriptingInterface
      Parameters:
      path - The path of the image file to preload.
    • getAssetsLocation

      public String getAssetsLocation()
      Specified by:
      getAssetsLocation in interface IScriptingInterface
    • preloadTextures

      public void preloadTextures(String[] paths)
      Description copied from interface: IScriptingInterface
      Pre-loads the given images as textures for later use. They will be cached for the subsequent uses.
      Specified by:
      preloadTextures in interface IScriptingInterface
      Parameters:
      paths - The texture paths.
    • startRecordingCameraPath

      public void startRecordingCameraPath()
      Description copied from interface: IScriptingInterface
      Starts recording the camera path to an auto-generated file in the default camera folder. This command has no effect if the camera is already being recorded.
      Specified by:
      startRecordingCameraPath in interface IScriptingInterface
    • startRecordingCameraPath

      public void startRecordingCameraPath(String fileName)
      Description copied from interface: IScriptingInterface
      Starts recording a camera path with the given filename. The filename is without extension or path. The final path with the camera file, after invoking IScriptingInterface.stopRecordingCameraPath(), is:

      IScriptingInterface.getDefaultCameraDir() + "/" + filename + ".gsc"

      This command has no effect if the camera is already being recorded.
      Specified by:
      startRecordingCameraPath in interface IScriptingInterface
    • stopRecordingCameraPath

      public void stopRecordingCameraPath()
      Description copied from interface: IScriptingInterface
      Stops the current camera recording. This command has no effect if the camera was not being recorded.
      Specified by:
      stopRecordingCameraPath in interface IScriptingInterface
    • playCameraPath

      public void playCameraPath(String file, boolean sync)
      Description copied from interface: IScriptingInterface
      Specified by:
      playCameraPath in interface IScriptingInterface
    • runCameraPath

      public void runCameraPath(String file, boolean sync)
      Description copied from interface: IScriptingInterface
      Runs a .gsc camera path file and returns immediately. This function accepts a boolean indicating whether to wait for the camera path file to finish or not.
      Specified by:
      runCameraPath in interface IScriptingInterface
      Parameters:
      file - The path to the camera file. Path is relative to the application's root directory or absolute.
      sync - If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
    • playCameraPath

      public void playCameraPath(String file)
      Description copied from interface: IScriptingInterface
      Specified by:
      playCameraPath in interface IScriptingInterface
    • runCameraPath

      public void runCameraPath(String file)
      Description copied from interface: IScriptingInterface
      Runs a .gsc camera path file and returns immediately. This function does not wait for the camera file to finish playing.
      Specified by:
      runCameraPath in interface IScriptingInterface
      Parameters:
      file - The path to the camera file. Path is relative to the application's root directory or absolute.
    • runCameraRecording

      public void runCameraRecording(String file)
      Description copied from interface: IScriptingInterface
      Runs the camera recording file with the given path. Does not wait for the camera file to finish playing.
      Specified by:
      runCameraRecording in interface IScriptingInterface
      Parameters:
      file - The path of the camera file. Path is relative to the application's root directory or absolute.
    • cameraTransitionKm

      public void cameraTransitionKm(double[] camPos, double[] camDir, double[] camUp, double seconds)
      Description copied from interface: IScriptingInterface
      Specified by:
      cameraTransitionKm in interface IScriptingInterface
      Parameters:
      camPos - The target camera position in Km.
      camDir - The target camera direction vector.
      camUp - The target camera up vector.
      seconds - The duration of the transition in seconds.
    • cameraTransitionKm

      public void cameraTransitionKm(List camPos, List camDir, List camUp, double seconds)
    • cameraTransitionKm

      public void cameraTransitionKm(List camPos, List camDir, List camUp, long seconds)
    • cameraTransition

      public void cameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds)
      Description copied from interface: IScriptingInterface
      Creates a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of 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 afterwards if you need to. Also, this only works with the natural camera.
      Specified by:
      cameraTransition in interface IScriptingInterface
      Parameters:
      camPos - The target camera position in the internal reference system.
      camDir - The target camera direction in the internal reference system.
      camUp - The target camera up in the internal reference system.
      seconds - The duration of the transition in seconds.
    • cameraTransition

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

      public void cameraTransition(List camPos, List camDir, List camUp, double seconds)
    • cameraTransition

      public void cameraTransition(List camPos, List camDir, List camUp, long seconds)
    • cameraTransition

      public void cameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds, boolean sync)
      Description copied from interface: IScriptingInterface
      Creates a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of 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 afterwards if you need to. Also, this only works with the natural camera.
      Specified by:
      cameraTransition in interface IScriptingInterface
      Parameters:
      camPos - The target camera position in the internal reference system.
      camDir - The target camera direction in the internal reference system.
      camUp - The target camera up in the internal reference system.
      seconds - The duration of the transition in seconds.
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately
    • cameraTransition

      public void cameraTransition(List camPos, List camDir, List camUp, double seconds, boolean sync)
    • cameraTransition

      public void cameraTransition(List camPos, List camDir, List camUp, long seconds, boolean sync)
    • sleep

      public void sleep(float seconds)
      Description copied from interface: IScriptingInterface
      Sleeps for the given number of seconds in the application time (FPS), so if we are capturing frames and the frame rate is set to 30 FPS, the command sleep(1) will put the script to sleep for 30 frames.
      Specified by:
      sleep in interface IScriptingInterface
      Parameters:
      seconds - The number of seconds to wait.
    • sleep

      public void sleep(int seconds)
    • sleepFrames

      public void sleepFrames(long frames)
      Description copied from interface: IScriptingInterface
      Sleeps for a number of frames. This is very useful for scripts which need to run alongside the frame output system.
      Specified by:
      sleepFrames in interface IScriptingInterface
      Parameters:
      frames - The number of frames to wait.
    • galacticToInternalCartesian

      public double[] galacticToInternalCartesian(double l, double b, double r)
      Description copied from interface: IScriptingInterface
      Converts galactic coordinates to the internal cartesian coordinate system.
      Specified by:
      galacticToInternalCartesian in interface IScriptingInterface
      Parameters:
      l - The galactic longitude in degrees.
      b - The galactic latitude in degrees.
      r - The distance in Km.
      Returns:
      An array of doubles containing [x, y, z] in the internal reference system, in internal units.
    • eclipticToInternalCartesian

      public double[] eclipticToInternalCartesian(double l, double b, double r)
      Description copied from interface: IScriptingInterface
      Converts ecliptic coordinates to the internal cartesian coordinate system.
      Specified by:
      eclipticToInternalCartesian in interface IScriptingInterface
      Parameters:
      l - The ecliptic longitude in degrees.
      b - The ecliptic latitude in degrees.
      r - The distance in Km.
      Returns:
      An array of doubles containing [x, y, z] in the internal reference system, in internal units.
    • equatorialToInternalCartesian

      public double[] equatorialToInternalCartesian(double ra, double dec, double r)
      Description copied from interface: IScriptingInterface
      Converts equatorial coordinates to the internal cartesian coordinate system.
      Specified by:
      equatorialToInternalCartesian in interface IScriptingInterface
      Parameters:
      ra - The right ascension in degrees.
      dec - The declination in degrees.
      r - The distance in Km.
      Returns:
      An array of doubles containing [x, y, z] in the internal reference system, in internal units.
    • internalCartesianToEquatorial

      public double[] internalCartesianToEquatorial(double x, double y, double z)
      Description copied from interface: IScriptingInterface
      Converts internal cartesian coordinates to equatorial [ra, dec, distance] coordinates.
      Specified by:
      internalCartesianToEquatorial in interface IScriptingInterface
      Parameters:
      x - The x component, in any distance units.
      y - The y component, in any distance units.
      z - The z component, in any distance units.
      Returns:
      An array of doubles containing [ra, dec, distance] with ra and dec in degrees and distance in the same distance units as the input position.
    • equatorialCartesianToInternalCartesian

      public double[] equatorialCartesianToInternalCartesian(double[] eq, double kmFactor)
      Description copied from interface: IScriptingInterface
      Converts regular cartesian coordinates, where XY is the equatorial plane, with X pointing to the vernal equinox (ra=0) and Y points to ra=90, and Z pointing to the celestial north pole (dec=90) to internal cartesian coordinates with internal units.
      Specified by:
      equatorialCartesianToInternalCartesian in interface IScriptingInterface
      Parameters:
      eq - Equatorial cartesian coordinates (X->[ra=0,dec=0], Y->[ra=90,dec=0], Z->[ra=0,dec=90])
      kmFactor - Factor used to bring the input coordinate units to Kilometers, so that eq * factor = Km
      Returns:
      Internal coordinates ready to be fed in other scripting functions
    • equatorialCartesianToInternalCartesian

      public double[] equatorialCartesianToInternalCartesian(List eq, double kmFactor)
    • equatorialToGalactic

      public double[] equatorialToGalactic(double[] eq)
      Description copied from interface: IScriptingInterface
      Converts equatorial cartesian coordinates (in the internal reference system) to galactic cartesian coordinates.
      Specified by:
      equatorialToGalactic in interface IScriptingInterface
      Parameters:
      eq - Vector with [x, y, z] equatorial cartesian coordinates
      Returns:
      Vector with [x, y, z] galactic cartesian coordinates
    • equatorialToGalactic

      public double[] equatorialToGalactic(List eq)
    • equatorialToEcliptic

      public double[] equatorialToEcliptic(double[] eq)
      Description copied from interface: IScriptingInterface
      Converts equatorial cartesian coordinates (in the internal reference system) to ecliptic cartesian coordinates.
      Specified by:
      equatorialToEcliptic in interface IScriptingInterface
      Parameters:
      eq - Vector with [x, y, z] equatorial cartesian coordinates
      Returns:
      Vector with [x, y, z] ecliptic cartesian coordinates
    • equatorialToEcliptic

      public double[] equatorialToEcliptic(List eq)
    • galacticToEquatorial

      public double[] galacticToEquatorial(double[] gal)
      Description copied from interface: IScriptingInterface
      Converts galactic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.
      Specified by:
      galacticToEquatorial in interface IScriptingInterface
      Parameters:
      gal - Vector with [x, y, z] galactic cartesian coordinates
      Returns:
      Vector with [x, y, z] equatorial cartesian coordinates
    • galacticToEquatorial

      public double[] galacticToEquatorial(List gal)
    • eclipticToEquatorial

      public double[] eclipticToEquatorial(double[] ecl)
      Description copied from interface: IScriptingInterface
      Converts ecliptic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.
      Specified by:
      eclipticToEquatorial in interface IScriptingInterface
      Parameters:
      ecl - Vector with [x, y, z] ecliptic cartesian coordinates
      Returns:
      Vector with [x, y, z] equatorial cartesian coordinates
    • eclipticToEquatorial

      public double[] eclipticToEquatorial(List ecl)
    • setBrightnessLevel

      public void setBrightnessLevel(double level)
      Description copied from interface: IScriptingInterface
      Sets the brightness level of the render system.
      Specified by:
      setBrightnessLevel in interface IScriptingInterface
      Parameters:
      level - The brightness level as a double precision floating point number in [-1,1]. The neutral value is 0.0.
    • setBrightnessLevel

      public void setBrightnessLevel(long level)
    • setContrastLevel

      public void setContrastLevel(double level)
      Description copied from interface: IScriptingInterface
      Sets the contrast level of the render system.
      Specified by:
      setContrastLevel in interface IScriptingInterface
      Parameters:
      level - The contrast level as a double precision floating point number in [0,2]. The neutral value is 1.0.
    • setContrastLevel

      public void setContrastLevel(long level)
    • setHueLevel

      public void setHueLevel(double level)
      Description copied from interface: IScriptingInterface
      Sets the hue level of the render system.
      Specified by:
      setHueLevel in interface IScriptingInterface
      Parameters:
      level - The hue level as a double precision floating point number in [0,2]. The neutral value is 1.0.
    • setHueLevel

      public void setHueLevel(long level)
    • setSaturationLevel

      public void setSaturationLevel(double level)
      Description copied from interface: IScriptingInterface
      Sets the saturation level of the render system.
      Specified by:
      setSaturationLevel in interface IScriptingInterface
      Parameters:
      level - The saturation level as a double precision floating point number in [0,2]. The neutral value is 1.0.
    • setSaturationLevel

      public void setSaturationLevel(long level)
    • setGammaCorrectionLevel

      public void setGammaCorrectionLevel(double level)
      Description copied from interface: IScriptingInterface
      Sets the gamma correction level.
      Specified by:
      setGammaCorrectionLevel in interface IScriptingInterface
      Parameters:
      level - The gamma correction level in [0,3] as a floating point number. The neutral value is 1.2.
    • setGammaCorrectionLevel

      public void setGammaCorrectionLevel(long level)
    • setHDRToneMappingType

      public void setHDRToneMappingType(String type)
      Description copied from interface: IScriptingInterface
      Sets the high dynamic range tone mapping algorithm type. The types can be:
      • "auto" - performs an automatic HDR tone mapping based on the current luminosity of the scene
      • "exposure" - performs an exposure-based HDR tone mapping. The exposure value must be set with IScriptingInterface.setExposureToneMappingLevel(double)
      • "aces" - performs the ACES tone mapping
      • "uncharted" - performs the tone mapping implemented in Uncharted
      • "filmic" - performs a filmic tone mapping
      • "none" - no HDR tone mapping
      Specified by:
      setHDRToneMappingType in interface IScriptingInterface
      Parameters:
      type - The HDR tone mapping type. One of ["auto"|"exposure"|"aces"|"uncharted"|"filmic"|"none"].
    • setExposureToneMappingLevel

      public void setExposureToneMappingLevel(double level)
      Description copied from interface: IScriptingInterface
      Sets the exposure level.
      Specified by:
      setExposureToneMappingLevel in interface IScriptingInterface
      Parameters:
      level - The exposure level in [0,n]. Set to 0 to disable exposure tone mapping.
    • setExposureToneMappingLevel

      public void setExposureToneMappingLevel(long level)
    • setCubemapMode

      public void setCubemapMode(boolean state, String projection)
      Description copied from interface: IScriptingInterface
      Enables and disables the cubemap mode.
      Specified by:
      setCubemapMode in interface IScriptingInterface
      Parameters:
      state - The boolean sate. True to activate, false to deactivate.
    • setPanoramaMode

      public void setPanoramaMode(boolean state)
      Description copied from interface: IScriptingInterface
      Enables and disables the panorama mode.
      Specified by:
      setPanoramaMode in interface IScriptingInterface
      Parameters:
      state - The boolean staet. True to activate, false to deactivate.
    • setPlanetariumMode

      public void setPlanetariumMode(boolean state)
      Description copied from interface: IScriptingInterface
      Enables and disables the planetarium mode.
      Specified by:
      setPlanetariumMode in interface IScriptingInterface
      Parameters:
      state - The boolean sate. True to activate, false to deactivate.
    • setCubemapResolution

      public void setCubemapResolution(int resolution)
      Description copied from interface: IScriptingInterface
      Sets the resolution (width and height are the same) of each side of the frame buffers used to capture each of the 6 directions that go into the cubemap to construct the equirectangular image for the 360 mode. This should roughly be 1/3 of the output resolution at which the 360 mode are to be captured (or screen resolution).
      Specified by:
      setCubemapResolution in interface IScriptingInterface
      Parameters:
      resolution - The resolution of each of the sides of the cubemap for the 360 mode.
    • setCubemapProjection

      public void setCubemapProjection(String projection)
      Description copied from interface: IScriptingInterface
      Sets the cubemap projection to use. Accepted values are "EQUIRECTANGULAR", "CYLINDRICAL" and "HAMMER". See CubemapProjections for possible values.
      Specified by:
      setCubemapProjection in interface IScriptingInterface
      Parameters:
      projection - The projection, in ["EQUIRECTANGULAR"|"CYLINDRICAL"|"HAMMER"].
    • setStereoscopicMode

      public void setStereoscopicMode(boolean state)
      Description copied from interface: IScriptingInterface
      Enables and disables the stereoscopic mode.
      Specified by:
      setStereoscopicMode in interface IScriptingInterface
      Parameters:
      state - The boolean sate. True to activate, false to deactivate.
    • setStereoscopicProfile

      public void setStereoscopicProfile(int index)
      Description copied from interface: IScriptingInterface
      Changes the stereoscopic profile.
      Specified by:
      setStereoscopicProfile in interface IScriptingInterface
      Parameters:
      index - The index of the new profile:
      • 0 - VR_HEADSET
      • 1 - HD_3DTV
      • 2 - CROSSEYE
      • 3 - PARALLEL_VIEW
      • 4 - ANAGLYPHIC (red-cyan)
    • getCurrentFrameNumber

      public long getCurrentFrameNumber()
      Description copied from interface: IScriptingInterface
      Gets the current frame number. Useful for timing actions in scripts.
      Specified by:
      getCurrentFrameNumber in interface IScriptingInterface
      Returns:
      The current frame number.
    • setLensFlare

      public void setLensFlare(boolean state)
      Description copied from interface: IScriptingInterface
      Enables or deisables the lens flare effect.
      Specified by:
      setLensFlare in interface IScriptingInterface
      Parameters:
      state - Activate (true) or deactivate (false).
    • setMotionBlur

      public void setMotionBlur(boolean state)
      Description copied from interface: IScriptingInterface
      Enables or disables the motion blur effect.
      Specified by:
      setMotionBlur in interface IScriptingInterface
      Parameters:
      state - Activate (true) or deactivate (false).
    • setStarGlow

      public void setStarGlow(boolean state)
      Description copied from interface: IScriptingInterface
      Enables or disables the star glow effect.
      Specified by:
      setStarGlow in interface IScriptingInterface
      Parameters:
      state - Activate (true) or deactivate (false).
    • setBloom

      public void setBloom(float value)
      Description copied from interface: IScriptingInterface
      Sets the strength value for the bloom effect.
      Specified by:
      setBloom in interface IScriptingInterface
      Parameters:
      value - Bloom strength between 0 and 100. Set to 0 to deactivate the bloom.
    • setBloom

      public void setBloom(int level)
    • setSmoothLodTransitions

      public void setSmoothLodTransitions(boolean value)
      Description copied from interface: IScriptingInterface
      Sets the value of smooth lod transitions, allowing or disallowing octant fade-ins of as they come into view.
      Specified by:
      setSmoothLodTransitions in interface IScriptingInterface
      Parameters:
      value - Activate (true) or deactivate (false).
    • rotate3

      public double[] rotate3(double[] vector, double[] axis, double angle)
      Description copied from interface: IScriptingInterface
      Rotates a 3D vector around the given axis by the specified angle in degrees. Vectors are arrays with 3 components. If more components are there, they are ignored.
      Specified by:
      rotate3 in interface IScriptingInterface
      Parameters:
      vector - Vector to rotate, with at least 3 components.
      axis - The axis, with at least 3 components.
      angle - Angle in degrees.
      Returns:
      The new vector, rotated.
    • rotate3

      public double[] rotate3(double[] vector, double[] axis, long angle)
    • rotate3

      public double[] rotate3(List vector, List axis, double angle)
    • rotate3

      public double[] rotate3(List vector, List axis, long angle)
    • rotate2

      public double[] rotate2(double[] vector, double angle)
      Description copied from interface: IScriptingInterface
      Rotates a 2D vector by the specified angle in degrees, counter-clockwise assuming that the y axis points up.
      Specified by:
      rotate2 in interface IScriptingInterface
      Parameters:
      vector - Vector to rotate, with at least 2 components.
      Returns:
      The new vector, rotated.
    • rotate2

      public double[] rotate2(double[] vector, long angle)
    • rotate2

      public double[] rotate2(List vector, double angle)
    • rotate2

      public double[] rotate2(List vector, long angle)
    • cross3

      public double[] cross3(double[] vec1, double[] vec2)
      Description copied from interface: IScriptingInterface
      Computes the cross product between the two 3D vectors.
      Specified by:
      cross3 in interface IScriptingInterface
      Parameters:
      vec1 - First 3D vector.
      vec2 - Second 3D vector.
      Returns:
      Cross product 3D vector.
    • cross3

      public double[] cross3(List vec1, List vec2)
    • dot3

      public double dot3(double[] vec1, double[] vec2)
      Description copied from interface: IScriptingInterface
      Computes the dot product between the two 3D vectors.
      Specified by:
      dot3 in interface IScriptingInterface
      Parameters:
      vec1 - First 3D vector.
      vec2 - Second 3D vector.
      Returns:
      The dot product scalar.
    • dot3

      public double dot3(List vec1, List vec2)
    • addPolyline

      public void addPolyline(String name, double[] points, double[] color)
      Description copied from interface: IScriptingInterface
      Adds a new polyline with the given name, points and color. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. The default primitive of GL_LINE_STRIP is used.
      Specified by:
      addPolyline in interface IScriptingInterface
      Parameters:
      name - The name to identify the polyline, to possibly remove it later.
      points - The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].
      color - The color of the polyline as an array of {red, green, blue, alpha}, where each element is in [0,1].
    • addPolyline

      public void addPolyline(String name, List points, List color)
    • addPolyline

      public void addPolyline(String name, double[] points, double[] color, double lineWidth)
      Description copied from interface: IScriptingInterface
      Adds a new polyline with the given name, points, color and line width. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. The default primitive type of GL_LINE_STRIP is used.
      Specified by:
      addPolyline in interface IScriptingInterface
      Parameters:
      name - The name to identify the polyline, to possibly remove it later.
      points - The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].
      color - The color of the polyline as an array of {red, green, blue, alpha}, where each element is in [0,1].
      lineWidth - The line width. Usually a value between 1 (default) and 10.
    • addPolyline

      public void addPolyline(String name, double[] points, double[] color, double lineWidth, boolean arrowCaps)
      Description copied from interface: IScriptingInterface
      Adds a new polyline with the given name, points, color and line width. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. The default primitive type of GL_LINE_STRIP is used. This version enables the addition of arrow caps. In the case arrow caps are enabled, the line will be rendered in CPU mode (no VBO), making it slightly slower, especially for lines with many points. The arrow cap is added at the first point in the series.
      Specified by:
      addPolyline in interface IScriptingInterface
      Parameters:
      name - The name to identify the polyline, to possibly remove it later.
      points - The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].
      color - The color of the polyline as an array of {red, green, blue, alpha}, where each element is in [0,1].
      lineWidth - The line width. Usually a value between 1 (default) and 10.
      arrowCaps - Whether to represent arrow caps. If enabled, the line is rendered in CPU mode, which is slower.
    • addPolyline

      public void addPolyline(String name, double[] points, double[] color, double lineWidth, int primitive)
      Description copied from interface: IScriptingInterface
      Adds a new polyline with the given name, points, color, line width and primitive. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it.
      Specified by:
      addPolyline in interface IScriptingInterface
      Parameters:
      name - The name to identify the polyline, to possibly remove it later.
      points - The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].
      color - The color of the polyline as an array of {red, green, blue, alpha}, where each element is in [0,1].
      lineWidth - The line width. Usually a value between 1 (default) and 10.
      primitive - The GL primitive: GL_LINES=1, GL_LINE_LOOP=2, GL_LINE_STRIP=3
    • addPolyline

      public void addPolyline(String name, double[] points, double[] color, double lineWidth, int primitive, boolean arrowCaps)
      Description copied from interface: IScriptingInterface
      Adds a new polyline with the given name, points, color, line width, primitive and arrow caps. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. This version enables the addition of arrow caps. In the case arrow caps are enabled, the line will be rendered in CPU mode (no VBO), making it slightly slower, especially for lines with many points. The arrow cap is added at the first point in the series.
      Specified by:
      addPolyline in interface IScriptingInterface
      Parameters:
      name - The name to identify the polyline, to possibly remove it later.
      points - The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].
      color - The color of the polyline as an array of {red, green, blue, alpha}, where each element is in [0,1].
      lineWidth - The line width. Usually a value between 1 (default) and 10.
      primitive - The GL primitive: GL_LINES=1, GL_LINE_LOOP=2, GL_LINE_STRIP=3
      arrowCaps - Whether to represent arrow caps. If enabled, the line is rendered in CPU mode, which is slower.
    • addPolyline

      public void addPolyline(String name, double[] points, double[] color, int lineWidth)
    • addPolyline

      public void addPolyline(String name, double[] points, double[] color, int lineWidth, int primitive)
    • addPolyline

      public void addPolyline(String name, List points, List color, float lineWidth)
    • addPolyline

      public void addPolyline(String name, List points, List color, float lineWidth, boolean arrowCaps)
    • addPolyline

      public void addPolyline(String name, List points, List color, float lineWidth, int primitive)
    • addPolyline

      public void addPolyline(String name, List points, List color, float lineWidth, int primitive, boolean arrowCaps)
    • addPolyline

      public void addPolyline(String name, List points, List color, int lineWidth)
    • addPolyline

      public void addPolyline(String name, List points, List color, int lineWidth, boolean arrowCaps)
    • addPolyline

      public void addPolyline(String name, List points, List color, int lineWidth, int primitive)
    • addPolyline

      public void addPolyline(String name, List points, List color, int lineWidth, int primitive, boolean arrowCaps)
    • removeModelObject

      public void removeModelObject(String name)
      Description copied from interface: IScriptingInterface

      Removes the model object identified by the given name from the internal scene graph model of Gaia Sky, if it exists. If the object has children, they are removed recursively. Be careful with this function, as it can have unexpected side effects depending on what objects are removed. For example,

      gs.removeModelObject("Earth")

      removes the Earth, the Moon, Gaia and any dependent object from Gaia Sky.

      Specified by:
      removeModelObject in interface IScriptingInterface
      Parameters:
      name - The name of the object to remove.
    • postRunnable

      public void postRunnable(Runnable runnable)
      Description copied from interface: IScriptingInterface
      Posts a Runnable to the main loop thread. The runnable runs only once. This will execute the runnable right after the current update-render cycle has finished.
      Specified by:
      postRunnable in interface IScriptingInterface
      Parameters:
      runnable - The runnable to run.
    • parkRunnable

      public void parkRunnable(String id, Runnable runnable)
      Description copied from interface: IScriptingInterface
      Parks a Runnable to the main loop thread, and keeps it running every frame until it finishes or it is unparked by IScriptingInterface.unparkRunnable(String). Be careful with this function, as it probably needs a cleanup before the script is finished. Otherwise, all parked runnables will keep running until Gaia Sky is restarted, so make sure to remove them with IScriptingInterface.unparkRunnable(String) if needed.
      Specified by:
      parkRunnable in interface IScriptingInterface
      Parameters:
      id - The string id to identify the runnable.
      runnable - The runnable to park.
    • unparkRunnable

      public void unparkRunnable(String id)
      Description copied from interface: IScriptingInterface
      Removes the runnable with the given id, if any.
      Specified by:
      unparkRunnable in interface IScriptingInterface
      Parameters:
      id - The id of the runnable to remove.
    • setCameraState

      public void setCameraState(double[] pos, double[] dir, double[] up)
      Description copied from interface: IScriptingInterface
      Sets the camera state (position, direction and up vector).
      Specified by:
      setCameraState in interface IScriptingInterface
      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.
    • setCameraState

      public void setCameraState(List pos, List dir, List up)
    • setCameraStateAndTime

      public void setCameraStateAndTime(double[] pos, double[] dir, double[] up, long time)
      Description copied from interface: IScriptingInterface
      Sets the camera state (position, direction and up vector) plus the current time.
      Specified by:
      setCameraStateAndTime in interface IScriptingInterface
      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).
    • setCameraStateAndTime

      public void setCameraStateAndTime(List pos, List dir, List up, long time)
    • resetImageSequenceNumber

      public void resetImageSequenceNumber()
      Description copied from interface: IScriptingInterface
      Resets to zero the image sequence number used to generate the file names of the frame output images.
      Specified by:
      resetImageSequenceNumber in interface IScriptingInterface
    • loadDataset

      public boolean loadDataset(String dsName, String absolutePath)
      Description copied from interface: IScriptingInterface
      Loads a VOTable file (.vot) of stars with a given name. In this version, the loading happens synchronously, so the catalog is available to Gaia Sky immediately after this call returns. The actual loading process is carried out making educated guesses about semantics using UCDs and column names. Please check the official documentation for a complete reference on what can and what can't be loaded.
      Specified by:
      loadDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset, used to identify the subsequent operations on the dataset.
      absolutePath - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      Returns:
      False if the dataset could not be loaded, true otherwise.
    • loadDataset

      public boolean loadDataset(String dsName, String path, boolean sync)
      Description copied from interface: IScriptingInterface
      Loads a VOTable file (.vot) of stars with a given name. The call can be made synchronous or asynchronous.
      If sync is true, the call acts exactly like IScriptingInterface.loadDataset(String, String).
      If sync is false, the loading happens in a new thread and the call returns immediately. In this case, you can use IScriptingInterface.hasDataset(String) to check whether the dataset is already loaded and available. The actual loading process is carried out making educated guesses about semantics using UCDs and column names. Please check the official documentation for a complete reference on what can and what can't be loaded.
      Specified by:
      loadDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset, used to identify the subsequent operations on the dataset.
      path - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      sync - Whether the load must happen synchronously or asynchronously.
      Returns:
      False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or sync is false.
    • loadDataset

      public boolean loadDataset(String dsName, String path, CatalogInfo.CatalogInfoType type, boolean sync)
    • loadDataset

      public boolean loadDataset(String dsName, String path, CatalogInfo.CatalogInfoType type, DatasetOptions dops, boolean sync)
    • loadDataset

      public boolean loadDataset(String dsName, uk.ac.starlink.util.DataSource ds, CatalogInfo.CatalogInfoType type, DatasetOptions dops, boolean sync)
    • loadStarDataset

      public boolean loadStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync)
      Description copied from interface: IScriptingInterface
      Loads a star dataset from a VOTable file (.vot). The call can be made synchronous or asynchronous.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.
      Specified by:
      loadStarDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset.
      path - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      magnitudeScale - Scaling additive factor to apply to the star magnitudes, as in appmag = appmag - magnitudeScale.
      labelColor - The color of the labels, as an array of {red, green, blue, alpha} where each element is in [0,1].
      fadeIn - Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      fadeOut - Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      sync - Whether the load must happen synchronously or asynchronously.
      Returns:
      False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or sync is false.
    • loadStarDataset

      public boolean loadStarDataset(String dsName, String path, double magnitudeScale, List labelColor, List fadeIn, List fadeOut, boolean sync)
    • loadStarDataset

      public boolean loadStarDataset(String dsName, String path, CatalogInfo.CatalogInfoType type, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync)
    • loadParticleDataset

      public boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, boolean sync)
      Description copied from interface: IScriptingInterface
      Loads a particle dataset (only positions and extra attributes) from a VOTable file (.vot). The call can be made synchronous or asynchronous.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.
      Specified by:
      loadParticleDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset.
      path - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      profileDecay - The profile decay of the particles as in 1 - distCentre^decay.
      particleColor - The base color of the particles, as an array of {red, green, blue, alpha} where each element is in [0,1].
      colorNoise - In [0,1], the noise to apply to the color so that each particle gets a slightly different tone. Set to 0 so that all particles get the same color.
      labelColor - The color of the labels, as an array of {red, green, blue, alpha} where each element is in [0,1].
      particleSize - The size of the particles in pixels.
      ct - The name of the component type to use like "Stars", "Galaxies", etc. (see ComponentTypes.ComponentType).
      sync - Whether the load must happen synchronously or asynchronously.
      Returns:
      False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or sync is false.
    • loadParticleDataset

      public boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, double[] fadeIn, double[] fadeOut, boolean sync)
      Description copied from interface: IScriptingInterface
      Loads a particle dataset (only positions and extra attributes) from a VOTable file (.vot). The call can be made synchronous or asynchronous.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.
      Specified by:
      loadParticleDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset.
      path - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      profileDecay - The profile decay of the particles as in 1 - distCentre^decay.
      particleColor - The base color of the particles, as an array of {red, green, blue, alpha} where each element is in [0,1].
      colorNoise - In [0,1], the noise to apply to the color so that each particle gets a slightly different tone. Set to 0 so that all particles get the same color.
      labelColor - The color of the labels, as an array of {red, green, blue, alpha} where each element is in [0,1].
      particleSize - The size of the particles in pixels.
      ct - The name of the component type to use like "Stars", "Galaxies", etc. (see ComponentTypes.ComponentType).
      fadeIn - Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      fadeOut - Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      sync - Whether the load must happen synchronously or asynchronously.
      Returns:
      False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or sync is false.
    • loadParticleDataset

      public boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, String ct, double[] fadeIn, double[] fadeOut, boolean sync)
      Description copied from interface: IScriptingInterface
      Loads a particle dataset (only positions and extra attributes) from a VOTable file (.vot). The call can be made synchronous or asynchronous.
      If sync is true, the call waits until the dataset is loaded and then returns. If sync is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.
      Specified by:
      loadParticleDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset.
      path - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      profileDecay - The profile decay of the particles as in 1 - distCentre^decay.
      particleColor - The base color of the particles, as an array of {red, green, blue, alpha} where each element is in [0,1].
      colorNoise - In [0,1], the noise to apply to the color so that each particle gets a slightly different tone. Set to 0 so that all particles get the same color.
      labelColor - The color of the labels, as an array of {red, green, blue, alpha} where each element is in [0,1].
      particleSize - The size of the particles in pixels.
      sizeLimits - The minimum and maximum size of the particles in pixels.
      ct - The name of the component type to use like "Stars", "Galaxies", etc. (see ComponentTypes.ComponentType).
      fadeIn - Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      fadeOut - Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      sync - Whether the load must happen synchronously or asynchronously.
      Returns:
      False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or sync is false.
    • loadParticleDataset

      public boolean loadParticleDataset(String dsName, String path, double profileDecay, List particleColor, double colorNoise, List labelColor, double particleSize, String ct, List fadeIn, List fadeOut, boolean sync)
    • loadParticleDataset

      public boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync)
    • loadParticleDataset

      public boolean loadParticleDataset(String dsName, String path, CatalogInfo.CatalogInfoType type, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync)
    • loadStarClusterDataset

      public boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, double[] fadeIn, double[] fadeOut, boolean sync)
      Description copied from interface: IScriptingInterface
      Loads a star cluster dataset from a CSV file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. Uses the same color for clusters and labels. The call can be made synchronous or asynchronous. If sync is true, the call waits until the dataset is loaded and then returns. If sync is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.
      Specified by:
      loadStarClusterDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset.
      path - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      particleColor - The base color of the particles and labels, as an array of {red, green, blue, alpha} where each element is in [0,1].
      fadeIn - Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      fadeOut - Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      sync - Whether the load must happen synchronously or asynchronously.
      Returns:
      False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or sync is false.
    • loadStarClusterDataset

      public boolean loadStarClusterDataset(String dsName, String path, List particleColor, List fadeIn, List fadeOut, boolean sync)
    • loadStarClusterDataset

      public boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync)
      Description copied from interface: IScriptingInterface
      Loads a star cluster dataset from a CSV file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. The call can be made synchronous or asynchronous. If sync is true, the call waits until the dataset is loaded and then returns. If sync is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.
      Specified by:
      loadStarClusterDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset.
      path - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      particleColor - The base color of the particles, as an array of {red, green, blue, alpha} where each element is in [0,1].
      labelColor - The color of the labels, as an array of {red, green, blue, alpha} where each element is in [0,1].
      fadeIn - Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      fadeOut - Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      sync - Whether the load must happen synchronously or asynchronously.
      Returns:
      False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or sync is false.
    • loadStarClusterDataset

      public boolean loadStarClusterDataset(String dsName, String path, List particleColor, List labelColor, List fadeIn, List fadeOut, boolean sync)
    • loadStarClusterDataset

      public boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync)
      Description copied from interface: IScriptingInterface
      Loads a star cluster dataset from a CSV file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. Uses the same color for clusters and labels. The call can be made synchronous or asynchronous. If sync is true, the call waits until the dataset is loaded and then returns. If sync is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.
      Specified by:
      loadStarClusterDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset.
      path - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      particleColor - The base color of the particles and labels, as an array of {red, green, blue, alpha} where each element is in [0,1].
      ct - The name of the component type to use (see ComponentTypes.ComponentType).
      fadeIn - Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      fadeOut - Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      sync - Whether the load must happen synchronously or asynchronously.
      Returns:
      False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or sync is false.
    • loadStarClusterDataset

      public boolean loadStarClusterDataset(String dsName, String path, List particleColor, String ct, List fadeIn, List fadeOut, boolean sync)
    • loadStarClusterDataset

      public boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync)
      Description copied from interface: IScriptingInterface
      Loads a star cluster dataset from a CSV file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. The call can be made synchronous or asynchronous. If sync is true, the call waits until the dataset is loaded and then returns. If sync is false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.
      Specified by:
      loadStarClusterDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset.
      path - Absolute path (or relative to the working path of Gaia Sky) to the .vot file to load.
      particleColor - The base color of the particles and labels, as an array of {red, green, blue, alpha} where each element is in [0,1].
      labelColor - The color of the labels, as an array of {red, green, blue, alpha} where each element is in [0,1].
      ct - The name of the component type to use (see ComponentTypes.ComponentType).
      fadeIn - Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      fadeOut - Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset.
      sync - Whether the load must happen synchronously or asynchronously.
      Returns:
      False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or sync is false.
    • loadStarClusterDataset

      public boolean loadStarClusterDataset(String dsName, String path, List particleColor, List labelColor, String ct, List fadeIn, List fadeOut, boolean sync)
    • hasDataset

      public boolean hasDataset(String dsName)
      Description copied from interface: IScriptingInterface
      Checks whether the dataset identified by the given name is loaded
      Specified by:
      hasDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset to query.
      Returns:
      True if the dataset is loaded, false otherwise.
    • removeDataset

      public boolean removeDataset(String dsName)
      Description copied from interface: IScriptingInterface
      Removes the dataset identified by the given name, if it exists.
      Specified by:
      removeDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset to remove.
      Returns:
      False if the dataset could not be found.
    • hideDataset

      public boolean hideDataset(String dsName)
      Description copied from interface: IScriptingInterface
      Hides the dataset identified by the given name, if it exists and is not hidden.
      Specified by:
      hideDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset to hide.
      Returns:
      False if the dataset could not be found.
    • showDataset

      public boolean showDataset(String dsName)
      Description copied from interface: IScriptingInterface
      Shows (un-hides) the dataset identified by the given name, if it exists and is hidden
      Specified by:
      showDataset in interface IScriptingInterface
      Parameters:
      dsName - The name of the dataset to show.
      Returns:
      False if the dataset could not be found.
    • highlightDataset

      public boolean highlightDataset(String dsName, boolean highlight)
      Description copied from interface: IScriptingInterface
      Enables or disables the dataset highlight using a plain color chosen by the system.
      Specified by:
      highlightDataset in interface IScriptingInterface
      Parameters:
      dsName - The dataset name.
      highlight - State.
      Returns:
      False if the dataset could not be found.
    • highlightDataset

      public boolean highlightDataset(String dsName, int colorIndex, boolean highlight)
      Description copied from interface: IScriptingInterface
      Enables or disables the dataset highlight, using a plain color given by the color index:
      • 0 - blue
      • 1 - red
      • 2 - yellow
      • 3 - green
      • 4 - pink
      • 5 - orange
      • 6 - purple
      • 7 - brown
      • 8 - magenta
      Specified by:
      highlightDataset in interface IScriptingInterface
      Parameters:
      dsName - The dataset name.
      colorIndex - Color index in [0,8].
      highlight - Whether to highlight or not.
      Returns:
      False if the dataset could not be found.
    • highlightDataset

      public boolean highlightDataset(String dsName, float r, float g, float b, float a, boolean highlight)
      Description copied from interface: IScriptingInterface
      Enables or disables the dataset highlight, using a given plain color.
      Specified by:
      highlightDataset in interface IScriptingInterface
      Parameters:
      dsName - The dataset name.
      r - Red component.
      highlight - State.
      Returns:
      False if the dataset could not be found.
    • highlightDataset

      public boolean highlightDataset(String dsName, String attributeName, String colorMap, double minMap, double maxMap, boolean highlight)
      Description copied from interface: IScriptingInterface
      Enables or disables the dataset highlight, using the given color map on the given attribute with the given maximum and minimum mapping values.
      Specified by:
      highlightDataset in interface IScriptingInterface
      Parameters:
      dsName - The dataset name.
      attributeName - The attribute name. You can use basic attributes (please mind the case!):
      • RA
      • DEC
      • Distance
      • GalLatitude
      • GalLongitude
      • EclLatitude
      • EclLongitude
      Or star-only attributes (if your dataset contains stars, mind the case!):
      • Mualpha
      • Mudelta
      • Radvel
      • Absmag
      • Appmag
      Or even extra attributes (if you loaded the dataset yourself), matching by column name.
      colorMap - The color map to use, in ["reds"|"greens"|"blues"|"rainbow18"|"rainbow"|"seismic"|"carnation"|"hotmeal"|"cool"].
      minMap - The minimum mapping value.
      maxMap - The maximum mapping value.
      highlight - State.
      Returns:
      False if the dataset could not be found.
    • setDatasetHighlightSizeFactor

      public boolean setDatasetHighlightSizeFactor(String dsName, float sizeFactor)
      Description copied from interface: IScriptingInterface
      Sets the size increase factor of this dataset when highlighted.
      Specified by:
      setDatasetHighlightSizeFactor in interface IScriptingInterface
      Parameters:
      dsName - The dataset name.
      sizeFactor - The size factor to apply to the particles when highlighted, must be in [Constants.MIN_DATASET_SIZE_FACTOR, Constants.MAX_DATASET_SIZE_FACTOR].
      Returns:
      False if the dataset could not be found.
    • setDatasetHighlightAllVisible

      public boolean setDatasetHighlightAllVisible(String dsName, boolean allVisible)
      Description copied from interface: IScriptingInterface
      Sets the 'all visible' property of datasets when highlighted. If set to true, all stars in the dataset have an increased minimum opacity when highlighted, so that they are all visible. Otherwise, stars retain their minimum opacity and base brightness.
      Specified by:
      setDatasetHighlightAllVisible in interface IScriptingInterface
      Parameters:
      dsName - The dataset name.
      allVisible - Whether all stars in the dataset should be visible when highlighted or not.
      Returns:
      False if the dataset could not be found.
    • setMaximumSimulationTime

      public void setMaximumSimulationTime(long years)
      Description copied from interface: IScriptingInterface
      Sets the maximum simulation time allowed, in years. This sets the maximum time in the future (years) and in the past (-years). This setting is not saved to the configuration and resets to 5 Myr after restart.
      Specified by:
      setMaximumSimulationTime in interface IScriptingInterface
      Parameters:
      years - The maximum year number to allow.
    • setMaximumSimulationTime

      public void setMaximumSimulationTime(double years)
    • setMaximumSimulationTime

      public void setMaximumSimulationTime(Long years)
    • setMaximumSimulationTime

      public void setMaximumSimulationTime(Double years)
    • setMaximumSimulationTime

      public void setMaximumSimulationTime(Integer years)
    • getMeterToInternalUnitConversion

      public double getMeterToInternalUnitConversion()
      Description copied from interface: IScriptingInterface
      Returns the meter to internal unit conversion factor. Use this factor to multiply your coordinates in meters to get them in internal units.
      Specified by:
      getMeterToInternalUnitConversion in interface IScriptingInterface
      Returns:
      The factor M_TO_U.
    • getInternalUnitToMeterConversion

      public double getInternalUnitToMeterConversion()
      Description copied from interface: IScriptingInterface
      Returns the internal unit to meter conversion factor. Use this factor to multiply your coordinates in internal units to get them in meters.
      Specified by:
      getInternalUnitToMeterConversion in interface IScriptingInterface
      Returns:
      The factor U_TO_M.
    • internalUnitsToMetres

      public double internalUnitsToMetres(double internalUnits)
      Description copied from interface: IScriptingInterface
      Converts the value in internal units to metres.
      Specified by:
      internalUnitsToMetres in interface IScriptingInterface
      Parameters:
      internalUnits - The value in internal units.
      Returns:
      The value in metres.
    • internalUnitsToKilometres

      public double internalUnitsToKilometres(double internalUnits)
      Description copied from interface: IScriptingInterface
      Converts the value in internal units to Kilometers.
      Specified by:
      internalUnitsToKilometres in interface IScriptingInterface
      Parameters:
      internalUnits - The value in internal units.
      Returns:
      The value in Kilometers.
    • internalUnitsToKilometres

      public double[] internalUnitsToKilometres(double[] internalUnits)
      Description copied from interface: IScriptingInterface
      Converts the array in internal units to Kilometers.
      Specified by:
      internalUnitsToKilometres in interface IScriptingInterface
      Parameters:
      internalUnits - The array in internal units.
      Returns:
      The array in Kilometers.
    • internalUnitsToKilometres

      public double[] internalUnitsToKilometres(List internalUnits)
    • metresToInternalUnits

      public double metresToInternalUnits(double metres)
      Description copied from interface: IScriptingInterface
      Converts the metres to internal units.
      Specified by:
      metresToInternalUnits in interface IScriptingInterface
      Parameters:
      metres - The value in metres.
      Returns:
      The value in internal units.
    • kilometrestointernalunits

      public double kilometrestointernalunits(double kilometres)
      Description copied from interface: IScriptingInterface
      Converts the kilometres to internal units.
      Specified by:
      kilometrestointernalunits in interface IScriptingInterface
      Parameters:
      kilometres - The value in kilometers.
      Returns:
      The value in internal units.
    • listDatasets

      public List<String> listDatasets()
      Description copied from interface: IScriptingInterface
      Returns the names of all datasets currently loaded.
      Specified by:
      listDatasets in interface IScriptingInterface
      Returns:
      A list with all the names of the loaded datasets.
    • getFrameNumber

      public long getFrameNumber()
      Description copied from interface: IScriptingInterface
      Gets the current frame number. The number begins at 0 for the first frame produced when Gaia Sky is started and increases continuously.
      Specified by:
      getFrameNumber in interface IScriptingInterface
      Returns:
      The current frame number.
    • getDefaultFramesDir

      public String getDefaultFramesDir()
      Description copied from interface: IScriptingInterface
      Gets the absolute path of the default directory where the still frames are saved.
      Specified by:
      getDefaultFramesDir in interface IScriptingInterface
      Returns:
      Absolute path of directory where still frames are saved.
    • getDefaultScreenshotsDir

      public String getDefaultScreenshotsDir()
      Description copied from interface: IScriptingInterface
      Gets the absolute path of the default directory where the screenshots are saved.
      Specified by:
      getDefaultScreenshotsDir in interface IScriptingInterface
      Returns:
      Absolute path of directory where screenshots are saved.
    • getDefaultCameraDir

      public String getDefaultCameraDir()
      Description copied from interface: IScriptingInterface
      Gets the absolute path of the default directory where the camera files are saved.
      Specified by:
      getDefaultCameraDir in interface IScriptingInterface
      Returns:
      Absolute path of directory where camera files are saved.
    • getDefaultMusicDir

      public String getDefaultMusicDir()
      Description copied from interface: IScriptingInterface
      Gets the absolute path to the location of the music files
      Specified by:
      getDefaultMusicDir in interface IScriptingInterface
      Returns:
      Absolute path to the location of the music files
    • getDefaultMappingsDir

      public String getDefaultMappingsDir()
      Description copied from interface: IScriptingInterface
      Gets the absolute path to the location of the inputListener mappings.
      Specified by:
      getDefaultMappingsDir in interface IScriptingInterface
      Returns:
      Absolute path to the location of the inputListener mappings.
    • getDataDir

      public String getDataDir()
      Description copied from interface: IScriptingInterface
      Gets the absolute path of the local data directory, configured in your global.properties file.
      Specified by:
      getDataDir in interface IScriptingInterface
      Returns:
      Absolute path to the location of the data files.
    • getConfigDir

      public String getConfigDir()
      Description copied from interface: IScriptingInterface
      Gets the absolute path to the location of the configuration directory
      Specified by:
      getConfigDir in interface IScriptingInterface
      Returns:
      Absolute path of config directory.
    • getLocalDataDir

      public String getLocalDataDir()
      Description copied from interface: IScriptingInterface
      Returns the default data directory. That is ~/.gaiasky/ in Windows and macOS, and ~/.local/share/gaiasky in Linux.
      Specified by:
      getLocalDataDir in interface IScriptingInterface
      Returns:
      Absolute path of data directory.
    • print

      public void print(String message)
      Description copied from interface: IScriptingInterface
      Print text using the internal logging system.
      Specified by:
      print in interface IScriptingInterface
      Parameters:
      message - The message.
    • log

      public void log(String message)
      Description copied from interface: IScriptingInterface
      Print text using the internal logging system.
      Specified by:
      log in interface IScriptingInterface
      Parameters:
      message - The message.
    • error

      public void error(String message)
      Description copied from interface: IScriptingInterface
      Log an error using the internal logging system.
      Specified by:
      error in interface IScriptingInterface
      Parameters:
      message - The error message.
    • quit

      public void quit()
      Description copied from interface: IScriptingInterface
      Initiates the quit action to terminate the program.
      Specified by:
      quit in interface IScriptingInterface
    • notify

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