Package gaia.cu9.ari.gaiaorbit.script
Class EventScriptingInterface
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.script.EventScriptingInterface
-
- All Implemented Interfaces:
IObserver
,IScriptingInterface
public class EventScriptingInterface extends java.lang.Object implements IScriptingInterface, IObserver
Implementation of the scripting interface using the event system.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateRealTimeFrame()
Sets the current time frame to real time.void
activateSimulationTimeFrame()
Sets the current time frame to simulation time.void
addPolyline(java.lang.String name, double[] points, double[] color)
Adds a new polyline with the given name, points and color.void
addPolyline(java.lang.String name, double[] points, double[] color, float lineWidth)
Adds a new polyline with the given name, points, color and line width.void
addPolyline(java.lang.String name, double[] points, double[] color, int lineWidth)
void
addPolyline(java.lang.String name, java.util.List points, java.util.List color)
void
addPolyline(java.lang.String name, java.util.List points, java.util.List color, float lineWidth)
void
addPolyline(java.lang.String name, java.util.List points, java.util.List color, int lineWidth)
void
cameraCenter()
Centers the camera to the focus, removing any deviation of the line of sight.void
cameraForward(double cameraForward)
Adds a forward movement to the camera with the given value.void
cameraForward(long value)
void
cameraPitch(double amount)
Adds a pitch to the camera.void
cameraPitch(long amount)
void
cameraRoll(double roll)
Adds a roll force to the camera.void
cameraRoll(long roll)
void
cameraRotate(double deltaX, double deltaY)
Adds a rotation movement to the camera around the current focus, or a pitch/yaw if in free mode.void
cameraRotate(double deltaX, long deltaY)
void
cameraRotate(long deltaX, double deltaY)
void
cameraStop()
Stops all camera motion.void
cameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds)
Creates a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.void
cameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds, boolean sync)
Creates a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.void
cameraTransition(double[] camPos, double[] camDir, double[] camUp, long seconds)
void
cameraTransition(java.util.List camPos, java.util.List camDir, java.util.List camUp, double seconds)
void
cameraTransition(java.util.List camPos, java.util.List camDir, java.util.List camUp, double seconds, boolean sync)
void
cameraTransition(java.util.List camPos, java.util.List camDir, java.util.List camUp, long seconds)
void
cameraTransition(java.util.List camPos, java.util.List camDir, java.util.List camUp, long seconds, boolean sync)
void
cameraTurn(double deltaX, double deltaY)
Adds a turn force to the camera (yaw and/or pitch).void
cameraTurn(double deltaX, long deltaY)
void
cameraTurn(long deltaX, double deltaY)
void
cameraTurn(long deltaX, long deltaY)
void
cameraYaw(double amount)
Adds a yaw to the camera.void
cameraYaw(long amount)
void
clearAllMessages()
Clears both the subhead and the headline messages.void
clearHeadlineMessage()
Clears the headline messge.void
clearSubheadMessage()
Clears the subhead messagevoid
collapseGuiComponent(java.lang.String name)
Collapses the component with the given name.void
configureFrameOutput(int width, int height, int fps, java.lang.String folder, java.lang.String namePrefix)
Configures the frame output system, setting the resolution of the images, the target frames per second, the output folder and the image name prefix.void
configureRenderOutput(int width, int height, int fps, java.lang.String folder, java.lang.String namePrefix)
Configures the frame output system, setting the resolution of the images, the target frames per second, the output folder and the image name prefix.double[]
cross3(double[] vec1, double[] vec2)
Computes the cross product between the two 3D vectors.double[]
cross3(java.util.List vec1, java.util.List vec2)
void
disableGui()
Disables the GUI rendering.void
disableInput()
Disables all input events from mouse, keyboard, touchscreen, etc.void
displayImageObject(int id, java.lang.String path, float x, float y)
Adds a new image object at the given coordinates.void
displayImageObject(int id, java.lang.String path, float x, float y, float r, float g, float b, float a)
Adds a new image object at the given coordinates.void
displayMessageObject(int id, java.lang.String message, float x, float y, float r, float g, float b, float a, float fontSize)
Adds a new one-line message in the screen with the given id and the given coordinates.void
displayMessageObject(int id, java.lang.String message, float x, float y, float r, float g, float b, float a, int fontSize)
void
displayTextObject(int id, java.lang.String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, float fontSize)
Adds a new multi-line text in the screen with the given id, coordinates and size.void
displayTextObject(int id, java.lang.String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, int fontSize)
double
dot3(double[] vec1, double[] vec2)
Computes the dot product between the two 3D vectors.double
dot3(java.util.List vec1, java.util.List vec2)
double[]
eclipticToEquatorial(double[] ecl)
Converts ecliptic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.double[]
eclipticToEquatorial(java.util.List ecl)
double[]
eclipticToInternalCartesian(double l, double b, double r)
Converts ecliptic coordinates to the internal cartesian coordinate system.void
enableGui()
Enables the GUI rendering.void
enableInput()
Enables all input events.double[]
equatorialToEcliptic(double[] eq)
Converts equatorial cartesian coordinates (in the internal reference system) to ecliptic cartesian coordinates.double[]
equatorialToEcliptic(java.util.List eq)
double[]
equatorialToGalactic(double[] eq)
Converts equatorial cartesian coordinates (in the internal reference system) to galactic cartesian coordinates.double[]
equatorialToGalactic(java.util.List eq)
double[]
equatorialToInternalCartesian(double ra, double dec, double r)
Converts equatorial coordinates to the internal cartesian coordinate system.void
error(java.lang.String message)
Log an error using the internal logging systemvoid
expandGuiComponent(java.lang.String name)
Expands the component with the given name.double[]
galacticToEquatorial(double[] gal)
Converts galactic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.double[]
galacticToEquatorial(java.util.List gal)
double[]
galacticToInternalCartesian(double l, double b, double r)
Converts galactic coordinates to the internal cartesian coordinate system.double[]
getCameraDirection()
Gets the current camera direction vector.double[]
getCameraPosition()
Gets the current camera position, in km.double
getCameraSpeed()
Gets the current physical speed of the camera in km/hdouble[]
getCameraUp()
Gets the current camera up vector.IFocus
getClosestObjectToCamera()
Returns the closest object to the camera in this instant as aIFocus
.java.lang.String
getConfigDir()
Gets the absolute path to the location of the configuration directorylong
getCurrentFrameNumber()
Gets the current frame number.java.lang.String
getDataDir()
Gets the absolute path of the local data directory, configured in your global.properties filejava.lang.String
getDefaultCameraDir()
Gets the absolute path of the default directory where the camera files are savedjava.lang.String
getDefaultFramesDir()
Gets the absolute path of the default directory where the still frames are savedjava.lang.String
getDefaultMappingsDir()
Gets the absolute path to the location of the inputListener mappingsjava.lang.String
getDefaultMusicDir()
Gets the absolute path to the location of the music filesjava.lang.String
getDefaultScreenshotsDir()
Gets the absolute path of the default directory where the screenshots are saveddouble
getDistanceTo(java.lang.String name)
Returns the distance to the surface of the object identified with the givenname
.long
getFrameNumber()
Gets the current frame number.int
getFrameOutputFps()
Gets the current FPS setting in the frame output system.java.lang.String
getLocalDataDir()
Returns the default data directory.float
getMinStarOpacity()
Gets the minimum star opacity.SceneGraphNode
getObject(java.lang.String name)
Gets an object from the scene graph byname
or id (HIP, TYC, Gaia SourceId).SceneGraphNode
getObject(java.lang.String name, double timeOutSeconds)
Gets an object byname
or id (HIP, TYC, Gaia SourceID), optionally waiting until the object is available, with a timeout.double[]
getObjectPosition(java.lang.String name)
Gets the current position of the object identified byname
in the internal coordinate system and internal units.double
getObjectRadius(java.lang.String name)
Gets the size of the object identified byname
, in Km, by name or id (HIP, TYC, sourceId).float[]
getPositionAndSizeGui(java.lang.String name)
Returns the size and position of the GUI element that goes by the given name or null if such element does not exist.long
getProperMotionsMaxNumber()
Returns the current maximum number of proper motion vectors allowed.int
getRenderOutputFps()
Gets the current FPS setting in the frame output system.int
getScreenHeight()
Returns the screen height in pixels.int
getScreenWidth()
Returns the screen width in pixels.long
getSimulationTime()
Returns the current simulation time as the number of milliseconds since Jan 1, 1970 GMT.int[]
getSimulationTimeArr()
Returns the current UTC simulation time in an array.float
getStarBrightness()
Gets the star brightness value.float
getStarSize()
Gets the current star size.java.lang.String
getVersionNumber()
Returns the version number string.void
goToObject(IFocus object, double viewAngle, int waitTimeSeconds, java.util.concurrent.atomic.AtomicBoolean stop)
void
goToObject(java.lang.String name)
Runs a seamless trip to the object with the namefocusName
until the object view angle is20 degrees
.void
goToObject(java.lang.String name, double angle)
Runs a seamless trip to the object with the namefocusName
until the object view angleviewAngle
is met.void
goToObject(java.lang.String name, double viewAngle, float waitTimeSeconds)
Runs a seamless trip to the object with the namefocusName
until the object view angleviewAngle
is met.void
goToObject(java.lang.String name, double viewAngle, int waitTimeSeconds)
void
goToObject(java.lang.String name, double viewAngle, int waitTimeSeconds, java.util.concurrent.atomic.AtomicBoolean stop)
void
goToObject(java.lang.String name, long viewAngle, float waitTimeSeconds)
void
goToObject(java.lang.String name, long viewAngle, int waitTimeSeconds)
void
goToObjectInstant(java.lang.String name)
Sets the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.boolean
hasDataset(java.lang.String dsName)
Checks whether the dataset identified by the given name is loadedboolean
hideDataset(java.lang.String dsName)
Hides the dataset identified by the given name, if it exists and is not hiddenboolean
highlightDataset(java.lang.String dsName, boolean highlight)
Enables or disables the dataset highlight, using a cyclic color which changes every callboolean
highlightDataset(java.lang.String dsName, int colorIndex, boolean highlight)
Enables or disables the dataset highlight, using a given color index: 0 - red 1 - green 2 - blue 3 - cyan 4 - magenta 5 - yellowstatic EventScriptingInterface
instance()
double[]
internalCartesianToEquatorial(double x, double y, double z)
Converts internal cartesian coordinates to equatorial[ra, dec, distance]
coordinates.boolean
isFrameOutputActive()
Is the frame output system on?boolean
isRenderOutputActive()
Is the frame output system on?boolean
isSimulationTimeOn()
Queries whether the time is on or not.void
landOnObject(java.lang.String name)
Lands on the object with the given name, if it is an instance ofPlanet
.void
landOnObjectLocation(IFocus object, java.lang.String locationName, java.util.concurrent.atomic.AtomicBoolean stop)
void
landOnObjectLocation(java.lang.String name, double longitude, double latitude)
Lands on the object with the givenname
, if it is an instance ofPlanet
, at the location specified in by [latitude, longitude], in degrees.void
landOnObjectLocation(java.lang.String name, java.lang.String locationName)
Lands on the object with the givenname
, if it is an instance ofPlanet
, at the location with the given name, if it exists.void
landOnObjectLocation(java.lang.String name, java.lang.String locationName, java.util.concurrent.atomic.AtomicBoolean stop)
java.util.List<java.lang.String>
listDatasets()
Returns the names of all datasets currently loadedboolean
loadDataset(java.lang.String dsName, java.lang.String absolutePath)
Loads a VOTable file (.vot
) with a given name.boolean
loadDataset(java.lang.String dsName, java.lang.String absolutePath, boolean sync)
Loads a VOTable file (.vot
) with a given name.boolean
loadDataset(java.lang.String dsName, java.lang.String absolutePath, CatalogInfo.CatalogInfoType type, boolean sync)
void
log(java.lang.String message)
Print text using the internal logging systemvoid
maximizeInterfaceWindow()
Maximizes the interface window.void
minimizeInterfaceWindow()
Minimizes the interface window.void
notify(Events event, java.lang.Object... data)
void
parkRunnable(java.lang.String id, java.lang.Runnable runnable)
Parks aRunnable
to the main loop thread, and keeps it running every frame until it finishes or it is unparked byIScriptingInterface.unparkRunnable(String)
.void
pointAtSkyCoordinate(double ra, double dec)
Sets the camera in free mode and points it to the given coordinates in equatorial systemvoid
pointAtSkyCoordinate(long ra, long dec)
void
postRunnable(java.lang.Runnable runnable)
Posts aRunnable
to the main loop thread.void
preloadTexture(java.lang.String path)
Pre-loads the given image as a texture for later use.void
preloadTextures(java.lang.String[] paths)
Pre-loads the given images as textures for later use.void
print(java.lang.String message)
Print text using the internal logging systemvoid
removeAllObjects()
Removes all objects.boolean
removeDataset(java.lang.String dsName)
Removes the dataset identified by the given name, if it existsvoid
removeModelObject(java.lang.String name)
Removes the model object identified by the given name from the internal scene graph model of Gaia Sky, if it exists.void
removeObject(int id)
Removes the item with the given id.void
removeObjects(int[] ids)
Removes the items with the given ids.void
removeObjects(java.util.List ids)
void
resetImageSequenceNumber()
Resets to zero the image sequence number used to generate the file names of the frame output images.double[]
rotate2(double[] vector, double angle)
Rotates a 2D vector by the specified angle in degrees, counter-clockwise assuming that the y axis points up.double[]
rotate2(double[] vector, long angle)
double[]
rotate2(java.util.List vector, double angle)
double[]
rotate2(java.util.List vector, long angle)
double[]
rotate3(double[] vector, double[] axis, double angle)
Rotates a 3D vector around the given axis by the specified angle in degrees.double[]
rotate3(double[] vector, double[] axis, long angle)
double[]
rotate3(java.util.List vector, java.util.List axis, double angle)
double[]
rotate3(java.util.List vector, java.util.List axis, long angle)
void
runCameraPath(java.lang.String file)
Runs a .gsc camera path file and returns immediately.void
runCameraPath(java.lang.String file, boolean sync)
Runs a .gsc camera path file and returns immediately.void
runCameraRecording(java.lang.String file)
Runs the camera recording file with the given path.void
set360Mode(boolean state)
Enables and disables the 360 mode.void
setAmbientLight(float ambientLight)
Sets the ambient light to a certain value.void
setAmbientLight(int value)
void
setBloom(float value)
Sets the strength value for the bloom effect.void
setBloom(int level)
void
setBrightnessLevel(double level)
Sets the brightness level of the render system.void
setBrightnessLevel(long level)
void
setCameraDirection(double[] dir)
Sets the camera direction vector to the given vector, equatorial system.void
setCameraDirection(java.util.List dir)
void
setCameraFocus(java.lang.String focusName)
Sets the camera in focus mode with the focus object that bears the givenfocusName
.void
setCameraFocus(java.lang.String focusName, float waitTimeSeconds)
Sets the camera in focus mode with the focus object that bears the givenfocusName
.void
setCameraFocus(java.lang.String focusName, int waitTimeSeconds)
void
setCameraFocusInstant(java.lang.String focusName)
Sets the camera in focus mode with the given focus object.void
setCameraFocusInstantAndGo(java.lang.String focusName)
Sets the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.void
setCameraFov1()
Sets the camera in FoV1 mode.void
setCameraFov1and2()
Sets the camera in Fov1 and 2 mode.void
setCameraFov2()
Sets the camera in FoV2 mode.void
setCameraFree()
Sets the camera in free mode.void
setCameraLock(boolean lock)
Activates or deactivates the camera lock to the focus reference system when in focus mode.void
setCameraOrientationLock(boolean lock)
Locks or unlocks the orientation of the camera to the focus object's rotation.void
setCameraPosition(double[] vec)
Sets the camera position to the given coordinates, in Km, equatorial system.void
setCameraPosition(java.util.List vec)
void
setCameraPositionAndFocus(java.lang.String focus, java.lang.String other, double rotation, double viewAngle)
Sets the focus and instantly moves the camera to a point in the line defined byfocus
-other
and rotatedrotation
degrees aroundfocus
using the camera up vector as a rotation axis.
void
setCameraPositionAndFocus(java.lang.String focus, java.lang.String other, long rotation, long viewAngle)
void
setCameraPostion(double[] vec)
Sets the camera position to the given coordinates, in Km, equatorial system.void
setCameraSpeed(float speed)
Changes the speed multiplier of the camera and its accelerationvoid
setCameraSpeed(int speed)
void
setCameraSpeedLimit(int index)
Sets the speed limit of the camera given an index.void
setCameraState(double[] pos, double[] dir, double[] up)
Sets the camera state (position, direction and up vector).void
setCameraState(java.util.List pos, java.util.List dir, java.util.List up)
void
setCameraStateAndTime(double[] pos, double[] dir, double[] up, long time)
Sets the camera state (position, direction and up vector) plus the current time.void
setCameraStateAndTime(java.util.List pos, java.util.List dir, java.util.List up, long time)
void
setCameraUp(double[] up)
Sets the camera up vector to the given vector, equatorial system.void
setCameraUp(java.util.List up)
void
setCinematicCamera(boolean cinematic)
Enables or disables the cinematic camera mode.void
setContrastLevel(double level)
Sets the contrast level of the render system.void
setContrastLevel(long level)
void
setCrosshairVisibility(boolean visible)
Sets the visibility of the crosshair in focus and free modes.void
setCubemapProjection(java.lang.String projection)
Sets the cubemap projection to use.void
setCubemapResolution(int resolution)
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.void
setExposureToneMappingLevel(double level)
Sets the exposure level.void
setExposureToneMappingLevel(long level)
void
setFov(float newFov)
Changes the field of view of the camera.void
setFov(int newFov)
void
setFrameOutput(boolean active)
Activates or deactivates the image output system.void
setFrameOutputMode(java.lang.String screenshotMode)
Sets the frame output mode.void
setGammaCorrectionLevel(double level)
Sets the gamma correction level.void
setGammaCorrectionLevel(long level)
void
setGuiPosition(float x, float y)
Moves the interface window to a new position.void
setGuiPosition(float x, int y)
void
setGuiPosition(int x, float y)
void
setGuiPosition(int x, int y)
void
setGuiScrollPosition(float pixelY)
Sets the vertical scroll position in the GUI.void
setGuiScrollPosition(int pixelY)
void
setHDRToneMappingType(java.lang.String type)
Sets the high dynamic range tone mapping algorithm type.void
setHeadlineMessage(java.lang.String headline)
Sets a headline message that will appear in a big font in the screen.void
setHueLevel(double level)
Sets the hue level of the render system.void
setHueLevel(long level)
void
setLensFlare(boolean state)
Enables or deisables the lens flare effect.void
setMinStarOpacity(float opacity)
Sets the minimum star opacity.void
setMinStarOpacity(int opacity)
void
setMotionBlur(boolean state)
Enables or disables the motion blur effect.void
setObjectSizeScaling(java.lang.String name, double scalingFactor)
Sets the given size scaling factor to the object identified byname
.void
setPlanetariumMode(boolean state)
Enables and disables the planetarium mode.void
setProperMotionsArrowheads(boolean arrowheadsEnabled)
Sets whether to show arrowheads or not for the velocity vectors.void
setProperMotionsColorMode(int mode)
Sets the color mode of proper motion vectors.void
setProperMotionsLengthFactor(float factor)
Sets the length of the proper motion vectors, in [500..30000].void
setProperMotionsLengthFactor(int factor)
void
setProperMotionsMaxNumber(long maxNumber)
Overrides the maximum number of proper motion vectors that the program is allowed to show.void
setProperMotionsNumberFactor(float factor)
Sets the number factor of proper motion vectors that are visible.void
setProperMotionsNumberFactor(int factor)
void
setRotationCameraSpeed(float speed)
Changes the speed of the camera when it rotates around a focus.void
setRotationCameraSpeed(int speed)
void
setSaturationLevel(double level)
Sets the saturation level of the render system.void
setSaturationLevel(long level)
void
setSimulationPace(double pace)
Changes the pace of time.void
setSimulationPace(long pace)
void
setSimulationTime(int year, int month, int day, int hour, int min, int sec, int millisec)
Sets the time of the application, in UTC.void
setSimulationTime(long time)
Sets the time of the application.void
setSmoothLodTransitions(boolean value)
Sets the value of smooth lod transitions, allowing or disallowing octant fade-ins of as they come into view.void
setStarBrightness(float brightness)
Sets the star brightness value.void
setStarBrightness(int brightness)
void
setStarGlow(boolean state)
Enables or disables the star glow effect.void
setStarSize(float size)
Sets the star size value.void
setStarSize(int size)
void
setStereoscopicMode(boolean state)
Enables and disables the stereoscopic mode.void
setStereoscopicProfile(int index)
Changes the stereoscopic profile.void
setSubheadMessage(java.lang.String subhead)
Sets a subhead message that will appear in a small font below the headline.void
setTargetTime(int year, int month, int day, int hour, int min, int sec, int millisec)
Sets a time bookmark in the global clock that, when reached, the clock automatically stops.void
setTargetTime(long ms)
Sets a time bookmark in the global clock that, when reached, the clock automatically stops.void
setTurningCameraSpeed(float speed)
Changes the turning speed of the camera.void
setTurningCameraSpeed(int speed)
void
setUnfilteredProperMotionsNumberFactor(float factor)
void
setVisibility(java.lang.String key, boolean visible)
Sets the component described by the given name visible or invisible.boolean
showDataset(java.lang.String dsName)
Shows (un-hides) the dataset identified by the given name, if it exists and is hiddenvoid
sleep(float seconds)
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.void
sleep(int seconds)
void
sleepFrames(long frames)
Sleeps for a number of frames.void
startRecordingCameraPath()
Starts recording the camera path to a temporary file.void
startSimulationTime()
Starts the simulation.void
stopRecordingCameraPath()
Stops the current camera recording.void
stopSimulationTime()
Stops the simulation time.void
unparkRunnable(java.lang.String id)
Removes the runnable with the given id, if anyvoid
unsetTargetTime()
Unsets the target time bookmark from the global clock, if any.boolean
waitFocus(java.lang.String name, long timeoutMs)
Blocks the script until the focus is the object indicated by the name.void
waitForEnter()
Blocks the execution until the Enter key is pressed.void
waitForInput()
Blocks the execution until any kind of input (keyboard, mouse, etc.) is received.void
waitForInput(int keyCode)
Blocks the execution until the given key or button is pressed.
-
-
-
Method Detail
-
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 interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
-
setHeadlineMessage
public void setHeadlineMessage(java.lang.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 interfaceIScriptingInterface
- Parameters:
headline
- The headline text.
-
setSubheadMessage
public void setSubheadMessage(java.lang.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 interfaceIScriptingInterface
- Parameters:
subhead
- The subhead text.
-
clearHeadlineMessage
public void clearHeadlineMessage()
Description copied from interface:IScriptingInterface
Clears the headline messge.- Specified by:
clearHeadlineMessage
in interfaceIScriptingInterface
-
clearSubheadMessage
public void clearSubheadMessage()
Description copied from interface:IScriptingInterface
Clears the subhead message- Specified by:
clearSubheadMessage
in interfaceIScriptingInterface
-
clearAllMessages
public void clearAllMessages()
Description copied from interface:IScriptingInterface
Clears both the subhead and the headline messages.- Specified by:
clearAllMessages
in interfaceIScriptingInterface
-
disableInput
public void disableInput()
Description copied from interface:IScriptingInterface
Disables all input events from mouse, keyboard, touchscreen, etc.- Specified by:
disableInput
in interfaceIScriptingInterface
-
enableInput
public void enableInput()
Description copied from interface:IScriptingInterface
Enables all input events.- Specified by:
enableInput
in interfaceIScriptingInterface
-
setCinematicCamera
public void setCinematicCamera(boolean cinematic)
Description copied from interface:IScriptingInterface
Enables or disables the cinematic camera mode.- Specified by:
setCinematicCamera
in interfaceIScriptingInterface
- Parameters:
cinematic
- Whether to enable or disable the cinematic mode.
-
setCameraFocus
public void setCameraFocus(java.lang.String focusName)
Description copied from interface:IScriptingInterface
Sets the camera in focus mode with the focus object that bears the givenfocusName
. It returns immediately, so it does not wait for the camera direction to point to the focus.- Specified by:
setCameraFocus
in interfaceIScriptingInterface
- Parameters:
focusName
- The name of the new focus object.
-
setCameraFocus
public void setCameraFocus(java.lang.String focusName, float waitTimeSeconds)
Description copied from interface:IScriptingInterface
Sets the camera in focus mode with the focus object that bears the givenfocusName
. The amount of time to block and wait for the camera to face the focus can also be specified inwaitTimeSeconds
.- Specified by:
setCameraFocus
in interfaceIScriptingInterface
- 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(java.lang.String focusName, int waitTimeSeconds)
-
setCameraFocusInstant
public void setCameraFocusInstant(java.lang.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 interfaceIScriptingInterface
- Parameters:
focusName
- The name of the new focus object.
-
setCameraFocusInstantAndGo
public void setCameraFocusInstantAndGo(java.lang.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 interfaceIScriptingInterface
- Parameters:
focusName
- The name of the new focus object.
-
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 interfaceIScriptingInterface
- Parameters:
lock
- Activate or deactivate the lock.
-
setCameraFree
public void setCameraFree()
Description copied from interface:IScriptingInterface
Sets the camera in free mode.- Specified by:
setCameraFree
in interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
vec
- Vector of three components in internal coordinates and Km.
-
setCameraPosition
public void setCameraPosition(java.util.List vec)
-
getCameraPosition
public double[] getCameraPosition()
Description copied from interface:IScriptingInterface
Gets the current camera position, in km.- Specified by:
getCameraPosition
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
dir
- The direction vector in equatorial coordinates.
-
setCameraDirection
public void setCameraDirection(java.util.List dir)
-
getCameraDirection
public double[] getCameraDirection()
Description copied from interface:IScriptingInterface
Gets the current camera direction vector.- Specified by:
getCameraDirection
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
up
- The up vector in equatorial coordinates.
-
setCameraUp
public void setCameraUp(java.util.List up)
-
getCameraUp
public double[] getCameraUp()
Description copied from interface:IScriptingInterface
Gets the current camera up vector.- Specified by:
getCameraUp
in interfaceIScriptingInterface
- Returns:
- The camera up vector in the internal reference system.
-
setCameraPositionAndFocus
public void setCameraPositionAndFocus(java.lang.String focus, java.lang.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 byfocus
-other
and rotatedrotation
degrees aroundfocus
using the camera up vector as a rotation axis.
- Specified by:
setCameraPositionAndFocus
in interfaceIScriptingInterface
- Parameters:
focus
- The name of the focus objectother
- The name of the other object, to the fine a line from this to foucs. Usually a light sourcerotation
- The rotation angle, in degreesviewAngle
- The view angle which determines the distance, in degrees.
-
setCameraPositionAndFocus
public void setCameraPositionAndFocus(java.lang.String focus, java.lang.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 interfaceIScriptingInterface
- Parameters:
ra
- Right ascension in degreesdec
- 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 interfaceIScriptingInterface
- Parameters:
speed
- The new speed, from 1 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
speed
- The new rotation speed, from 1 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 interfaceIScriptingInterface
- 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 - 1 c
- 2 - 2 c
- 3 - 10 c
- 4 - 1e3 c
- 5 - 1 AU/s
- 6 - 10 AU/s
- 7 - 1000 AU/s
- 8 - 10000 AU/s
- 9 - 1 pc/s
- 10 - 1 pc/s
- 11 - 2 pc/s
- 12 - 10 pc/s
- 13 - 1000 pc/s
- 14 - unlimited
- Specified by:
setCameraSpeedLimit
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 asIScriptingInterface.cameraTurn(double, double)
with deltaY set to zero.- Specified by:
cameraYaw
in interfaceIScriptingInterface
-
cameraYaw
public void cameraYaw(long amount)
-
cameraPitch
public void cameraPitch(double amount)
Description copied from interface:IScriptingInterface
Adds a pitch to the camera. Same asIScriptingInterface.cameraTurn(double, double)
with deltaX set to zero.- Specified by:
cameraPitch
in interfaceIScriptingInterface
-
cameraPitch
public void cameraPitch(long amount)
-
cameraStop
public void cameraStop()
Description copied from interface:IScriptingInterface
Stops all camera motion.- Specified by:
cameraStop
in interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
-
getClosestObjectToCamera
public IFocus getClosestObjectToCamera()
Description copied from interface:IScriptingInterface
Returns the closest object to the camera in this instant as aIFocus
.- Specified by:
getClosestObjectToCamera
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
newFov
- The new field of view value in degrees, between 20 and 160.
-
setFov
public void setFov(int newFov)
-
setVisibility
public void setVisibility(java.lang.String key, boolean visible)
Description copied from interface:IScriptingInterface
Sets the component described by the given name visible or invisible.- Specified by:
setVisibility
in interfaceIScriptingInterface
- Parameters:
key
- The key of the component, seeComponentTypes.ComponentType
. Usually 'element.stars', 'element.moons', 'element.atmospheres', etc.visible
- The visible value.
-
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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
factor
- Factor in [500.30000]
-
setProperMotionsLengthFactor
public void setProperMotionsLengthFactor(int factor)
-
setProperMotionsMaxNumber
public void setProperMotionsMaxNumber(long maxNumber)
Description copied from interface:IScriptingInterface
Overrides the maximum number of proper motion vectors that the program is allowed to show.- Specified by:
setProperMotionsMaxNumber
in interfaceIScriptingInterface
- Parameters:
maxNumber
- The maximum number of proper motion vectors. Negative to use default
-
getProperMotionsMaxNumber
public long getProperMotionsMaxNumber()
Description copied from interface:IScriptingInterface
Returns the current maximum number of proper motion vectors allowed.- Specified by:
getProperMotionsMaxNumber
in interfaceIScriptingInterface
- Returns:
- Max number of pm vectors
-
setCrosshairVisibility
public void setCrosshairVisibility(boolean visible)
Description copied from interface:IScriptingInterface
Sets the visibility of the crosshair in focus and free modes.- Specified by:
setCrosshairVisibility
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
ambientLight
- The value of the ambient light, between 0 and 100.
-
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 interfaceIScriptingInterface
- Parameters:
year
- The year to representmonth
- The month-of-year to represent, from 1 (January) to 12 (December)day
- The day-of-month to represent, from 1 to 31hour
- The hour-of-day to represent, from 0 to 23min
- The minute-of-hour to represent, from 0 to 59sec
- The second-of-minute to represent, from 0 to 59millisec
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
-
stopSimulationTime
public void stopSimulationTime()
Description copied from interface:IScriptingInterface
Stops the simulation time.- Specified by:
stopSimulationTime
in interfaceIScriptingInterface
-
isSimulationTimeOn
public boolean isSimulationTimeOn()
Description copied from interface:IScriptingInterface
Queries whether the time is on or not.- Specified by:
isSimulationTimeOn
in interfaceIScriptingInterface
- Returns:
- True if the time is on, false otherwise.
-
setSimulationPace
public void setSimulationPace(double pace)
Description copied from interface:IScriptingInterface
Changes the pace of time.- Specified by:
setSimulationPace
in interfaceIScriptingInterface
- Parameters:
pace
- The pace as a factor of real physical time pace. 2.0 sets the pace to be twice as fast as real time.
-
setSimulationPace
public void setSimulationPace(long pace)
-
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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
year
- The year to representmonth
- The month-of-year to represent, from 1 (January) to 12 (December)day
- The day-of-month to represent, from 1 to 31hour
- The hour-of-day to represent, from 0 to 23min
- The minute-of-hour to represent, from 0 to 59sec
- The second-of-minute to represent, from 0 to 59millisec
- 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 interfaceIScriptingInterface
-
setStarBrightness
public void setStarBrightness(float brightness)
Description copied from interface:IScriptingInterface
Sets the star brightness value.- Specified by:
setStarBrightness
in interfaceIScriptingInterface
- Parameters:
brightness
- The brightness value, between 0 and 100.
-
setStarBrightness
public void setStarBrightness(int brightness)
-
getStarBrightness
public float getStarBrightness()
Description copied from interface:IScriptingInterface
Gets the star brightness value.- Specified by:
getStarBrightness
in interfaceIScriptingInterface
- Returns:
- The brightness value, between 0 and 100.
-
setStarSize
public void setStarSize(float size)
Description copied from interface:IScriptingInterface
Sets the star size value.- Specified by:
setStarSize
in interfaceIScriptingInterface
- Parameters:
size
- The size value, between 0 and 100.
-
setStarSize
public void setStarSize(int size)
-
getStarSize
public float getStarSize()
Description copied from interface:IScriptingInterface
Gets the current star size.- Specified by:
getStarSize
in interfaceIScriptingInterface
- Returns:
- The size value, between 0 and 100.
-
getMinStarOpacity
public float getMinStarOpacity()
Description copied from interface:IScriptingInterface
Gets the minimum star opacity.- Specified by:
getMinStarOpacity
in interfaceIScriptingInterface
- Returns:
- The minimum opacity value, between 0 and 100.
-
setMinStarOpacity
public void setMinStarOpacity(float opacity)
Description copied from interface:IScriptingInterface
Sets the minimum star opacity.- Specified by:
setMinStarOpacity
in interfaceIScriptingInterface
- Parameters:
opacity
- The minimum opacity value, between 0 and 100.
-
setMinStarOpacity
public void setMinStarOpacity(int opacity)
-
configureFrameOutput
public void configureFrameOutput(int width, int height, int fps, java.lang.String folder, java.lang.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 interfaceIScriptingInterface
- 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, java.lang.String folder, java.lang.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 interfaceIScriptingInterface
- 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(java.lang.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 usingIScriptingInterface.configureFrameOutput(int, int, int, String, String)
and it does not draw the UI elements.- Specified by:
setFrameOutputMode
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Returns:
- True if the frame output is active.
-
getFrameOutputFps
public int getFrameOutputFps()
Description copied from interface:IScriptingInterface
Gets the current FPS setting in the frame output system.- Specified by:
getFrameOutputFps
in interfaceIScriptingInterface
- Returns:
- The FPS setting.
-
getRenderOutputFps
public int getRenderOutputFps()
Description copied from interface:IScriptingInterface
Gets the current FPS setting in the frame output system.- Specified by:
getRenderOutputFps
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
active
- Whether to activate or deactivate the frame output system.
-
getObject
public SceneGraphNode getObject(java.lang.String name)
Description copied from interface:IScriptingInterface
Gets an object from the scene graph byname
or id (HIP, TYC, Gaia SourceId).- Specified by:
getObject
in interfaceIScriptingInterface
- 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(java.lang.String name, double timeOutSeconds)
Description copied from interface:IScriptingInterface
Gets an object byname
or id (HIP, TYC, Gaia SourceID), optionally waiting until the object is available, with a timeout.- Specified by:
getObject
in interfaceIScriptingInterface
- Parameters:
name
- The name or id (HIP, TYC, Gaia SourceId) of the objecttimeOutSeconds
- 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(java.lang.String name, double scalingFactor)
Description copied from interface:IScriptingInterface
Sets the given size scaling factor to the object identified byname
. 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 interfaceIScriptingInterface
- Parameters:
name
- The name or id (HIP, TYC, sourceId) of the object.scalingFactor
- The scaling factor to scale the size of that object.
-
getObjectRadius
public double getObjectRadius(java.lang.String name)
Description copied from interface:IScriptingInterface
Gets the size of the object identified byname
, in Km, by name or id (HIP, TYC, sourceId).- Specified by:
getObjectRadius
in interfaceIScriptingInterface
- 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(java.lang.String name)
Description copied from interface:IScriptingInterface
Runs a seamless trip to the object with the namefocusName
until the object view angle is20 degrees
.- Specified by:
goToObject
in interfaceIScriptingInterface
- Parameters:
name
- The name or id (HIP, TYC, sourceId) of the object.
-
goToObject
public void goToObject(java.lang.String name, double angle)
Description copied from interface:IScriptingInterface
Runs a seamless trip to the object with the namefocusName
until the object view angleviewAngle
is met. If angle is negative, the default angle is20 degrees
.- Specified by:
goToObject
in interfaceIScriptingInterface
- 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(java.lang.String name, double viewAngle, float waitTimeSeconds)
Description copied from interface:IScriptingInterface
Runs a seamless trip to the object with the namefocusName
until the object view angleviewAngle
is met. If angle is negative, the default angle is20 degrees
. IfwaitTimeSeconds
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 theturn velocity
of the camera. SeeIScriptingInterface.setTurningCameraSpeed(float)
.- Specified by:
goToObject
in interfaceIScriptingInterface
- 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(java.lang.String name, double viewAngle, int waitTimeSeconds)
-
goToObject
public void goToObject(java.lang.String name, long viewAngle, int waitTimeSeconds)
-
goToObject
public void goToObject(java.lang.String name, long viewAngle, float waitTimeSeconds)
-
goToObject
public void goToObject(java.lang.String name, double viewAngle, int waitTimeSeconds, java.util.concurrent.atomic.AtomicBoolean stop)
-
goToObject
public void goToObject(IFocus object, double viewAngle, int waitTimeSeconds, java.util.concurrent.atomic.AtomicBoolean stop)
-
goToObjectInstant
public void goToObjectInstant(java.lang.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 interfaceIScriptingInterface
- Parameters:
name
- The name of the new focus object.
-
landOnObject
public void landOnObject(java.lang.String name)
Description copied from interface:IScriptingInterface
Lands on the object with the given name, if it is an instance ofPlanet
. The land location is determined by the line of sight from the current position of the camera to the object.- Specified by:
landOnObject
in interfaceIScriptingInterface
- Parameters:
name
- The proper name of the object.
-
landOnObjectLocation
public void landOnObjectLocation(java.lang.String name, java.lang.String locationName)
Description copied from interface:IScriptingInterface
Lands on the object with the givenname
, if it is an instance ofPlanet
, at the location with the given name, if it exists.- Specified by:
landOnObjectLocation
in interfaceIScriptingInterface
- Parameters:
name
- The proper name of the object.locationName
- The name of the location to land on
-
landOnObjectLocation
public void landOnObjectLocation(java.lang.String name, java.lang.String locationName, java.util.concurrent.atomic.AtomicBoolean stop)
-
landOnObjectLocation
public void landOnObjectLocation(IFocus object, java.lang.String locationName, java.util.concurrent.atomic.AtomicBoolean stop)
-
landOnObjectLocation
public void landOnObjectLocation(java.lang.String name, double longitude, double latitude)
Description copied from interface:IScriptingInterface
Lands on the object with the givenname
, if it is an instance ofPlanet
, at the location specified in by [latitude, longitude], in degrees.- Specified by:
landOnObjectLocation
in interfaceIScriptingInterface
- Parameters:
name
- The proper name of the object.longitude
- The location longitude, in degrees.latitude
- The location latitude, in degrees.
-
getDistanceTo
public double getDistanceTo(java.lang.String name)
Description copied from interface:IScriptingInterface
Returns the distance to the surface of the object identified with the givenname
. If the object is an abstract node or does not exist, it returns a negative distance.- Specified by:
getDistanceTo
in interfaceIScriptingInterface
- 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.
-
getObjectPosition
public double[] getObjectPosition(java.lang.String name)
Description copied from interface:IScriptingInterface
Gets the current position of the object identified byname
in the internal coordinate system and internal units. If the object does not exist, it returns null- Specified by:
getObjectPosition
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
-
displayMessageObject
public void displayMessageObject(int id, java.lang.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 interfaceIScriptingInterface
- 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, java.lang.String message, float x, float y, float r, float g, float b, float a, int fontSize)
-
displayTextObject
public void displayTextObject(int id, java.lang.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 interfaceIScriptingInterface
- 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, java.lang.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, java.lang.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 interfaceIScriptingInterface
- 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, java.lang.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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
-
removeObject
public void removeObject(int id)
Description copied from interface:IScriptingInterface
Removes the item with the given id.- Specified by:
removeObject
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
ids
- Vector with the integer ids of the objects to remove
-
removeObjects
public void removeObjects(java.util.List ids)
-
maximizeInterfaceWindow
public void maximizeInterfaceWindow()
Description copied from interface:IScriptingInterface
Maximizes the interface window.- Specified by:
maximizeInterfaceWindow
in interfaceIScriptingInterface
-
minimizeInterfaceWindow
public void minimizeInterfaceWindow()
Description copied from interface:IScriptingInterface
Minimizes the interface window.- Specified by:
minimizeInterfaceWindow
in interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
-
waitForEnter
public void waitForEnter()
Description copied from interface:IScriptingInterface
Blocks the execution until the Enter key is pressed.- Specified by:
waitForEnter
in interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
- Parameters:
keyCode
- The key or button code. Please seeInput
.
-
getScreenWidth
public int getScreenWidth()
Description copied from interface:IScriptingInterface
Returns the screen width in pixels.- Specified by:
getScreenWidth
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Returns:
- The screen height in pixels.
-
getPositionAndSizeGui
public float[] getPositionAndSizeGui(java.lang.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 interfaceIScriptingInterface
- 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(java.lang.String name)
Description copied from interface:IScriptingInterface
Expands the component with the given name.- Specified by:
expandGuiComponent
in interfaceIScriptingInterface
- Parameters:
name
- The name, as in `CameraComponent` or `ObjectsComponent`
-
collapseGuiComponent
public void collapseGuiComponent(java.lang.String name)
Description copied from interface:IScriptingInterface
Collapses the component with the given name.- Specified by:
collapseGuiComponent
in interfaceIScriptingInterface
- Parameters:
name
- The name, as in `CameraComponent` or `ObjectsComponent`
-
getVersionNumber
public java.lang.String getVersionNumber()
Description copied from interface:IScriptingInterface
Returns the version number string.- Specified by:
getVersionNumber
in interfaceIScriptingInterface
- Returns:
- The version number string.
-
waitFocus
public boolean waitFocus(java.lang.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 interfaceIScriptingInterface
- Parameters:
name
- The name of the focus to wait fortimeoutMs
- Timeout in ms to wait. Set negative to disable timeout.- Returns:
- True if the timeout ran out. False otherwise.
-
preloadTexture
public void preloadTexture(java.lang.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 interfaceIScriptingInterface
- Parameters:
path
- The path of the image file to preload
-
preloadTextures
public void preloadTextures(java.lang.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 interfaceIScriptingInterface
- Parameters:
paths
- The texture paths.
-
startRecordingCameraPath
public void startRecordingCameraPath()
Description copied from interface:IScriptingInterface
Starts recording the camera path to a temporary file. This command has no effect if the camera is already being recorded.- Specified by:
startRecordingCameraPath
in interfaceIScriptingInterface
-
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 interfaceIScriptingInterface
-
runCameraPath
public void runCameraPath(java.lang.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 interfaceIScriptingInterface
- 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.
-
runCameraPath
public void runCameraPath(java.lang.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 interfaceIScriptingInterface
- Parameters:
file
- The path to the camera file. Path is relative to the application's root directory or absolute.
-
runCameraRecording
public void runCameraRecording(java.lang.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 interfaceIScriptingInterface
- Parameters:
file
- The path of the camera file. Path is relative to the application's root directory or absolute.
-
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 interfaceIScriptingInterface
- 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(java.util.List camPos, java.util.List camDir, java.util.List camUp, double seconds)
-
cameraTransition
public void cameraTransition(java.util.List camPos, java.util.List camDir, java.util.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 interfaceIScriptingInterface
- 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(java.util.List camPos, java.util.List camDir, java.util.List camUp, double seconds, boolean sync)
-
cameraTransition
public void cameraTransition(java.util.List camPos, java.util.List camDir, java.util.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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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]
withra
anddec
in degrees anddistance
in the same distance units as the input position.
-
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 interfaceIScriptingInterface
- Parameters:
eq
- Vector with [x, y, z] equatorial cartesian coordinates- Returns:
- Vector with [x, y, z] galactic cartesian coordinates
-
equatorialToGalactic
public double[] equatorialToGalactic(java.util.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 interfaceIScriptingInterface
- Parameters:
eq
- Vector with [x, y, z] equatorial cartesian coordinates- Returns:
- Vector with [x, y, z] ecliptic cartesian coordinates
-
equatorialToEcliptic
public double[] equatorialToEcliptic(java.util.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 interfaceIScriptingInterface
- Parameters:
gal
- Vector with [x, y, z] galactic cartesian coordinates- Returns:
- Vector with [x, y, z] equatorial cartesian coordinates
-
galacticToEquatorial
public double[] galacticToEquatorial(java.util.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 interfaceIScriptingInterface
- Parameters:
ecl
- Vector with [x, y, z] ecliptic cartesian coordinates- Returns:
- Vector with [x, y, z] equatorial cartesian coordinates
-
eclipticToEquatorial
public double[] eclipticToEquatorial(java.util.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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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(java.lang.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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
level
- The exposure level in [0..n]. Set to 0 to disable exposure tone mapping.
-
setExposureToneMappingLevel
public void setExposureToneMappingLevel(long level)
-
set360Mode
public void set360Mode(boolean state)
Description copied from interface:IScriptingInterface
Enables and disables the 360 mode.- Specified by:
set360Mode
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
resolution
- The resolution of each of the sides of the cubemap for the 360 mode.
-
setCubemapProjection
public void setCubemapProjection(java.lang.String projection)
Description copied from interface:IScriptingInterface
Sets the cubemap projection to use. Accepted values are "EQUIRECTANGULAR", "CYLINDRICAL" and "HAMMER". Seecom.bitfire.postprocessing.effects.CubemapProjections.CubemapProjection
for possible values.- Specified by:
setCubemapProjection
in interfaceIScriptingInterface
-
setStereoscopicMode
public void setStereoscopicMode(boolean state)
Description copied from interface:IScriptingInterface
Enables and disables the stereoscopic mode.- Specified by:
setStereoscopicMode
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
index
- The index of the new profile:- 0 - VR_HEADSET
- 1 - HD_3DTV
- 2 - CROSSEYE
- 3 - PARALLEL_VIEW
- 4 - ANAGLYPHIC (red-cyan)
-
setPlanetariumMode
public void setPlanetariumMode(boolean state)
Description copied from interface:IScriptingInterface
Enables and disables the planetarium mode.- Specified by:
setPlanetariumMode
in interfaceIScriptingInterface
- Parameters:
state
- The boolean sate. True to activate, false to deactivate.
-
getCurrentFrameNumber
public long getCurrentFrameNumber()
Description copied from interface:IScriptingInterface
Gets the current frame number. Useful for timing actions in scripts.- Specified by:
getCurrentFrameNumber
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
vector
- Vector to rotate, with at least 3 componentsaxis
- The axis, with at least 3 componentsangle
- Angle in degrees- Returns:
- The new vector, rotated
-
rotate3
public double[] rotate3(double[] vector, double[] axis, long angle)
-
rotate3
public double[] rotate3(java.util.List vector, java.util.List axis, double angle)
-
rotate3
public double[] rotate3(java.util.List vector, java.util.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 interfaceIScriptingInterface
- 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(java.util.List vector, double angle)
-
rotate2
public double[] rotate2(java.util.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 interfaceIScriptingInterface
- Parameters:
vec1
- First 3D vectorvec2
- Second 3D vector- Returns:
- Cross product 3D vector
-
cross3
public double[] cross3(java.util.List vec1, java.util.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 interfaceIScriptingInterface
- Parameters:
vec1
- First 3D vectorvec2
- Second 3D vector- Returns:
- The dot product scalar
-
dot3
public double dot3(java.util.List vec1, java.util.List vec2)
-
addPolyline
public void addPolyline(java.lang.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.- Specified by:
addPolyline
in interfaceIScriptingInterface
- 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
- A 4D array with the RGBA color, where each element is in [0..1].
-
addPolyline
public void addPolyline(java.lang.String name, java.util.List points, java.util.List color)
-
addPolyline
public void addPolyline(java.lang.String name, double[] points, double[] color, float 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.- Specified by:
addPolyline
in interfaceIScriptingInterface
- 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
- A 4D array with the RGBA color, where each element is in [0..1].lineWidth
- The line width. Usually a value between 1 (default) and 10.
-
addPolyline
public void addPolyline(java.lang.String name, double[] points, double[] color, int lineWidth)
-
addPolyline
public void addPolyline(java.lang.String name, java.util.List points, java.util.List color, float lineWidth)
-
addPolyline
public void addPolyline(java.lang.String name, java.util.List points, java.util.List color, int lineWidth)
-
removeModelObject
public void removeModelObject(java.lang.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 interfaceIScriptingInterface
- Parameters:
name
- The name of the object to remove.
-
postRunnable
public void postRunnable(java.lang.Runnable runnable)
Description copied from interface:IScriptingInterface
Posts aRunnable
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 interfaceIScriptingInterface
- Parameters:
runnable
- The runnable to run
-
parkRunnable
public void parkRunnable(java.lang.String id, java.lang.Runnable runnable)
Description copied from interface:IScriptingInterface
Parks aRunnable
to the main loop thread, and keeps it running every frame until it finishes or it is unparked byIScriptingInterface.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 withIScriptingInterface.unparkRunnable(String)
if needed.- Specified by:
parkRunnable
in interfaceIScriptingInterface
- Parameters:
id
- The string id to identify the runnablerunnable
- The runnable to park
-
unparkRunnable
public void unparkRunnable(java.lang.String id)
Description copied from interface:IScriptingInterface
Removes the runnable with the given id, if any- Specified by:
unparkRunnable
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Parameters:
pos
- The position of the camera in internal units, not Kmdir
- The direction of the cameraup
- The up vector of the camera
-
setCameraState
public void setCameraState(java.util.List pos, java.util.List dir, java.util.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 interfaceIScriptingInterface
- Parameters:
pos
- The position of the camera in internal units, not Kmdir
- The direction of the cameraup
- The up vector of the cameratime
- The new time of the camera as the number of milliseconds since the epoch (Jan 1, 1970)
-
setCameraStateAndTime
public void setCameraStateAndTime(java.util.List pos, java.util.List dir, java.util.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 interfaceIScriptingInterface
-
loadDataset
public boolean loadDataset(java.lang.String dsName, java.lang.String absolutePath)
Description copied from interface:IScriptingInterface
Loads a VOTable file (.vot
) 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 interfaceIScriptingInterface
- Parameters:
dsName
- The name of the dataset, used to identify the subsequent operations on the datasetabsolutePath
- Absolute path to the.vot
file to load- Returns:
- False if the dataset could not be loaded, true otherwise
-
loadDataset
public boolean loadDataset(java.lang.String dsName, java.lang.String absolutePath, boolean sync)
Description copied from interface:IScriptingInterface
Loads a VOTable file (.vot
) with a given name. The call can be made synchronous or asynchronous.
Ifsync
is true, the call acts exactly likeIScriptingInterface.loadDataset(String, String)
.
Ifsync
is false, the loading happens in a new thread and the call returns immediately. In this case, you can useIScriptingInterface.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 interfaceIScriptingInterface
- Parameters:
dsName
- The name of the dataset, used to identify the subsequent operations on the datasetabsolutePath
- Absolute path to the.vot
file to loadsync
- 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(java.lang.String dsName, java.lang.String absolutePath, CatalogInfo.CatalogInfoType type, boolean sync)
-
hasDataset
public boolean hasDataset(java.lang.String dsName)
Description copied from interface:IScriptingInterface
Checks whether the dataset identified by the given name is loaded- Specified by:
hasDataset
in interfaceIScriptingInterface
- Parameters:
dsName
- The name of the dataset to query- Returns:
- True if the dataset is loaded, false otherwise
-
removeDataset
public boolean removeDataset(java.lang.String dsName)
Description copied from interface:IScriptingInterface
Removes the dataset identified by the given name, if it exists- Specified by:
removeDataset
in interfaceIScriptingInterface
- Parameters:
dsName
- The name of the dataset to remove- Returns:
- False if the dataset could not be found
-
hideDataset
public boolean hideDataset(java.lang.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 interfaceIScriptingInterface
- Parameters:
dsName
- The name of the dataset to hide- Returns:
- False if the dataset could not be found
-
showDataset
public boolean showDataset(java.lang.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 interfaceIScriptingInterface
- Parameters:
dsName
- The name of the dataset to show- Returns:
- False if the dataset could not be found
-
highlightDataset
public boolean highlightDataset(java.lang.String dsName, boolean highlight)
Description copied from interface:IScriptingInterface
Enables or disables the dataset highlight, using a cyclic color which changes every call- Specified by:
highlightDataset
in interfaceIScriptingInterface
- Parameters:
dsName
- The dataset namehighlight
- State- Returns:
- False if the dataset could not be found
-
highlightDataset
public boolean highlightDataset(java.lang.String dsName, int colorIndex, boolean highlight)
Description copied from interface:IScriptingInterface
Enables or disables the dataset highlight, using a given color index:- 0 - red
- 1 - green
- 2 - blue
- 3 - cyan
- 4 - magenta
- 5 - yellow
- Specified by:
highlightDataset
in interfaceIScriptingInterface
- Parameters:
dsName
- The dataset namecolorIndex
- Color index in [0..5]highlight
- State- Returns:
- False if the dataset could not be found
-
listDatasets
public java.util.List<java.lang.String> listDatasets()
Description copied from interface:IScriptingInterface
Returns the names of all datasets currently loaded- Specified by:
listDatasets
in interfaceIScriptingInterface
- 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 interfaceIScriptingInterface
- Returns:
- The current frame number
-
getDefaultFramesDir
public java.lang.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 interfaceIScriptingInterface
- Returns:
- Absolute path of directory where still frames are saved
-
getDefaultScreenshotsDir
public java.lang.String getDefaultScreenshotsDir()
Description copied from interface:IScriptingInterface
Gets the absolute path of the default directory where the screenshots are saved- Specified by:
getDefaultScreenshotsDir
in interfaceIScriptingInterface
- Returns:
- Absolute path of directory where screenshots are saved
-
getDefaultCameraDir
public java.lang.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 interfaceIScriptingInterface
- Returns:
- Absolute path of directory where camera files are saved
-
getDefaultMusicDir
public java.lang.String getDefaultMusicDir()
Description copied from interface:IScriptingInterface
Gets the absolute path to the location of the music files- Specified by:
getDefaultMusicDir
in interfaceIScriptingInterface
- Returns:
- Absolute path to the location of the music files
-
getDefaultMappingsDir
public java.lang.String getDefaultMappingsDir()
Description copied from interface:IScriptingInterface
Gets the absolute path to the location of the inputListener mappings- Specified by:
getDefaultMappingsDir
in interfaceIScriptingInterface
- Returns:
- Absolute path to the location of the inputListener mappings
-
getDataDir
public java.lang.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 interfaceIScriptingInterface
- Returns:
- Absolute path to the location of the data files
-
getConfigDir
public java.lang.String getConfigDir()
Description copied from interface:IScriptingInterface
Gets the absolute path to the location of the configuration directory- Specified by:
getConfigDir
in interfaceIScriptingInterface
- Returns:
- Absolute path of config directory
-
getLocalDataDir
public java.lang.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 interfaceIScriptingInterface
- Returns:
- Absolute path of data directory
-
print
public void print(java.lang.String message)
Description copied from interface:IScriptingInterface
Print text using the internal logging system- Specified by:
print
in interfaceIScriptingInterface
- Parameters:
message
- The message
-
log
public void log(java.lang.String message)
Description copied from interface:IScriptingInterface
Print text using the internal logging system- Specified by:
log
in interfaceIScriptingInterface
- Parameters:
message
- The message
-
error
public void error(java.lang.String message)
Description copied from interface:IScriptingInterface
Log an error using the internal logging system- Specified by:
error
in interfaceIScriptingInterface
- Parameters:
message
- The error message
-
-