Interface IScriptingInterface
- All Known Implementing Classes:
EventScriptingInterface
Definition of the public API (v1), which defines calls and command to interact with Gaia Sky. These calls
can be accessed through Python scripts, via Py4j, using the REST server, or using the in-app console.
See APIv1 for a high-level description of the APIv1.
For more information on Gaia Sky scripting, see this page.
-
Method Summary
Modifier and TypeMethodDescriptionvoidSet the current time frame to real time.voidSet the current time frame to simulation time.voidaddPolyline(String name, double[] points, double[] color) Add a new polyline with the given name, points and color.voidaddPolyline(String name, double[] points, double[] color, double lineWidth) Add a new polyline with the given name, points, color and line width.voidaddPolyline(String name, double[] points, double[] color, double lineWidth, boolean arrowCaps) Add a new polyline with the given name, points, color and line width.voidaddPolyline(String name, double[] points, double[] color, double lineWidth, int primitive) Add a new polyline with the given name, points, color, line width and primitive.voidaddPolyline(String name, double[] points, double[] color, double lineWidth, int primitive, boolean arrowCaps) Add a new polyline with the given name, points, color, line width, primitive and arrow caps.voidaddShapeAroundObject(String shapeName, String shape, String primitive, double size, String objectName, float r, float g, float b, float a, boolean showLabel, boolean trackObject) Create a shape object of the given type with the given size around the object with the given name and primitive.voidaddShapeAroundObject(String shapeName, String shape, String primitive, String orientation, double size, String objectName, float r, float g, float b, float a, boolean showLabel, boolean trackObject) Create a shape object of the given type with the given size around the object with the given name, primitive and orientation.voidaddTrajectoryLine(String name, double[] points, double[] color) Add a new trajectory object with the given name, points and color.voidaddTrajectoryLine(String name, double[] points, double[] color, double trailMap) Add a new trajectory object with the given name, points and color.voidCreate a backup of the current settings state that can be restored later on.voidCenters the camera to the focus, removing any deviation of the line of sight.voidcameraForward(double value) Add a forward movement to the camera with the given value.voidcameraOrientationTransition(double[] camDir, double[] camUp, double durationSeconds, String smoothType, double smoothFactor, boolean sync) Create a smooth transition from the current camera orientation to the given camera orientation {camDir, camUp} in the given number of seconds.voidcameraPitch(double amount) Add a pitch to the camera.voidcameraPositionTransition(double[] camPos, String units, double durationSeconds, String smoothType, double smoothFactor, boolean sync) Create a smooth transition from the current camera position to the given camera position in the given number of seconds.voidcameraRoll(double roll) Add a roll force to the camera.voidcameraRotate(double deltaX, double deltaY) Add a rotation movement to the camera around the current focus, or a pitch/yaw if in free mode.voidStops all camera motion.voidcameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds) Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.voidcameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds, boolean sync) Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.voidcameraTransition(double[] camPos, double[] camDir, double[] camUp, double positionDurationSeconds, String positionSmoothType, double positionSmoothFactor, double orientationDurationSeconds, String orientationSmoothType, double orientationSmoothFactor) Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.voidcameraTransition(double[] camPos, String units, double[] camDir, double[] camUp, double seconds) Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.voidcameraTransition(double[] camPos, String units, double[] camDir, double[] camUp, double seconds, boolean sync) Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.voidcameraTransition(double[] camPos, String units, double[] camDir, double[] camUp, double positionDurationSeconds, String positionSmoothType, double positionSmoothFactor, double orientationDurationSeconds, String orientationSmoothType, double orientationSmoothFactor, boolean sync) Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.voidcameraTransitionKm(double[] camPos, double[] camDir, double[] camUp, double seconds) Same ascameraTransition(double[], double[], double[], double)but the camera position is given in Km.voidcameraTurn(double deltaX, double deltaY) Add a turn force to the camera (yaw and/or pitch).voidcameraYaw(double amount) Add a yaw to the camera.voidClear both the subhead and the headline messages.booleanClear the transformation matrix (if any) in the dataset identified by the given name.voidClear the headline message.voidClears all label-filtering regular expressions currently in use, set withsetLabelExcludeRegexp(String)orsetLabelIncludeRegexp(String), if any.voidClear the stack of settings objects.voidClear the subhead message.voidcollapseGuiComponent(String name) Deprecated.voidcollapseUIPane(String panelName) Collapses the UI pane with the given name.voidconfigureFrameOutput(int width, int height, double fps, String directory, String namePrefix) Configures the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix.voidconfigureFrameOutput(int width, int height, int fps, String directory, String namePrefix) Configures the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix.voidconfigureRenderOutput(int width, int height, int fps, String directory, String namePrefix) Deprecated.UseconfigureFrameOutput(int, int, int, String, String)instead.voidconfigureScreenshots(int width, int height, String directory, String namePrefix) Configures the screenshot system, setting the resolution of the images, the output directory and the image name prefix.double[]cross3(double[] vec1, double[] vec2) Compute the cross product between the two 3D vectors.voidDisables the GUI rendering.voidDisable all input events from mouse, keyboard, touchscreen, etc.voiddisplayImageObject(int id, String path, double x, double y, double[] color) Same asdisplayImageObject(int, String, float, float, float, float, float, float)but using a double array for the color instead of each component separately.voiddisplayImageObject(int id, String path, float x, float y) Add a new image object at the given coordinates.voiddisplayImageObject(int id, String path, float x, float y, float r, float g, float b, float a) Add a new image object at the given coordinates.voiddisplayMessageObject(int id, String message, double x, double y, double[] color, double fontSize) Same asdisplayImageObject(int, String, float, float, float, float, float, float)but using an array for the color instead of giving each component separately.voiddisplayMessageObject(int id, String message, float x, float y, float r, float g, float b, float a, float fontSize) Add a new one-line message in the screen with the given id and the given coordinates.voiddisplayPopupNotification(String message) Display a popup notification on the screen for the default duration.voiddisplayPopupNotification(String message, float duration) Display a popup notification on the screen for the given duration.voiddisplayTextObject(int id, String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, float fontSize) Add a new multi-line text in the screen with the given id, coordinates and size.doubledot3(double[] vec1, double[] vec2) Compute the dot product between the two 3D vectors.double[]eclipticToEquatorial(double[] eclInternal) Convert ecliptic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.double[]eclipticToInternalCartesian(double l, double b, double r) Convert ecliptic coordinates to the internal cartesian coordinate system.voidEnable the GUI rendering.voidEnable all input events.double[]equatorialCartesianToInternalCartesian(double[] eq, double kmFactor) Convert regular cartesian coordinates, where XY is the equatorial plane, with X pointing to the vernal equinox (ra=0) and Y points to ra=90, and Z pointing to the celestial north pole (dec=90) to internal cartesian coordinates with internal units.double[]equatorialToEcliptic(double[] eqInternal) Convert equatorial cartesian coordinates (in the internal reference system) to ecliptic cartesian coordinates.double[]equatorialToGalactic(double[] eq) Convert equatorial cartesian coordinates (in the internal reference system) to galactic cartesian coordinates.double[]equatorialToInternalCartesian(double ra, double dec, double r) Convert equatorial coordinates to the internal cartesian coordinate system.voidLog an error using the internal logging system.voidexpandGuiComponent(String name) Deprecated.UseexpandUIPane(String).voidexpandUIPane(String panelName) Expands the UI pane with the given name.voidForcefully triggers an update of the scene and the positions of all the objects.voidfovTransition(double targetFov, double duration) Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.voidfovTransition(double targetFov, double duration, String smoothType, double smoothFactor) Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.voidfovTransition(double targetFov, double duration, String smoothType, double smoothFactor, boolean sync) Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.double[]galacticToEquatorial(double[] galInternal) Convert galactic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.double[]galacticToInternalCartesian(double l, double b, double r) Convert galactic coordinates to the internal cartesian coordinate system.Get the location of the assets folder.Return the build string.doubleGet the current frame rate setting of the camcorder.double[]Get the current camera direction vector.double[]Get the current camera orientation quaternion.double[]Get the current camera position, in km.double[]getCameraPosition(String units) Get the current camera position, in the requested units.doubleGet the current physical speed of the camera in km/h.double[]Get the current camera up vector.Return the closest object to the camera in this instant as aIFocus.booleanGet the visibility of the component type described by the key.Get the absolute path to the location of the configuration directorylongGet the current frame number.Get the absolute path of the local data directory, configured in yourconfig.yamlfile.Get the absolute path of the default directory where the camera files are saved.Get the absolute path of the default directory where the still frames are saved.Get the absolute path to the location of the inputListener mappings.Get the absolute path of the default directory where the screenshots are saved.doublegetDistanceTo(String name) Return the distance to the surface of the object identified with the givenname.booleangetForceDisplayLabel(String name) Get the value of the force display label flag for the object identified with the given name.doublegetFov()Return the current camera field of view angle, in degrees.longGet the current frame number.doubleGet the current FPS setting in the frame output system.floatGet the current scale factor applied to the UI.doubleReturn the internal unit to meter conversion factor.getLineObject(String name) Get aVertsobject from the scene byname.getLineObject(String name, double timeoutSeconds) Get aVertsobject from the scene byname.Get the path to the default data directory.doubleReturn the meter to internal unit conversion factor.Get an object from the scene graph bynameor id (HIP, TYC, Gaia SourceId).Get an object bynameor id (HIP, TYC, Gaia SourceID), optionally waiting until the object is available, with a timeout.double[]getObjectPosition(String name) Get the current position of the object identified bynamein the internal coordinate system and internal units.double[]getObjectPosition(String name, String units) Get the current position of the object identified bynamein the internal coordinate system and the requested distance units.double[]Get the predicted position of the object identified bynamein the internal coordinate system and internal units.double[]getObjectPredictedPosition(String name, String units) Get the predicted position of the object identified bynamein the internal coordinate system and the requested distance units.doublegetObjectRadius(String name) Get the size of the object identified byname, in kilometres.double[]Projects the world space position of the given object to screen coordinates.booleangetObjectVisibility(String name) Get the visibility of a particular object.floatGet the current point size value in pixels.float[]getPositionAndSizeGui(String name) Return the size and position of the GUI element that goes by the given name or null if such element does not exist.longReturn the current maximum number of velocity vectors per star group.double[]getRefSysTransform(String name) Return the column-major matrix representing the given reference system transformation.doubleDeprecated.UsegetFrameOutputFps()instead.intReturn the screen height in pixels.intReturn the screen width in pixels.longReturn the current simulation time as the number of milliseconds since 1970-01-01T00:00:00Z (UTC).int[]Return the current UTC simulation time in an array.floatGet the base star opacity.floatGet the star brightness value.floatDeprecated.UsegetStarBaseOpacity()instead.double[]getStarParameters(String starId) Return the star parameters given its identifier or name, if the star exists and it is loaded.floatDeprecated.UsegetPointSize()instead.Return a string with the version number, build string, system, builder and build time.Return the version number string.voidgoToObject(String name) Runs a seamless trip to the object with the namefocusNameuntil the object view angle is20 degrees.voidgoToObject(String name, double solidAngle) Runs a seamless trip to the object with the namefocusNameuntil the object view angleviewAngleis met.voidgoToObject(String name, double solidAngle, float waitTimeSeconds) Runs a seamless trip to the object with the namefocusNameuntil the object view angleviewAngleis met.voidgoToObjectInstant(String name) Set the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.voidgoToObjectSmooth(String name, double positionDurationSeconds, double orientationDurationSeconds) Move the camera to the object identified by the given name, internally using smooth camera transition calls, likecameraTransition(double[], double[], double[], double).voidgoToObjectSmooth(String name, double positionDurationSeconds, double orientationDurationSeconds, boolean sync) Same asgoToObjectSmooth(String, double, double), but with a boolean that indicates whether the call is synchronous.voidgoToObjectSmooth(String name, double solidAngle, double positionDurationSeconds, double orientationDurationSeconds) Same asgoToObjectSmooth(String, double, double), but with the target solid angle of the object.voidgoToObjectSmooth(String name, double solidAngle, double positionDurationSeconds, double orientationDurationSeconds, boolean sync) Same asgoToObjectSmooth(String, double, double, boolean), but with the target solid angle of the object.booleanhasDataset(String dsName) Check whether the dataset identified by the given name is loadedbooleanhideDataset(String dsName) Hide the dataset identified by the given name, if it exists and is not hidden.booleanhighlightDataset(String dsName, boolean highlight) Enable or disable the dataset highlight using a plain color chosen by the system.booleanhighlightDataset(String dsName, float r, float g, float b, float a, boolean highlight) Enable or disable the dataset highlight, using a given plain color.booleanhighlightDataset(String dsName, int colorIndex, boolean highlight) Enable or disable the dataset highlight, using a plain color given by the color index: 0 - blue 1 - red 2 - yellow 3 - green 4 - pink 5 - orange 6 - purple 7 - brown 8 - magentabooleanhighlightDataset(String dsName, String attributeName, String colorMap, double minMap, double maxMap, boolean highlight) Enable or disable the dataset highlight, using the given color map on the given attribute with the given maximum and minimum mapping values.double[]internalCartesianToEquatorial(double x, double y, double z) Convert internal cartesian coordinates to equatorial[ra, dec, distance]coordinates.doubleinternalUnitsToKilometres(double internalUnits) Convert the value in internal units to Kilometers.double[]internalUnitsToKilometres(double[] internalUnits) Convert the array in internal units to Kilometers.doubleinternalUnitsToMetres(double internalUnits) Convert the value in internal units to metres.doubleinternalUnitsToParsecs(double internalUnits) Convert the value in internal units to parsecs.double[]internalUnitsToParsecs(double[] internalUnits) Convert the array in internal units to parsecs.booleanIs the frame output system on?booleanDeprecated.UseisFrameOutputActive()instead.booleanQueries whether the time is on or not.doublekilometresToInternalUnits(double kilometres) Convert the kilometres to internal units.voidlandAtObjectLocation(String name, double longitude, double latitude) Lands on the object with the givenname, if it is a planet or moon, at the location specified in by [latitude, longitude], in degrees.voidlandAtObjectLocation(String name, String locationName) Lands on the object with the givenname, if it is a planet or moon, at the location with the given name, if it exists.voidlandOnObject(String name) Lands on the object with the given name, if it is a planet or moon.Return the names of all datasets currently loaded.booleanloadDataset(String dsName, String path) Load a VOTable, FITS, CSV or JSON dataset file with the given name.booleanloadDataset(String dsName, String path, boolean sync) Load a VOTable, FITS, CSV or JSON dataset file with the given name.booleanloadDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, DatasetOptions options, boolean sync) Load a VOTable, FITS, CSV or JSON dataset file with the given name.booleanloadJsonCatalog(String dsName, String path) Load a Gaia Sky JSON dataset file asynchronously.booleanloadJsonDataset(String dsName, String path) Load a JSON Gaia Sky dataset file asynchronously.booleanloadJsonDataset(String dsName, String path, boolean sync) Load a Gaia Sky JSON dataset file in a synchronous or asynchronous manner.booleanloadJsonDataset(String dsName, String path, boolean select, boolean sync) Load a Gaia Sky JSON dataset file in a synchronous or asynchronous manner.booleanloadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] particleSizeLimits, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file.booleanloadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, boolean sync) Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file.booleanloadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file.booleanloadStarClusterDataset(String dsName, String path, double[] particleColor, double[] fadeIn, double[] fadeOut, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file.booleanloadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file.booleanloadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file.booleanloadStarClusterDataset(String dsName, String path, double[] particleColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file.booleanloadStarDataset(String dsName, String path, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file.booleanloadStarDataset(String dsName, String path, double magnitudeScale, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file.booleanloadStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file.booleanloadStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file.booleanloadVariableStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Load a variable star dataset from a VOTable, CSV or FITS file.voidPrint text using the internal logging system.voidDeprecated.The controls window is part of the old UI.doublemetresToInternalUnits(double metres) Convert the metres to internal units.voidDeprecated.The controls window is part of the old UI.voidparkCameraRunnable(String id, Runnable runnable) Parks a camera updateRunnableto the main loop thread, and keeps it running every frame until it finishes, or it is removed byremoveRunnable(String).voidparkRunnable(String id, Runnable runnable) voidparkSceneRunnable(String id, Runnable runnable) Parks an updateRunnableto the main loop thread, and keeps it running every frame until it finishes, or it is removed byremoveRunnable(String).doubleparsecsToInternalUnits(double parsecs) Convert the parsecs to internal units.voidplayCameraPath(String file) Alias forrunCameraPath(String)voidplayCameraPath(String file, boolean sync) Alias forrunCameraPath(String, boolean)voidpointAtSkyCoordinate(double ra, double dec) Set the camera in free mode and points it to the given coordinates in equatorial system.voidpostRunnable(Runnable runnable) Posts aRunnableto the main loop thread that runs once after the update-scene stage, and before the render stage.voidpreloadTexture(String path) Preload the given image as a texture for later use.voidpreloadTextures(String[] paths) Preload the given images as textures for later use.voidPrint text using the internal logging system.voidquit()Initiate the quit action to terminate the program.voidForces all orbits to refresh immediately.voidrefreshObjectOrbit(String name) Forces the refresh of the orbit of the object identified byname.voidRemove all objects.voidRemove the tracking object from the camera, if any.booleanremoveDataset(String dsName) Remove the dataset identified by the given name, if it exists.voidremoveModelObject(String name) Remove the model object identified by the given name from the internal scene graph model of Gaia Sky, if it exists.voidremoveObject(int id) Remove the item with the given id.voidRemove the current coordinates provider from the object with the given name.voidremoveObjects(int[] ids) Remove the items with the given ids.voidremoveRunnable(String id) Remove the runnable with the given id, if any.voidResets to zero the image sequence number used to generate the file names of the frame output images.voidForce a re-initialization of the entire user interface of Gaia Sky on the fly.booleanTake the settings object at the top of the settings stack and makes it effective.double[]rotate2(double[] vector, double angle) Rotate a 2D vector by the specified angle in degrees, counter-clockwise assuming that the Y axis points up.double[]rotate3(double[] vector, double[] axis, double angle) Rotate a 3D vector around the given axis by the specified angle in degrees.voidrunCameraPath(String file) Run a.gsccamera path file and returns immediately.voidrunCameraPath(String file, boolean sync) Run a.gsccamera path file and returns immediately.voidrunCameraRecording(String file) Run the camera recording file with the given path.voidTakes a screenshot of the current frame and saves it to the configured location (seeconfigureScreenshots(int, int, String, String)).voidsetAmbientLight(float value) Set the ambient light to a certain value.voidsetBackBufferScale(float scale) Set the scaling factor for the back-buffer.voidsetBloom(float value) Set the strength value for the bloom effect.voidsetBrightnessLevel(double level) Set the brightness level of the render system.voidsetCamcorderFps(double targetFps) Set the target frame rate of the camcorder.voidsetCameraCenterFocus(boolean centerFocus) Whether to look for the focus constantly when in focus mode and center it in the view or whether the view must be free.voidsetCameraDirection(double[] dir) Set the camera direction vector to the given vector, in the internal reference system.voidsetCameraDirection(double[] direction, boolean immediate) Set the camera direction vector to the given vector, in the internal reference system.voidsetCameraDirectionEquatorial(double alpha, double delta) Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in equatorial coordinates.voidsetCameraDirectionGalactic(double l, double b) Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in galactic coordinates.voidsetCameraFocus(String focusName) Set the camera in focus mode with the focus object that bears the givenfocusName.voidsetCameraFocus(String focusName, float waitTimeSeconds) Set the camera in focus mode with the focus object that bears the givenfocusName.voidsetCameraFocusInstant(String focusName) Set the camera in focus mode with the given focus object.voidsetCameraFocusInstantAndGo(String focusName) Set the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.voidSet the camera in free mode.voidsetCameraLock(boolean lock) Activates or deactivates the camera lock to the focus reference system when in focus mode.voidsetCameraOrientationLock(boolean lock) Locks or unlocks the orientation of the camera to the focus object's rotation.voidsetCameraOrientationQuaternion(double[] quaternion) Set the camera orientation to the given quaternion, given as an array of [x, y, z, w].voidsetCameraPosition(double[] position) Set the camera position to the given coordinates, in the internal reference system and kilometres.voidsetCameraPosition(double[] position, boolean immediate) Set the camera position to the given coordinates, in the internal reference system and kilometres.voidsetCameraPosition(double[] position, String units) Set the camera position to the given coordinates, in the internal reference system and the given units.voidsetCameraPosition(double[] position, String units, boolean immediate) Set the camera position to the given coordinates, in the internal reference system and in the requested units.voidsetCameraPosition(double x, double y, double z) Component-wise version ofsetCameraPosition(double[]).voidsetCameraPosition(double x, double y, double z, boolean immediate) Component-wise version ofsetCameraPosition(double[], boolean).voidsetCameraPosition(double x, double y, double z, String units) Component-wise version ofsetCameraPosition(double[], String).voidsetCameraPosition(double x, double y, double z, String units, boolean immediate) Component-wise version ofsetCameraPosition(double[], String, boolean).voidsetCameraPositionAndFocus(String focus, String other, double rotation, double solidAngle) Set the focus and instantly moves the camera to a point in the line defined byfocus-otherand rotatedrotationdegrees aroundfocususing the camera up vector as a rotation axis.voidsetCameraPostion(double[] vec) Deprecated.UsesetCameraPosition(double[])instead.voidsetCameraRecorderFps(double targetFps) Deprecated.UsesetCamcorderFps(double)instead.voidsetCameraRotationSpeed(float speed) Change the speed of the camera when it rotates around a focus.voidsetCameraSpeed(float speed) Change the speed multiplier of the camera and its acceleration.voidsetCameraSpeedLimit(int index) Set the maximum speed of the camera as an index pointing to a pre-set value.voidsetCameraState(double[] pos, double[] dir, double[] up) Set the camera state (position, direction and up vector).voidsetCameraStateAndTime(double[] pos, double[] dir, double[] up, long time) Set the camera state (position, direction and up vector) plus the current time.voidsetCameraTrackingObject(String objectName) Set the camera to track the object with the given name.voidsetCameraTurningSpeed(float speed) Change the turning speed of the camera.voidsetCameraUp(double[] up) Set the camera up vector to the given vector, in the internal reference system.voidsetCameraUp(double[] up, boolean immediate) Set the camera up vector to the given vector, in the internal reference system.voidsetChromaticAberration(float value) Set the amount of chromatic aberration.voidsetCinematicCamera(boolean cinematic) Enable or disable the cinematic camera mode.voidsetClosestCrosshairVisibility(boolean visible) Set the visibility of the closest object crosshair.voidsetComponentTypeVisibility(String key, boolean visible) Set the component described by the given name visible or invisible.voidsetContrastLevel(double level) Set the contrast level of the render system.voidsetCrosshairVisibility(boolean visible) Set the visibility of all cross-hairs.voidsetCubemapMode(boolean state, String projection) Enable and disables the cubemap mode.voidsetCubemapProjection(String projection) Set the cubemap projection to use.voidsetCubemapResolution(int resolution) Set 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.booleansetDatasetHighlightAllVisible(String dsName, boolean allVisible) Set the 'all visible' property of datasets when highlighted.booleansetDatasetHighlightSizeFactor(String dsName, float sizeFactor) Set the size increase factor of this dataset when highlighted.voidsetDatasetPointSizeMultiplier(String dsName, double multiplier) Set the dataset point size multiplier.booleansetDatasetTransformationMatrix(String dsName, double[] matrix) Set the given 4x4 matrix (in column-major order) as the transformation matrix to apply to all the data points in the dataset identified by the given name.voidsetExposureToneMappingLevel(double level) Set the exposure level.voidsetFocusCrosshairVisibility(boolean visible) Set the visibility of the focus object crosshair.voidsetForceDisplayLabel(String name, boolean forceLabel) Force the label of the object identified bynameto be displayed, ignoring the usual solid angle-based visibility rules.voidsetFov(float newFov) Change the field of view of the camera.voidsetFrameOutput(boolean active) Activates or deactivates the image output system.voidsetFrameOutputMode(String screenshotMode) Set the frame output mode.voidsetGammaCorrectionLevel(double level) Set the gamma correction level.voidsetGuiPosition(float x, float y) Deprecated.The controls window is now deprecated in favour of the new UI.voidsetGuiScrollPosition(float pixelY) Set the vertical scroll position in the GUI.voidsetHDRToneMappingType(String type) Set the high dynamic range tone mapping algorithm type.voidsetHeadlineMessage(String headline) Set a headline message that will appear in a big font in the screen.voidsetHomeCrosshairVisibility(boolean visible) Set the visibility of the home object crosshair.voidsetHueLevel(double level) Set the hue level of the render system.voidsetIndexOfRefraction(float ior) Set index of refraction of celestial sphere in orthosphere view mode.voidsetLabelColor(String name, double[] color) Set the label color of the object identified by the given name.voidsetLabelExcludeRegexp(String regexp) Set the global exclude regular expression for filtering labels.voidsetLabelIncludeRegexp(String regexp) Set the global include regular expression for filtering labels.voidsetLabelSizeFactor(float factor) Set the label size factor.voidsetLensFlare(boolean state) Enable or disable the lens flare effect.voidsetLensFlare(double strength) Set the strength of the lens flare effect, in [0,1].voidsetLimitFps(double limitFps) Limits the frame rate of Gaia Sky.voidsetLimitFps(int limitFps) Limits the frame rate of Gaia Sky.voidsetLineWidthFactor(float factor) Set the line width factor.voidsetMaximumSimulationTime(long years) Set the maximum simulation time allowed, in years.voidsetMinimapVisibility(boolean visible) Shows or hides the minimap.voidsetMotionBlur(boolean state) Enable or disable the camera motion blur effect.voidsetMotionBlur(double strength) Enable or disable the camera motion blur effect.voidsetMuteLabel(String name, boolean muteLabel) Mute the label of the object identified byname, ignoring the usual solid angle-based visibility rules.voidsetObjectCoordinatesProvider(String name, IPythonCoordinatesProvider provider) Set the coordinates provider for the object identified with the given name, if possible.voidsetObjectPosition(com.badlogic.ashley.core.Entity object, double[] position) Set the internal position of the given entity object.voidsetObjectPosition(com.badlogic.ashley.core.Entity object, double[] position, String units) Set the internal position of the given entity object.voidsetObjectPosition(FocusView object, double[] position) Set the internal position of the given entity object.voidsetObjectPosition(FocusView object, double[] position, String units) Set the internal position of the given entity object.voidsetObjectPosition(String name, double[] position) Set the internal position of the object identified byname.voidsetObjectPosition(String name, double[] position, String units) Set the internal position of the object identified byname.booleansetObjectQuaternionNlerpOrientation(String name, String file) Set the given quaternions file (CSV with times and quaternions) as the orientation provider for this object.booleansetObjectQuaternionSlerpOrientation(String name, String file) Set the given quaternions file (CSV with times and quaternions) as the orientation provider for this object.voidsetObjectSizeScaling(String name, double scalingFactor) Set the given size scaling factor to the object identified byname.booleansetObjectVisibility(String name, boolean visible) Set the visibility of a particular object.voidsetOrbitCoordinatesScaling(String name, double scalingFactor) Set the given orbit coordinates scaling factor to the AbstractOrbitCoordinates identified byname.voidsetOrbitSolidAngleThreshold(float angleDeg) Set the solid angle below which orbits fade and disappear.voidsetOrthosphereViewMode(boolean state) Enable or disable the orthosphere view mode.voidsetPanoramaMode(boolean state) Enable or disable the panorama mode.voidsetPlanetariumMode(boolean state) Enable or disable the planetarium mode.voidsetPointSize(float size) Set the base point size.voidsetProjectionFov(float fov) Same assetFov(float), but bypassing the restriction of an active projection in the replica (replicas that have an active projection do not accept fov modification events).voidsetProjectionPitch(float pitch) Set the projection pitch angle (if this is a replica instance), in degrees.voidsetProjectionRoll(float roll) Set the projection roll angle (if this is a replica instance), in degrees.voidsetProjectionYaw(float yaw) Set the projection yaw angle (if this is a replica instance), in degrees.voidsetProperMotionsArrowheads(boolean arrowheadsEnabled) Set whether to show arrowheads or not for the velocity vectors.voidsetProperMotionsColorMode(int mode) Set the color mode of proper motion vectors.voidsetProperMotionsLengthFactor(float factor) Set the length of the proper motion vectors, in [500,30000].voidsetProperMotionsMaxNumber(long maxNumber) Set the maximum number of proper motion vectors to add per star group.voidsetProperMotionsNumberFactor(float factor) Set the number factor of proper motion vectors that are visible.voidsetReprojectionMode(String mode) Set the re-projection mode.voidsetRotationCameraSpeed(float speed) Deprecated.voidsetSaturationLevel(double level) Set the saturation level of the render system.voidsetScreenshotsMode(String screenshotMode) Set the screenshot mode.voidsetSimulationPace(double pace) Deprecated.voidsetSimulationTime(int year, int month, int day, int hour, int min, int sec, int millisec) Set the time of the application to the given time, in UTC.voidsetSimulationTime(long time) Set the time of the application.voidsetSmoothLodTransitions(boolean value) Set the value of smooth lod transitions, allowing or disallowing octant fade-ins of as they come into view.voidsetStarBaseOpacity(float opacity) Set the base star opacity.voidsetStarBrightness(float brightness) Set the star brightness value.voidsetStarBrightnessPower(float power) Set the star brightness power profile value in [1.1, 0.9].voidsetStarGlow(boolean state) Deprecated.UsesetStarGlowOverObjects(boolean)instead.voidsetStarGlowFactor(float glowFactor) Set the star glow factor level value.voidsetStarGlowOverObjects(boolean state) Enable or disable stars' light glowing and spilling over closer objects.voidsetStarGroupBillboard(boolean flag) Enable or disable the rendering of close stars as billboards.voidsetStarGroupNearestNumber(int n) Set the number of nearest stars to be processed for each star group.voidsetStarMinOpacity(float opacity) Deprecated.UsesetStarBaseOpacity(float)instead.voidsetStarSize(float size) Deprecated.UsesetPointSize(float)instead.voidsetStarTextureIndex(int index) Set the star texture index, in [1, 4]voidsetStereoscopicMode(boolean state) Enable and disables the stereoscopic mode.voidsetStereoscopicProfile(int index) Change the stereoscopic profile.voidsetSubheadMessage(String subhead) Set a subhead message that will appear in a small font below the headline.voidsetTargetTime(int year, int month, int day, int hour, int min, int sec, int milliSec) Set a time bookmark in the global clock that, when reached, the clock automatically stops.voidsetTargetTime(long ms) Set a time bookmark in the global clock that, when reached, the clock automatically stops.voidsetTimeWarp(double warp) Set the simulation time warp factor.voidsetTurningCameraSpeed(float speed) Deprecated.voidsetVisibility(String key, boolean visible) Deprecated.booleanshowDataset(String dsName) Show (un-hide) the dataset identified by the given name, if it exists and is hiddenvoidsleep(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.voidsleepFrames(long frames) Sleeps for a number of frames.voidStart recording the camera path to an auto-generated file in the default camera directory.voidstartRecordingCameraPath(String fileName) Start recording a camera path with the given filename.voidStart the simulation.voidStop the current camera recording.voidStops the simulation time.voidAlias tosaveScreenshot().voidtimeTransition(int year, int month, int day, int hour, int min, int sec, int milliseconds, double durationSeconds, String smoothType, double smoothFactor, boolean sync) Create a time transition from the current time to the given time (year, month, day, hour, minute, second, millisecond).voidunparkRunnable(String id) Deprecated.voidUnsets the target time bookmark from the global clock, if any.booleanBlocks the script until the focus is the object indicated by the name.voidBlocks the execution until the Enter key is pressed.voidBlocks the execution until any kind of input (keyboard, mouse, etc.) is received.voidwaitForInput(int code) Blocks the execution until the given key or button is pressed.
-
Method Details
-
getAssetsLocation
String getAssetsLocation()Get the location of the assets folder. -
preloadTextures
Preload the given images as textures for later use. They will be cached for the subsequent uses.- Parameters:
paths- The texture paths.
-
preloadTexture
Preload the given image as a texture for later use. The texture will be cached for later use.- Parameters:
path- The path of the image file to preload.
-
activateRealTimeFrame
void activateRealTimeFrame()Set 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). -
activateSimulationTimeFrame
void activateSimulationTimeFrame()Set 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). -
displayPopupNotification
Display a popup notification on the screen for the default duration.- Parameters:
message- The message text.
-
displayPopupNotification
Display a popup notification on the screen for the given duration.- Parameters:
message- The message text.duration- The duration in seconds until the notification is removed.
-
setHeadlineMessage
Set a headline message that will appear in a big font in the screen.- Parameters:
headline- The headline text.
-
setSubheadMessage
Set a subhead message that will appear in a small font below the headline.- Parameters:
subhead- The subhead text.
-
clearHeadlineMessage
void clearHeadlineMessage()Clear the headline message. -
clearSubheadMessage
void clearSubheadMessage()Clear the subhead message. -
clearAllMessages
void clearAllMessages()Clear both the subhead and the headline messages. -
displayMessageObject
void displayMessageObject(int id, String message, float x, float y, float r, float g, float b, float a, float fontSize) Add 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.- 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
void displayMessageObject(int id, String message, double x, double y, double[] color, double fontSize) Same asdisplayImageObject(int, String, float, float, float, float, float, float)but using an array for the color instead of giving each component separately.- Parameters:
id- A unique identifier, used to identify this message when you want to remove it.message- The string message, to be displayed in one line. But explicit newline breaks the line.x- The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.y- The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.color- The color as an array of RGBA (red, green, blue, alpha) values 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.
-
displayTextObject
void displayTextObject(int id, String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, float fontSize) Add 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.- 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.
-
displayImageObject
Add 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.- 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 work directory.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.
-
displayImageObject
Add 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!- 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 work directory.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
Same asdisplayImageObject(int, String, float, float, float, float, float, float)but using a double array for the color instead of each component separately.- 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 work directory.x- The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.y- The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.color- The color as an array of RGBA (red, green, blue, alpha) values in [0,1].
-
removeAllObjects
void removeAllObjects()Remove all objects. -
removeObject
void removeObject(int id) Remove the item with the given id.- Parameters:
id- Integer with the integer id of the object to remove.
-
removeObjects
void removeObjects(int[] ids) Remove the items with the given ids. They can either be messages, images or whatever else.- Parameters:
ids- Vector with the integer ids of the objects to remove
-
disableInput
void disableInput()Disable all input events from mouse, keyboard, touchscreen, etc. -
enableInput
void enableInput()Enable all input events. -
setCinematicCamera
void setCinematicCamera(boolean cinematic) Enable or disable the cinematic camera mode.- Parameters:
cinematic- Whether to enable or disable the cinematic mode.
-
setCameraFocus
Set 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.- Parameters:
focusName- The name of the new focus object.
-
setCameraFocus
Set 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.- 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.
-
setCameraFocusInstant
Set the camera in focus mode with the given focus object. It also instantly sets the camera direction vector to point towards the focus.- Parameters:
focusName- The name of the new focus object.
-
setCameraFocusInstantAndGo
Set the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.- Parameters:
focusName- The name of the new focus object.
-
setCameraLock
void setCameraLock(boolean lock) Activates or deactivates the camera lock to the focus reference system when in focus mode.- Parameters:
lock- Activate or deactivate the lock.
-
setCameraCenterFocus
void setCameraCenterFocus(boolean centerFocus) Whether to look for the focus constantly when in focus mode and center it in the view or whether the view must be free. Use True to center the focus (default behaviour) and False to set it to a free view.- Parameters:
centerFocus- Whether to center the focus or not.
-
setCameraOrientationLock
void setCameraOrientationLock(boolean lock) Locks or unlocks the orientation of the camera to the focus object's rotation.- Parameters:
lock- Whether to lock or unlock the camera orientation to the focus.
-
setCameraFree
void setCameraFree()Set the camera in free mode. -
setCameraPostion
Deprecated.UsesetCameraPosition(double[])instead.Set the camera position to the given coordinates, in Km, equatorial system.- Parameters:
vec- Vector of three components in internal coordinates and Km.
-
setCameraPosition
void setCameraPosition(double[] position, boolean immediate) Set the camera position to the given coordinates, in the internal reference system and kilometres. Theimmediateparameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.- Parameters:
position- Vector of three components in internal coordinates and Km.immediate- Whether to apply the changes immediately, or wait for the next frame.
-
setCameraPosition
Set the camera position to the given coordinates, in the internal reference system and in the requested units. Theimmediateparameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.- Parameters:
position- Vector of three components in internal coordinates and the requested units.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".immediate- Whether to apply the changes immediately, or wait for the next frame.
-
setCameraPosition
void setCameraPosition(double x, double y, double z) Component-wise version ofsetCameraPosition(double[]). -
setCameraPosition
Component-wise version ofsetCameraPosition(double[], String). -
setCameraPosition
void setCameraPosition(double x, double y, double z, boolean immediate) Component-wise version ofsetCameraPosition(double[], boolean). -
setCameraPosition
Component-wise version ofsetCameraPosition(double[], String, boolean). -
getCameraPosition
double[] getCameraPosition()Get the current camera position, in km.- Returns:
- The camera position coordinates in the internal reference system, in km.
-
getCameraPosition
Get the current camera position, in the requested units.- Parameters:
units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".- Returns:
- The camera position coordinates in the internal reference system and in the requested units.
-
setCameraPosition
void setCameraPosition(double[] position) Set the camera position to the given coordinates, in the internal reference system and kilometres. The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, usesetCameraPosition(double[], boolean), with the boolean set totrue.- Parameters:
position- Vector of three components in internal coordinates and Km.
-
setCameraPosition
Set the camera position to the given coordinates, in the internal reference system and the given units. The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, usesetCameraPosition(double[], boolean), with the boolean set totrue.- Parameters:
position- Vector of three components in internal coordinates and the given units.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
-
setCameraDirection
void setCameraDirection(double[] direction, boolean immediate) Set the camera direction vector to the given vector, in the internal reference system. Theimmediateparameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.- Parameters:
direction- The direction vector in the internal reference system.immediate- Whether to apply the changes immediately, or wait for the next frame.
-
getCameraDirection
double[] getCameraDirection()Get the current camera direction vector.- Returns:
- The camera direction vector in the internal reference system.
-
setCameraDirection
void setCameraDirection(double[] dir) Set the camera direction vector to the given vector, in the internal reference system. You can convert from spherical coordinates usingequatorialCartesianToInternalCartesian(double[], double),galacticToInternalCartesian(double, double, double)andeclipticToInternalCartesian(double, double, double). The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, usesetCameraDirection(double[], boolean), with the boolean set totrue.- Parameters:
dir- The direction vector in equatorial cartesian coordinates.
-
setCameraDirectionEquatorial
void setCameraDirectionEquatorial(double alpha, double delta) Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in equatorial coordinates. This method sets the camera in free mode.- Parameters:
alpha- The right ascension, in decimal degrees.delta- The declination, in decimal degrees.
-
setCameraDirectionGalactic
void setCameraDirectionGalactic(double l, double b) Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in galactic coordinates. This method sets the camera in free mode.- Parameters:
l- The galactic longitude, in decimal degrees.b- The galactic latitude, in decimal degrees.
-
setCameraUp
void setCameraUp(double[] up, boolean immediate) Set the camera up vector to the given vector, in the internal reference system. Theimmediateparameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.- Parameters:
up- The up vector in equatorial coordinates.immediate- Whether to apply the changes immediately, or wait for the next frame.
-
getCameraUp
double[] getCameraUp()Get the current camera up vector.- Returns:
- The camera up vector in the internal reference system.
-
setCameraUp
void setCameraUp(double[] up) Set the camera up vector to the given vector, in the internal reference system. The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, usesetCameraUp(double[], boolean), with the boolean set totrue.- Parameters:
up- The up vector in equatorial coordinates.
-
setCameraOrientationQuaternion
void setCameraOrientationQuaternion(double[] quaternion) Set the camera orientation to the given quaternion, given as an array of [x, y, z, w].- Parameters:
quaternion- The 4-component quaternion.
-
getCameraOrientationQuaternion
double[] getCameraOrientationQuaternion()Get the current camera orientation quaternion.- Returns:
- The current camera orientation quaternion, as an array of [x, y, z, w].
-
setCameraPositionAndFocus
Set the focus and instantly moves the camera to a point in the line defined byfocus-otherand rotatedrotationdegrees aroundfocususing the camera up vector as a rotation axis.- Parameters:
focus- The name of the focus object.other- The name of the other object, to the fine a line from this to focus. Usually a light source.rotation- The rotation angle, in degrees.solidAngle- The target solid angle which determines the distance, in degrees.
-
pointAtSkyCoordinate
void pointAtSkyCoordinate(double ra, double dec) Set the camera in free mode and points it to the given coordinates in equatorial system.- Parameters:
ra- Right ascension in degrees.dec- Declination in degrees.
-
getCameraSpeed
double getCameraSpeed()Get the current physical speed of the camera in km/h.- Returns:
- The current speed of the camera in km/h.
-
setCameraSpeed
void setCameraSpeed(float speed) Change the speed multiplier of the camera and its acceleration.- Parameters:
speed- The new speed, from 0 to 100.
-
setCameraRotationSpeed
void setCameraRotationSpeed(float speed) Change the speed of the camera when it rotates around a focus.- Parameters:
speed- The new rotation speed in [0,100]
-
setRotationCameraSpeed
Deprecated.Change the speed of the camera when it rotates around a focus.- Parameters:
speed- The new rotation speed in [0,100]
-
setCameraTurningSpeed
void setCameraTurningSpeed(float speed) Change the turning speed of the camera.- Parameters:
speed- The new turning speed, from 1 to 100.
-
setTurningCameraSpeed
Deprecated.Change the turning speed of the camera.- Parameters:
speed- The new turning speed, from 1 to 100.
-
setCameraSpeedLimit
void setCameraSpeedLimit(int index) Set the maximum speed of the camera as an index pointing to a pre-set value. The index corresponds to one of the following values:- 1 Km/h
- 10 Km/h
- 100 Km/h
- 1000 Km/h
- 1 Km/s
- 10 Km/s
- 100 Km/s
- 1000 Km/s
- 0.01 c
- 0.1 c
- 0.5 c
- 0.8 c
- 0.9 c
- 0.99 c
- 0.99999 c
- 1 c
- 2 c
- 10 c
- 1e3 c
- 1 AU/s
- 10 AU/s
- 1000 AU/s
- 10000 AU/s
- 1 pc/s
- 2 pc/s
- 10 pc/s
- 1000 pc/s
- unlimited
- Parameters:
index- The index of the maximum speed setting.
-
setCameraTrackingObject
Set the camera to track the object with the given name. In this mode, the position of the camera is still dependent on the focus object (if any), but its direction points to the tracking object.- Parameters:
objectName- The name of the new tracking object.
-
removeCameraTrackingObject
void removeCameraTrackingObject()Remove the tracking object from the camera, if any. -
cameraForward
void cameraForward(double value) Add a forward movement to the camera with the given value. If value is negative the movement is backwards.- Parameters:
value- The magnitude of the movement, between -1 and 1.
-
cameraRotate
void cameraRotate(double deltaX, double deltaY) Add 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 (
setCinematicCamera(boolean), the rotation movement will not be permanent. Use the cinematic behaviour to have the camera continue to rotate around the focus.- 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.
-
cameraRoll
void cameraRoll(double roll) Add a roll force to the camera.- Parameters:
roll- The intensity of the roll.
-
cameraTurn
void cameraTurn(double deltaX, double deltaY) Add 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 (setCinematicCamera(boolean), the turn will not be permanent. Use the cinematic behaviour to have the turn persist in time.- 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.
-
cameraYaw
void cameraYaw(double amount) Add a yaw to the camera. Same ascameraTurn(double, double)with deltaY set to zero.- Parameters:
amount- The amount.
-
cameraPitch
void cameraPitch(double amount) Add a pitch to the camera. Same ascameraTurn(double, double)with deltaX set to zero.- Parameters:
amount- The amount.
-
cameraStop
void cameraStop()Stops all camera motion. -
cameraCenter
void cameraCenter()Centers the camera to the focus, removing any deviation of the line of sight. Useful to center the focus object again after turning. -
getClosestObjectToCamera
-
setFov
void setFov(float newFov) Change the field of view of the camera.- Parameters:
newFov- The new field of view value in degrees, betweenConstants.MIN_FOVandConstants.MAX_FOV.
-
getFov
double getFov()Return the current camera field of view angle, in degrees.- Returns:
- The current camera field of view angle, in degrees.
-
setCameraState
void setCameraState(double[] pos, double[] dir, double[] up) Set the camera state (position, direction and up vector).- Parameters:
pos- The position of the camera in internal units, not Km.dir- The direction of the camera.up- The up vector of the camera.
-
setCameraStateAndTime
void setCameraStateAndTime(double[] pos, double[] dir, double[] up, long time) Set the camera state (position, direction and up vector) plus the current time.- Parameters:
pos- The position of the camera in internal units, not Km.dir- The direction of the camera.up- The up vector of the camera.time- The new time of the camera as the number of milliseconds since the epoch (Jan 1, 1970).
-
setVisibility
Deprecated. -
setComponentTypeVisibility
Set the component described by the given name visible or invisible.- Parameters:
key- The key of the component: "element.stars", "element.planets", "element.moons", etc. SeeComponentTypes.ComponentType.visible- The visible value.
-
getComponentTypeVisibility
Get the visibility of the component type described by the key. Examples of keys are "element.stars", "element.planets" or "element.moons". SeeComponentTypes.ComponentType.- Parameters:
key- The key of the component type to query.- Returns:
- The visibility of the component type.
-
getObjectScreenCoordinates
Projects the world space position of the given object to screen coordinates. It's the same as GLU gluProject with one small deviation: The viewport is assumed to span the whole screen. The screen coordinate system has its origin in the bottom left, with the y-axis pointing upwards and the x-axis pointing to the right. This makes it easily usable in conjunction with Batch and similar classes.
This call only works if Gaia Sky is using the simple perspective projection mode. It does not work with any of the following modes: panorama (with any of the projections), planetarium, orthosphere, stereoscopic, or any of the re-projection modes.
- Parameters:
name- The name of the object to get the screen coordinates for.- Returns:
- An array with the x and y screen coordinates, in pixels, with the origin at the bottom-left. If the object with the given name does not exist, or it falls off-screen, it returns null.
-
setObjectVisibility
Set the visibility of a particular object. Use this method to hide individual objects. Change to the individual object visibility are not persisted on restart.- Parameters:
name- The name of the object. Must be an instance ofIVisibilitySwitch.visible- The visible status to set. Set to false in order to hide the object. True to make it visible.- Returns:
- True if the visibility was set successfully, false if there were errors.
-
getObjectVisibility
Get the visibility of a particular object.- Parameters:
name- The name of the object. Must be an instance ofIVisibilitySwitch.- Returns:
- The visibility status of the object, if it exists.
-
setObjectQuaternionSlerpOrientation
Set the given quaternions file (CSV with times and quaternions) as the orientation provider for this object. This call removes the previous orientation model from the object (either
RigidRotationorAttitudeComponent.The interpolation between quaternions is done using slerp (spherical linear interpolation).
- Parameters:
name- The name of the object. The object must already have anOrientationcomponent.file- The file path. The file is a CSV where each line has the time (ISO-8601) and the x, y, z and w components of the quaternion for that time. For instance, a valid line would be "2018-04-01T15:20:15Z,0.9237,0.3728,0.0358,0.0795".- Returns:
- True if the object was found and could be updated.
-
setObjectQuaternionNlerpOrientation
Set the given quaternions file (CSV with times and quaternions) as the orientation provider for this object. This call removes the previous orientation model from the object (either
RigidRotationorAttitudeComponent.The interpolation between quaternions is done using nlerp (normalized linear interpolation).
- Parameters:
name- The name of the object. The object must already have anOrientationcomponent.file- The file path. The file is a CSV where each line has the time (ISO-8601) and the x, y, z and w components of the quaternion for that time. For instance, a valid line would be "2018-04-01T15:20:15Z,0.9237,0.3728,0.0358,0.0795".- Returns:
- True if the object was found and could be updated.
-
setLabelSizeFactor
void setLabelSizeFactor(float factor) Set the label size factor. The label size will be multiplied by this.- Parameters:
factor- Factor inConstants.MIN_LABEL_SIZEandConstants.MAX_LABEL_SIZE.
-
setForceDisplayLabel
Force the label of the object identified bynameto be displayed, ignoring the usual solid angle-based visibility rules. If called withforce = true, the label for the given object is always rendered. Calling this method withfalsedoes not cause the label to be muted. If you want to mute the label, usesetMuteLabel(String, boolean)instead.Note: This does not override the visibility of the object itself, nor the visibility settings of the
labelscomponent type.This setting is temporary and will not persist after a restart.
- Parameters:
name- The object name.forceLabel- Whether to force the label to render for this object or not.
-
setLabelIncludeRegexp
Set the global include regular expression for filtering labels. Only labels that match this regular expression are rendered after this call. This call disables the global exclude regular expression (set withsetLabelExcludeRegexp(String)), if it is set.Java (like many other c-style languages) interprets backslashes (
'\') as escape characters. If you are calling the API programmatically (i.e. from Python), make sure to escape the backslashes in your source code; use"\\d+"instead of"\d+".You clear all label-filtering regular expressions, effectively reverting the effects of this call, with
clearLabelFilterRegexps().The include regular expression is not persisted to the settings file, and never lives longer than the current Gaia Sky instance. It is cleared after a restart.
- Parameters:
regexp- The regular expression string, in Java format. SeePatternfor more information.
-
setLabelExcludeRegexp
Set the global exclude regular expression for filtering labels. Labels that match this regular expression are not rendered after this call. This call disables the global include regular expression (set withsetLabelIncludeRegexp(String)), if it is set.Java (like many other c-style languages) interprets backslashes (
'\') as escape characters. If you are calling the API programmatically (i.e. from Python), make sure to escape the backslashes in your source code; use"\\d+"instead of"\d+".You clear all label-filtering regular expressions, effectively reverting the effects of this call, with
clearLabelFilterRegexps().The exclude regular expression is not persisted to the settings file, and never lives longer than the current Gaia Sky instance. It is cleared after a restart.
- Parameters:
regexp- The regular expression string, in Java format. SeePatternfor more information.
-
clearLabelFilterRegexps
void clearLabelFilterRegexps()Clears all label-filtering regular expressions currently in use, set withsetLabelExcludeRegexp(String)orsetLabelIncludeRegexp(String), if any.After this call, the label include and exclude regular expressions, used to filter labels in and out, are cleared.
-
setMuteLabel
Mute the label of the object identified byname, ignoring the usual solid angle-based visibility rules. If called withmute = true, the label for the given object is never rendered. Calling this method withfalsedoes not cause the label to always display. If you want to force-display the label, usesetForceDisplayLabel(String, boolean)instead.Note: This does not override the visibility of the object itself, nor the visibility settings of the
labelscomponent type.This setting is temporary and will not persist after a restart.
- Parameters:
name- The object name.muteLabel- Whether to mute the label for the object or not.
-
setLabelColor
Set the label color of the object identified by the given name. The label color must be an array of RGBA values in [0,1].- Parameters:
name- The object name.color- The label color as an array of RGBA (red, green, blue, alpha) values in [0,1].
-
getForceDisplayLabel
Get the value of the force display label flag for the object identified with the given name.- Parameters:
name- The name of the object.- Returns:
- The value of the force display label flag of the object, if it exists.
-
setLineWidthFactor
void setLineWidthFactor(float factor) Set the line width factor. The line width will be multiplied by this.- Parameters:
factor- Factor inConstants.MIN_LINE_WIDTHandConstants.MAX_LINE_WIDTH.
-
setProperMotionsNumberFactor
void setProperMotionsNumberFactor(float factor) Set the number factor of proper motion vectors that are visible. In [1,100].- Parameters:
factor- Factor in [1,100].
-
setProperMotionsLengthFactor
void setProperMotionsLengthFactor(float factor) Set the length of the proper motion vectors, in [500,30000].- Parameters:
factor- Factor in [500,30000].
-
setProperMotionsColorMode
void setProperMotionsColorMode(int mode) Set the color mode of proper motion vectors.- 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
void setProperMotionsArrowheads(boolean arrowheadsEnabled) Set whether to show arrowheads or not for the velocity vectors.- Parameters:
arrowheadsEnabled- Whether to show the velocity vectors with arrowheads.
-
getProperMotionsMaxNumber
long getProperMotionsMaxNumber()Return the current maximum number of velocity vectors per star group.- Returns:
- Max number of velocity vectors per star group.
-
setProperMotionsMaxNumber
void setProperMotionsMaxNumber(long maxNumber) Set the maximum number of proper motion vectors to add per star group.- Parameters:
maxNumber- The maximum number of proper motion vectors per star group.
-
setCrosshairVisibility
void setCrosshairVisibility(boolean visible) Set the visibility of all cross-hairs.- Parameters:
visible- The visibility state, which applies to all cross-hairs.
-
setFocusCrosshairVisibility
void setFocusCrosshairVisibility(boolean visible) Set the visibility of the focus object crosshair.- Parameters:
visible- The visibility state.
-
setClosestCrosshairVisibility
void setClosestCrosshairVisibility(boolean visible) Set the visibility of the closest object crosshair.- Parameters:
visible- The visibility state.
-
setHomeCrosshairVisibility
void setHomeCrosshairVisibility(boolean visible) Set the visibility of the home object crosshair.- Parameters:
visible- The visibility state.
-
setMinimapVisibility
void setMinimapVisibility(boolean visible) Shows or hides the minimap.- Parameters:
visible- The visibility state.
-
setAmbientLight
void setAmbientLight(float value) Set the ambient light to a certain value.- Parameters:
value- The value of the ambient light in [0,1].
-
setSimulationTime
void setSimulationTime(int year, int month, int day, int hour, int min, int sec, int millisec) Set the time of the application to the given time, in UTC.- Parameters:
year- The year to represent.month- The month-of-year to represent, from 1 (January) to 12 (December).day- The day-of-month to represent, from 1 to 31.hour- The hour-of-day to represent, from 0 to 23.min- The minute-of-hour to represent, from 0 to 59.sec- The second-of-minute to represent, from 0 to 59.millisec- The millisecond-of-second, from 0 to 999.
-
getSimulationTime
long getSimulationTime()Return the current simulation time as the number of milliseconds since 1970-01-01T00:00:00Z (UTC).- Returns:
- Number of milliseconds since the epoch (Jan 1, 1970 00:00:00 UTC).
-
setSimulationTime
void setSimulationTime(long time) Set 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.- Parameters:
time- Number of milliseconds since the epoch (Jan 1, 1970).
-
getSimulationTimeArr
int[] getSimulationTimeArr()Return the current UTC simulation time in an array.- 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
void startSimulationTime()Start the simulation. -
stopSimulationTime
void stopSimulationTime()Stops the simulation time. -
isSimulationTimeOn
boolean isSimulationTimeOn()Queries whether the time is on or not.- Returns:
- True if the time is on, false otherwise.
-
setSimulationPace
Deprecated.Deprecated, usesetTimeWarp(double)instead. -
setTimeWarp
void setTimeWarp(double warp) Set the simulation time warp factor. Positive values make time advance forward, while negative values make time run backwards. A warp factor of 1 sets a real time pace to the simulation time.- Parameters:
warp- The warp as a factor. A value of 2.0 sets the Gaia Sky time to be twice as fast as real world time.
-
setTargetTime
void setTargetTime(long ms) Set a time bookmark in the global clock that, when reached, the clock automatically stops.- Parameters:
ms- The time as the number of milliseconds since the epoch (Jan 1, 1970).
-
setTargetTime
void setTargetTime(int year, int month, int day, int hour, int min, int sec, int milliSec) Set a time bookmark in the global clock that, when reached, the clock automatically stops.- Parameters:
year- The year to represent.month- The month-of-year to represent, from 1 (January) to 12 (December).day- The day-of-month to represent, from 1 to 31.hour- The hour-of-day to represent, from 0 to 23.min- The minute-of-hour to represent, from 0 to 59.sec- The second-of-minute to represent, from 0 to 59.milliSec- The millisecond-of-second, from 0 to 999.
-
unsetTargetTime
void unsetTargetTime()Unsets the target time bookmark from the global clock, if any. -
getStarBrightness
float getStarBrightness()Get the star brightness value.- Returns:
- The brightness value, between 0 and 100.
-
setStarBrightness
void setStarBrightness(float brightness) Set the star brightness value.- Parameters:
brightness- The brightness value, between 0 and 100.
-
setStarBrightnessPower
void setStarBrightnessPower(float power) Set the star brightness power profile value in [1.1, 0.9]. Default value is 1. The power is applied to the star solid angle (from camera), before clamping, as sa = pow(sa, r).- Parameters:
power- The power value in [0, 100].
-
setStarGlowFactor
void setStarGlowFactor(float glowFactor) Set the star glow factor level value. This controls the amount of glow light when the camera is close to stars. Must be betweenConstants.MIN_STAR_GLOW_FACTORandConstants.MAX_STAR_GLOW_FACTOR. Default is 0.06.- Parameters:
glowFactor- The new glow factor value.
-
getPointSize
float getPointSize()Get the current point size value in pixels.- Returns:
- The size value, in pixels.
-
getStarSize
Deprecated.UsegetPointSize()instead.Get the current star size value in pixels.- Returns:
- The size value, in pixels.
-
setPointSize
void setPointSize(float size) Set the base point size.- Parameters:
size- The size value, betweenConstants.MIN_STAR_POINT_SIZEandConstants.MAX_STAR_POINT_SIZE.
-
setStarSize
Deprecated.UsesetPointSize(float)instead.Set the size of the rasterized stars, in pixels.- Parameters:
size- The size value in pixels, betweenConstants.MIN_STAR_POINT_SIZEandConstants.MAX_STAR_POINT_SIZE.
-
getStarBaseOpacity
float getStarBaseOpacity()Get the base star opacity.- Returns:
- The base opacity value.
-
getStarMinOpacity
Deprecated.UsegetStarBaseOpacity()instead.Get the minimum star opacity.- Returns:
- The minimum opacity value.
-
setStarBaseOpacity
void setStarBaseOpacity(float opacity) Set the base star opacity.- Parameters:
opacity- The base opacity value, betweenConstants.MIN_STAR_MIN_OPACITYandConstants.MAX_STAR_MIN_OPACITY.
-
setStarMinOpacity
Deprecated.UsesetStarBaseOpacity(float)instead.Set the minimum star opacity.- Parameters:
opacity- The minimum opacity value, betweenConstants.MIN_STAR_MIN_OPACITYandConstants.MAX_STAR_MIN_OPACITY.
-
setStarTextureIndex
void setStarTextureIndex(int index) Set the star texture index, in [1, 4]1 - horizontal spike 2 - god rays 3 - horizontal and vertical spikes 4 - simple radial profile
- Parameters:
index- The new star texture index
-
setStarGroupNearestNumber
void setStarGroupNearestNumber(int n) Set the number of nearest stars to be processed for each star group. This will limit the number of stars that are rendered with billboards, labels and velocity vectors.- Parameters:
n- The new number of nearest stars
-
setStarGroupBillboard
void setStarGroupBillboard(boolean flag) Enable or disable the rendering of close stars as billboards.- Parameters:
flag- The state flag
-
setOrbitSolidAngleThreshold
void setOrbitSolidAngleThreshold(float angleDeg) Set the solid angle below which orbits fade and disappear.- Parameters:
angleDeg- The threshold angle in degrees
-
setProjectionYaw
void setProjectionYaw(float yaw) Set the projection yaw angle (if this is a replica instance), in degrees. The yaw angle turns the camera to the right. This function is intended for multi-projector setups, to configure replicas without restarting Gaia Sky.- Parameters:
yaw- The yaw angle in degrees.
-
setProjectionPitch
void setProjectionPitch(float pitch) Set the projection pitch angle (if this is a replica instance), in degrees. The pitch angle turns the camera up. This function is intended for multi-projector setups, to configure replicas without restarting Gaia Sky.- Parameters:
pitch- The pitch angle in degrees.
-
setProjectionRoll
void setProjectionRoll(float roll) Set the projection roll angle (if this is a replica instance), in degrees. The roll angle rolls the camera clockwise. This function is intended for multi-projector setups, to configure replicas without restarting Gaia Sky.- Parameters:
roll- The roll angle in degrees.
-
setProjectionFov
void setProjectionFov(float fov) Same assetFov(float), but bypassing the restriction of an active projection in the replica (replicas that have an active projection do not accept fov modification events).- Parameters:
fov- The field of view angle.
-
setLimitFps
void setLimitFps(double limitFps) Limits the frame rate of Gaia Sky.- Parameters:
limitFps- The new maximum frame rate as a double-precision floating point number. Set zero or negative to unlimited.
-
setLimitFps
void setLimitFps(int limitFps) Limits the frame rate of Gaia Sky.- Parameters:
limitFps- The new maximum frame rate as an integer number. Set zero or negative to unlimited.
-
configureScreenshots
Configures the screenshot system, setting the resolution of the images, the output directory and the image name prefix.- Parameters:
width- Width of images.height- Height of images.directory- The output directory path.namePrefix- The file name prefix.
-
setScreenshotsMode
Set the screenshot mode. Possible values are 'simple' and 'advanced'. The 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. The advanced mode redraws the last frame using the resolution configured usingconfigureScreenshots(int, int, String, String)and it does not draw the UI.- Parameters:
screenshotMode- The screenshot mode. 'simple' or 'advanced'.
-
saveScreenshot
void saveScreenshot()Takes a screenshot of the current frame and saves it to the configured location (seeconfigureScreenshots(int, int, String, String)). -
takeScreenshot
void takeScreenshot()Alias tosaveScreenshot(). -
configureRenderOutput
@Deprecated void configureRenderOutput(int width, int height, int fps, String directory, String namePrefix) Deprecated.UseconfigureFrameOutput(int, int, int, String, String)instead.Configures the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix.- Parameters:
width- Width of images.height- Height of images.fps- Target frames per second (number of images per second).directory- The output directory path.namePrefix- The file name prefix.
-
configureFrameOutput
Configures the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix. This function sets the frame output mode to 'advanced'.- Parameters:
width- Width of images.height- Height of images.fps- Target frames per second (number of images per second).directory- The output directory path.namePrefix- The file name prefix.
-
configureFrameOutput
Configures the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix. This function sets the frame output mode to 'advanced'.- Parameters:
width- Width of images.height- Height of images.fps- Target frames per second (number of images per second).directory- The output directory path.namePrefix- The file name prefix.
-
setFrameOutputMode
Set the frame output mode. Possible values are 'simple' and 'advanced'. The 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. The advanced mode redraws the last frame using the resolution configured usingconfigureFrameOutput(int, int, int, String, String)and it does not draw the UI.- Parameters:
screenshotMode- The screenshot mode. 'simple' or 'advanced'.
-
isRenderOutputActive
Deprecated.UseisFrameOutputActive()instead.Is the frame output system on?- Returns:
- True if the frame output is active.
-
isFrameOutputActive
boolean isFrameOutputActive()Is the frame output system on?- Returns:
- True if the render output is active.
-
getRenderOutputFps
Deprecated.UsegetFrameOutputFps()instead.Get the current FPS setting in the frame output system.- Returns:
- The FPS setting.
-
getFrameOutputFps
double getFrameOutputFps()Get the current FPS setting in the frame output system.- Returns:
- The FPS setting.
-
setFrameOutput
void setFrameOutput(boolean active) Activates or deactivates the image output system. If called with true, the system starts outputting images right away.- Parameters:
active- Whether to activate or deactivate the frame output system.
-
getObject
-
getObject
Get an object bynameor id (HIP, TYC, Gaia SourceID), optionally waiting until the object is available, with a timeout.- Parameters:
name- The name or id (HIP, TYC, Gaia SourceId) of the object.timeoutSeconds- The timeout in seconds to wait until returning. If negative, it waits indefinitely.- Returns:
- The object if it exists, or null if it does not and block is false, or if block is true and the timeout has passed.
-
getLineObject
-
getLineObject
-
setObjectSizeScaling
Set 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.
- Parameters:
name- The name or id of the object.scalingFactor- The scaling factor to scale the size of that object.
-
setOrbitCoordinatesScaling
Set the given orbit coordinates scaling factor to the AbstractOrbitCoordinates identified byname. SeeAbstractOrbitCoordinatesand its subclasses.Also, use this with caution, as scaling coordinates may have unintended side effects, and remember to set the scaling back to 1.0 at the end of your script. Additionally, use either
refreshAllOrbits()orrefreshObjectOrbit(String)right after this call in order to immediately refresh the scaled orbits.- Parameters:
name- The name of the coordinates object (OrbitLintCoordinates, EclipticCoordinates, SaturnVSOP87, UranusVSOP87, EarthVSOP87, MercuryVSOP87, ..., PlutoCoordinates, HeliotropicOribtCoordinates, MoonAACoordinates). Optionally, you can append ':objectName' to select a single object. For instance, both Gaia and JWST have heliotropic orbit coordinates. To only select the Gaia orbit provider, use "HeliotropicOrbitCoordinates:Gaia".scalingFactor- The scaling factor.
-
refreshObjectOrbit
Forces the refresh of the orbit of the object identified byname. This should generally be called after a call tosetOrbitCoordinatesScaling(String, double). -
refreshAllOrbits
void refreshAllOrbits()Forces all orbits to refresh immediately. -
forceUpdateScene
void forceUpdateScene()Forcefully triggers an update of the scene and the positions of all the objects. Useful to call after operations that modify the position of objects. -
getObjectRadius
Get the size of the object identified byname, in kilometres.- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.- Returns:
- The radius of the object in kilometres. If the object identified by name or id (HIP, TYC, sourceId) does not exist, it returns a negative value.
-
goToObject
Runs a seamless trip to the object with the name
focusNameuntil the object view angle is20 degrees.Warning: This method is not deterministic. It is implemented as a loop that sends 'camera forward' events to the main thread, running in a separate thread. If you need total synchronization and reproducibility, look into the
parkRunnable(String, Runnable)family of calls.- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.
-
goToObject
Runs a seamless trip to the object with the namefocusNameuntil the object view angleviewAngleis met. If angle is negative, the default angle is20 degrees.Warning: This method is not deterministic. It is implemented as a loop that sends 'camera forward' events to the main thread, running in a separate thread. If you need total synchronization and reproducibility, look into the
parkRunnable(String, Runnable)family of calls.- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.solidAngle- The target solid angle of the object, in degrees. The angle gets larger and larger as we approach the object.
-
goToObject
Runs a seamless trip to the object with the namefocusNameuntil the object view angleviewAngleis met. If angle is negative, the default angle is20 degrees. IfwaitTimeSecondsis 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 velocityof the camera. SeesetTurningCameraSpeed(float).Warning: This method is not deterministic. It is implemented as a loop that sends 'camera forward' events to the main thread, running in a separate thread. If you need total synchronization and reproducibility, look into the
parkRunnable(String, Runnable)family of calls.- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.solidAngle- The target solid 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.
-
goToObjectInstant
Set the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.- Parameters:
name- The name of the new focus object.
-
goToObjectSmooth
void goToObjectSmooth(String name, double positionDurationSeconds, double orientationDurationSeconds) Move the camera to the object identified by the given name, internally using smooth camera transition calls, likecameraTransition(double[], double[], double[], double). The target position and orientation are computed first during the call execution and are not subsequently updated. This means that the camera does not follow the object if it moves. If time is activated, and the object moves, this call does not go to the object's current position at the end, but at the beginning.- Parameters:
name- The name of the object to go to.positionDurationSeconds- The duration of the transition in position, in seconds.orientationDurationSeconds- The duration of the transition in orientation, in seconds.
-
goToObjectSmooth
void goToObjectSmooth(String name, double solidAngle, double positionDurationSeconds, double orientationDurationSeconds) Same asgoToObjectSmooth(String, double, double), but with the target solid angle of the object.- Parameters:
name- The name of the object to go to.solidAngle- The target solid angle of the object, in degrees. This is used to compute the final distance to the object. The angle gets larger and larger as we approach the object.positionDurationSeconds- The duration of the transition in position, in seconds.orientationDurationSeconds- The duration of the transition in orientation, in seconds.
-
goToObjectSmooth
void goToObjectSmooth(String name, double positionDurationSeconds, double orientationDurationSeconds, boolean sync) Same asgoToObjectSmooth(String, double, double), but with a boolean that indicates whether the call is synchronous.- Parameters:
name- The name of the object to go to.positionDurationSeconds- The duration of the transition in position, in seconds.orientationDurationSeconds- The duration of the transition in orientation, in seconds.sync- If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
-
goToObjectSmooth
void goToObjectSmooth(String name, double solidAngle, double positionDurationSeconds, double orientationDurationSeconds, boolean sync) Same asgoToObjectSmooth(String, double, double, boolean), but with the target solid angle of the object.- Parameters:
name- The name of the object to go to.solidAngle- The target solid angle of the object, in degrees. This is used to compute the final distance to the object. The angle gets larger and larger as we approach the object.positionDurationSeconds- The duration of the transition in position, in seconds.orientationDurationSeconds- The duration of the transition in orientation, in seconds.sync- If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
-
landOnObject
Lands on the object with the given name, if it is a planet or moon. The land location is determined by the line of sight from the current position of the camera to the object.- Parameters:
name- The proper name of the object.
-
landAtObjectLocation
-
landAtObjectLocation
Lands on the object with the givenname, if it is a planet or moon, at the location specified in by [latitude, longitude], in degrees.- Parameters:
name- The proper name of the object.longitude- The location longitude, in degrees.latitude- The location latitude, in degrees.
-
getDistanceTo
Return 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.- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.- Returns:
- The distance to the object in km if it exists, a negative value otherwise.
-
getStarParameters
Return the star parameters given its identifier or name, if the star exists and it is loaded.- Parameters:
starId- The star identifier or name.- Returns:
- An array with (ra [deg], dec [deg], parallax [mas], pmra [mas/yr], pmdec [mas/yr], radvel [km/s], appmag [mag], red [0,1], green [0,1], blue [0,1]) if the star exists and is loaded, null otherwise.
-
getObjectPosition
Get the current position of the object identified bynamein the internal coordinate system and internal units. If the object does not exist, it returns null.- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.- Returns:
- A 3-vector with the object's position in internal units and the internal reference system.
-
getObjectPosition
Get the current position of the object identified bynamein the internal coordinate system and the requested distance units. If the object does not exist, it returns null.- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".- Returns:
- A 3-vector with the object's position in the requested units and internal reference system.
-
getObjectPredictedPosition
Get the predicted position of the object identified bynamein the internal coordinate system and internal units. If the object does not exist, it returns null. The predicted position is the position of the object in the next update cycle, and may be useful to compute the camera state.- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.- Returns:
- A 3-vector with the object's predicted position in the internal reference system.
-
getObjectPredictedPosition
Get the predicted position of the object identified bynamein the internal coordinate system and the requested distance units. If the object does not exist, it returns null. The predicted position is the position of the object in the next update cycle, and may be useful to compute the camera state.- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".- Returns:
- A 3-vector with the object's predicted position in the requested units and in the internal reference system.
-
setObjectPosition
Set the internal position of the object identified byname. Note that depending on the object type, the position may be already calculated and set elsewhere in the update stage, so use with care.- Parameters:
name- The name of the object.position- The position in the internal reference system and internal units.
-
setObjectPosition
Set the internal position of the object identified byname. Note that depending on the object type, the position may be already calculated and set elsewhere in the update stage, so use with care.- Parameters:
name- The name of the object.position- The position in the internal reference system and the given units.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
-
setObjectPosition
Set the internal position of the given entity object. Note that depending on the object type, the position may be already calculated and set elsewhere in the update stage, so use with care.- Parameters:
object- The object in a focus view wrapper.position- The position in the internal reference system and internal units.
-
setObjectPosition
Set the internal position of the given entity object. Note that depending on the object type, the position may be already calculated and set elsewhere in the update stage, so use with care.- Parameters:
object- The object in a focus view wrapper.position- The position in the internal reference system and the given units.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
-
setObjectPosition
void setObjectPosition(com.badlogic.ashley.core.Entity object, double[] position) Set the internal position of the given entity object. Note that depending on the object type, the position may be already calculated and set elsewhere in the update stage, so use with care.- Parameters:
object- The object entity.position- The position in the internal reference system and internal units.
-
setObjectPosition
Set the internal position of the given entity object. Note that depending on the object type, the position may be already calculated and set elsewhere in the update stage, so use with care.- Parameters:
object- The object entity.position- The position in the internal reference system and the given units.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
-
setObjectCoordinatesProvider
Set the coordinates provider for the object identified with the given name, if possible. The provider object must implementIPythonCoordinatesProvider, and in particular the methodIPythonCoordinatesProvider.getEquatorialCartesianCoordinates(Object, Object), which takes in a julian date and outputs the object coordinates in the internal cartesian system.- Parameters:
name- The name of the object.provider- The coordinate provider instance.
-
removeObjectCoordinatesProvider
Remove the current coordinates provider from the object with the given name. This method must be called before shutting down the gateway if the coordinates provider has been previously set for the given object from Python withsetObjectCoordinatesProvider(String, IPythonCoordinatesProvider). Otherwise, Gaia Sky will crash due to the missing connection to Python.- Parameters:
name- The name of the object for which to remove the coordinate provider.
-
addTrajectoryLine
Add a new trajectory object with the given name, points and color. The trajectory is rendered using the 'line renderer' setting in the preferences dialog. This is a very similar call toaddPolyline(String, double[], double[]), but in this case the line can be rendered with higher quality polyline quadstrips.- Parameters:
name- The name to identify the trajectory, to possibly remove it later.points- The points of the trajectory. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn] in the internal reference system.color- The color of the trajectory as an array of RGBA (red, green, blue, alpha) values in [0,1].
-
addTrajectoryLine
Add a new trajectory object with the given name, points and color. The trajectory is rendered using the 'line renderer' setting in the preferences' dialog. This is a very similar call toaddPolyline(String, double[], double[]), but in this case the line can be rendered with higher quality polyline quadstrips.- Parameters:
name- The name to identify the trajectory, to possibly remove it later.points- The points of the trajectory. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn] in the internal reference system.color- The color of the trajectory as an array of RGBA (red, green, blue, alpha) values in [0,1].trailMap- The bottom mapping position for the trail. The orbit trail assigns an opacity value to each point of the orbit, where 1 is the location of the last point in the points list, and 0 is the first one. This mapping parameter defines the location in the orbit (in [0,1]) where we map the opacity value of 0. Set to 0 to have a full trail. Set to 0.5 to have a trail that spans half the orbit. Set to 1 to have no orbit at all. Set to negative to disable the trail.
-
addPolyline
Add a new polyline with the given name, points and color. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. The default primitive of GL_LINE_STRIP is used.- 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] in the internal reference system.color- The color of the polyline as an array of RGBA (red, green, blue, alpha) values in [0,1].
-
addPolyline
Add a new polyline with the given name, points, color and line width. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. The default primitive type of GL_LINE_STRIP is used.- Parameters:
name- The name to identify the polyline, to possibly remove it later.points- The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].color- The color of the polyline as an array of RGBA (red, green, blue, alpha) values in [0,1].lineWidth- The line width. Usually a value between 1 (default) and 10.
-
addPolyline
Add a new polyline with the given name, points, color and line width. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. The default primitive type of GL_LINE_STRIP is used. This version enables the addition of arrow caps. In the case arrow caps are enabled, the line will be rendered in CPU mode (no VBO), making it slightly slower, especially for lines with many points. The arrow cap is added at the first point in the series.- Parameters:
name- The name to identify the polyline, to possibly remove it later.points- The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].color- The color of the polyline as an array of RGBA (red, green, blue, alpha) values in [0,1].lineWidth- The line width. Usually a value between 1 (default) and 10.arrowCaps- Whether to represent arrow caps. If enabled, the line is rendered in CPU mode, which is slower.
-
addPolyline
Add a new polyline with the given name, points, color, line width and primitive. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it.- Parameters:
name- The name to identify the polyline, to possibly remove it later.points- The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].color- The color of the polyline as an array of RGBA (red, green, blue, alpha) values in [0,1].lineWidth- The line width. Usually a value between 1 (default) and 10.primitive- The GL primitive:GL_LINES=1,GL_LINE_LOOP=2,GL_LINE_STRIP=3
-
addPolyline
void addPolyline(String name, double[] points, double[] color, double lineWidth, int primitive, boolean arrowCaps) Add a new polyline with the given name, points, color, line width, primitive and arrow caps. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. This version enables the addition of arrow caps. In the case arrow caps are enabled, the line will be rendered in CPU mode (no VBO), making it slightly slower, especially for lines with many points. The arrow cap is added at the first point in the series.- Parameters:
name- The name to identify the polyline, to possibly remove it later.points- The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].color- The color of the polyline as an array of RGBA (red, green, blue, alpha) values in [0,1].lineWidth- The line width. Usually a value between 1 (default) and 10.primitive- The GL primitive:GL_LINES=1,GL_LINE_LOOP=2,GL_LINE_STRIP=3arrowCaps- Whether to represent arrow caps. If enabled, the line is rendered in CPU mode, which is slower.
-
removeModelObject
Remove 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.
- Parameters:
name- The name of the object to remove.
-
setGuiScrollPosition
void setGuiScrollPosition(float pixelY) Set the vertical scroll position in the GUI.- Parameters:
pixelY- The pixel to set the scroll position to.
-
enableGui
void enableGui()Enable the GUI rendering. This makes the user interface to be rendered and updated again if it was previously disabled. Otherwise, it has no effect. -
disableGui
void disableGui()Disables the GUI rendering. This causes the user interface to no longer be rendered or updated. -
getGuiScaleFactor
float getGuiScaleFactor()Get the current scale factor applied to the UI.- Returns:
- The scale factor.
-
maximizeInterfaceWindow
Deprecated.The controls window is part of the old UI. UseexpandUIPane(String)instead.Maximizes the interface window. -
minimizeInterfaceWindow
Deprecated.The controls window is part of the old UI. UsecollapseUIPane(String)instead.Minimizes the interface window. -
expandUIPane
Expands the UI pane with the given name. Possible names are:- Time
- Camera
- Visibility
- VisualSettings
- Datasets
- Bookmarks
- LocationLog
Please, mind the case!
-
expandGuiComponent
Deprecated.UseexpandUIPane(String). -
collapseUIPane
Collapses the UI pane with the given name. Possible names are:- Time
- Camera
- Visibility
- VisualSettings
- Datasets
- Bookmarks
- LocationLog
Please, mind the case!
-
collapseGuiComponent
Deprecated. -
setGuiPosition
Deprecated.The controls window is now deprecated in favour of the new UI.Moves the interface window to a new position.- 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.
-
waitForInput
void waitForInput()Blocks the execution until any kind of input (keyboard, mouse, etc.) is received. -
waitForEnter
void waitForEnter()Blocks the execution until the Enter key is pressed. -
waitForInput
void waitForInput(int code) Blocks the execution until the given key or button is pressed.- Parameters:
code- The key or button code. Please seeInput.
-
getScreenWidth
int getScreenWidth()Return the screen width in pixels.- Returns:
- The screen width in pixels.
-
getScreenHeight
int getScreenHeight()Return the screen height in pixels.- Returns:
- The screen height in pixels.
-
getPositionAndSizeGui
Return 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.- 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.
-
getVersion
String getVersion()Return a string with the version number, build string, system, builder and build time.- Returns:
- A string with the full version information.
-
getVersionNumber
-
getBuildString
-
waitFocus
Blocks the script until the focus is the object indicated by the name. There is an optional time out.- Parameters:
name- The name of the focus to wait for.timeoutMs- Timeout in ms to wait. Set negative to disable timeout.- Returns:
- True if the timeout ran out. False otherwise.
-
setCamcorderFps
void setCamcorderFps(double targetFps) Set the target frame rate of the camcorder. This artificially sets the frame rate (the frame time) of Gaia Sky to this value while the camera is recording and playing. Make sure to use the right FPS setting during playback!- Parameters:
targetFps- The target frame rate for the camcorder.
-
setCameraRecorderFps
Deprecated.UsesetCamcorderFps(double)instead. -
getCamcorderFps
double getCamcorderFps()Get the current frame rate setting of the camcorder.- Returns:
- The FPS setting of the camcorder.
-
startRecordingCameraPath
void startRecordingCameraPath()Start recording the camera path to an auto-generated file in the default camera directory. This command has no effect if the camera is already being recorded. -
startRecordingCameraPath
Start recording a camera path with the given filename. The filename is without extension or path. The final path with the camera file, after invokingstopRecordingCameraPath(), is:
getDefaultCameraDir()+ "/" + filename + ".gsc"
This command has no effect if the camera is already being recorded. -
stopRecordingCameraPath
void stopRecordingCameraPath()Stop the current camera recording. This command has no effect if the camera was not being recorded. -
runCameraRecording
Run the camera recording file with the given path. Does not wait for the camera file to finish playing.- Parameters:
file- The path of the camera file. Path is relative to the application's root directory or absolute.
-
runCameraPath
Run a.gsccamera path file and returns immediately. This function does not wait for the camera file to finish playing.- Parameters:
file- The path to the camera file. Path is relative to the application's root directory or absolute.
-
playCameraPath
Alias forrunCameraPath(String) -
runCameraPath
Run a.gsccamera path file and returns immediately. This function accepts a boolean indicating whether to wait for the camera path file to finish or not.- Parameters:
file- The path to the camera file. Path is relative to the application's root directory or absolute.sync- If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
-
playCameraPath
Alias forrunCameraPath(String, boolean) -
cameraTransition
void cameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds) Create 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 afterward if you need to. Also, this only works with the natural camera.
- 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
void cameraTransition(double[] camPos, String units, double[] camDir, double[] camUp, double seconds) Create 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 afterward if you need to. Also, this only works with the natural camera.
- Parameters:
camPos- The target camera position in the internal reference system and the given distance units.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".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.
-
cameraTransitionKm
void cameraTransitionKm(double[] camPos, double[] camDir, double[] camUp, double seconds) Same ascameraTransition(double[], double[], double[], double)but the camera position is given in Km.- Parameters:
camPos- The target camera position in Km.camDir- The target camera direction vector.camUp- The target camera up vector.seconds- The duration of the transition in seconds.
-
cameraTransition
void cameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds, boolean sync) Create 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 afterward if you need to. Also, this only works with the natural camera.
- 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
void cameraTransition(double[] camPos, String units, double[] camDir, double[] camUp, double seconds, boolean sync) Create 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 afterward if you need to. Also, this only works with the natural camera.
- Parameters:
camPos- The target camera position in the internal reference system and the given distance units.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".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
void cameraTransition(double[] camPos, double[] camDir, double[] camUp, double positionDurationSeconds, String positionSmoothType, double positionSmoothFactor, double orientationDurationSeconds, String orientationSmoothType, double orientationSmoothFactor) Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.
This function accepts smoothing types and factors for the position and orientation.
This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.
- Parameters:
camPos- The target camera position in the internal reference system and the given distance units.camDir- The target camera direction in the internal reference system.camUp- The target camera up in the internal reference system.positionDurationSeconds- The duration of the transition in position, in seconds.positionSmoothType- The function type to use for the smoothing of positions. Either "logit", "logisticsigmoid" or "none".- "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
- "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
- "none": no smoothing is applied.
positionSmoothFactor- Smooth factor for the positions (depends on type).orientationDurationSeconds- The duration of the transition in orientation, in seconds.orientationSmoothType- The function type to use for the smoothing of orientations. Either "logit", "logisticsigmoid" or "none".- "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
- "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
- "none": no smoothing is applied.
orientationSmoothFactor- Smooth factor for the orientations (depends on type).
-
cameraTransition
void cameraTransition(double[] camPos, String units, double[] camDir, double[] camUp, double positionDurationSeconds, String positionSmoothType, double positionSmoothFactor, double orientationDurationSeconds, String orientationSmoothType, double orientationSmoothFactor, boolean sync) Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.
This function accepts smoothing types and factors for the position and orientation.
Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).
This function puts the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.
- Parameters:
camPos- The target camera position in the internal reference system and the given distance units.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".camDir- The target camera direction in the internal reference system.camUp- The target camera up in the internal reference system.positionDurationSeconds- The duration of the transition in position, in seconds.positionSmoothType- The function type to use for the smoothing of positions. Either "logit", "logisticsigmoid" or "none".- "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
- "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
- "none": no smoothing is applied.
positionSmoothFactor- Smooth factor for the positions (depends on type).orientationDurationSeconds- The duration of the transition in orientation, in seconds.orientationSmoothType- The function type to use for the smoothing of orientations. Either "logit", "logisticsigmoid" or "none".- "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
- "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
- "none": no smoothing is applied.
orientationSmoothFactor- Smooth factor for the orientations (depends on type).sync- If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
-
cameraPositionTransition
void cameraPositionTransition(double[] camPos, String units, double durationSeconds, String smoothType, double smoothFactor, boolean sync) Create a smooth transition from the current camera position to the given camera position in the given number of seconds.
This function accepts smoothing type and factor.
Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).
This function puts the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.
- Parameters:
camPos- The target camera position in the internal reference system and the given distance units.units- The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".durationSeconds- The duration of the transition in position, in seconds.smoothType- The function type to use for the smoothing of positions. Either "logit", "logisticsigmoid" or "none".- "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
- "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
- "none": no smoothing is applied.
smoothFactor- Smooth factor for the positions (depends on type).sync- If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
-
cameraOrientationTransition
void cameraOrientationTransition(double[] camDir, double[] camUp, double durationSeconds, String smoothType, double smoothFactor, boolean sync) Create a smooth transition from the current camera orientation to the given camera orientation {camDir, camUp} in the given number of seconds.
This function accepts smoothing type and factor.
Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).
This function puts the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.
- Parameters:
camDir- The target camera direction in the internal reference system.camUp- The target camera up in the internal reference system.durationSeconds- The duration of the transition in orientation, in seconds.smoothType- The function type to use for the smoothing of orientations. Either "logit", "logisticsigmoid" or "none".- "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
- "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
- "none": no smoothing is applied.
smoothFactor- Smooth factor for the orientations (depends on type).sync- If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
-
timeTransition
void timeTransition(int year, int month, int day, int hour, int min, int sec, int milliseconds, double durationSeconds, String smoothType, double smoothFactor, boolean sync) Create a time transition from the current time to the given time (year, month, day, hour, minute, second, millisecond). The time is given in UTC.- Parameters:
year- The year to represent.month- The month-of-year to represent, from 1 (January) to 12 (December).day- The day-of-month to represent, from 1 to 31.hour- The hour-of-day to represent, from 0 to 23.min- The minute-of-hour to represent, from 0 to 59.sec- The second-of-minute to represent, from 0 to 59.milliseconds- The millisecond-of-second, from 0 to 999.durationSeconds- The duration of the transition, in seconds.smoothType- The function type to use for smoothing. Either "logit", "logisticsigmoid" or "none".- "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
- "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
- "none": no smoothing is applied.
smoothFactor- Smoothing factor (depends on type, see #smoothType).sync- If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
-
fovTransition
void fovTransition(double targetFov, double duration) Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.This call is synchronous, i.e., returns only after the transition has finished.
- Parameters:
targetFov- The target FOV angle.duration- The duration of the transition, in seconds.
-
fovTransition
Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.This function accepts smoothing type and factor.
This call is synchronous, i.e., returns only after the transition has finished.
- Parameters:
targetFov- The target FOV angle.duration- The duration of the transition, in seconds.smoothType- The function type to use for the smoothing. Either"logit","logisticsigmoid"or"none"."logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used."logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01."none": no smoothing is applied.
smoothFactor- Smoothing factor (depends on type). This is ignored ifsmoothTypeis"none".
-
fovTransition
void fovTransition(double targetFov, double duration, String smoothType, double smoothFactor, boolean sync) Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.This function accepts smoothing type and factor.
Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).
- Parameters:
targetFov- The target FOV angle.duration- The duration of the transition, in seconds.smoothType- The function type to use for the smoothing. Either"logit","logisticsigmoid"or"none"."logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used."logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01."none": no smoothing is applied.
smoothFactor- Smoothing factor (depends on type). This is ignored ifsmoothTypeis"none".sync- If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
-
sleep
void 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.- Parameters:
seconds- The number of seconds to wait.
-
sleepFrames
void sleepFrames(long frames) Sleeps for a number of frames. The frame monitor is notified at the beginning of each frame, before the update-render cycle. When frames is 1, this method returns just before the processing of the next frame starts.- Parameters:
frames- The number of frames to wait.
-
galacticToInternalCartesian
double[] galacticToInternalCartesian(double l, double b, double r) Convert galactic coordinates to the internal cartesian coordinate system.- 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
double[] eclipticToInternalCartesian(double l, double b, double r) Convert ecliptic coordinates to the internal cartesian coordinate system.- 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
double[] equatorialToInternalCartesian(double ra, double dec, double r) Convert equatorial coordinates to the internal cartesian coordinate system.- 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
double[] internalCartesianToEquatorial(double x, double y, double z) Convert internal cartesian coordinates to equatorial[ra, dec, distance]coordinates.- 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]withraanddecin degrees anddistancein the same distance units as the input position.
-
equatorialCartesianToInternalCartesian
double[] equatorialCartesianToInternalCartesian(double[] eq, double kmFactor) Convert regular cartesian coordinates, where XY is the equatorial plane, with X pointing to the vernal equinox (ra=0) and Y points to ra=90, and Z pointing to the celestial north pole (dec=90) to internal cartesian coordinates with internal units.- Parameters:
eq- Equatorial cartesian coordinates (X->[ra=0,dec=0], Y->[ra=90,dec=0], Z->[ra=0,dec=90])kmFactor- Factor used to bring the input coordinate units to Kilometers, so thateq * factor = Km- Returns:
- Internal coordinates ready to be fed in other scripting functions
-
equatorialToGalactic
double[] equatorialToGalactic(double[] eq) Convert equatorial cartesian coordinates (in the internal reference system) to galactic cartesian coordinates.- Parameters:
eq- Vector with [x, y, z] equatorial cartesian coordinates- Returns:
- Vector with [x, y, z] galactic cartesian coordinates
-
equatorialToEcliptic
double[] equatorialToEcliptic(double[] eqInternal) Convert equatorial cartesian coordinates (in the internal reference system) to ecliptic cartesian coordinates.- Parameters:
eqInternal- Vector with [x, y, z] equatorial cartesian coordinates- Returns:
- Vector with [x, y, z] ecliptic cartesian coordinates
-
galacticToEquatorial
double[] galacticToEquatorial(double[] galInternal) Convert galactic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.- Parameters:
galInternal- Vector with [x, y, z] galactic cartesian coordinates- Returns:
- Vector with [x, y, z] equatorial cartesian coordinates
-
eclipticToEquatorial
double[] eclipticToEquatorial(double[] eclInternal) Convert ecliptic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.- Parameters:
eclInternal- Vector with [x, y, z] ecliptic cartesian coordinates- Returns:
- Vector with [x, y, z] equatorial cartesian coordinates
-
setBrightnessLevel
void setBrightnessLevel(double level) Set the brightness level of the render system.- Parameters:
level- The brightness level as a double precision floating point number in [-1,1]. The neutral value is 0.0.
-
setContrastLevel
void setContrastLevel(double level) Set the contrast level of the render system.- Parameters:
level- The contrast level as a double precision floating point number in [0,2]. The neutral value is 1.0.
-
setHueLevel
void setHueLevel(double level) Set the hue level of the render system.- Parameters:
level- The hue level as a double precision floating point number in [0,2]. The neutral value is 1.0.
-
setSaturationLevel
void setSaturationLevel(double level) Set the saturation level of the render system.- Parameters:
level- The saturation level as a double precision floating point number in [0,2]. The neutral value is 1.0.
-
setGammaCorrectionLevel
void setGammaCorrectionLevel(double level) Set the gamma correction level.- Parameters:
level- The gamma correction level in [0,3] as a floating point number. The neutral value is 1.2.
-
setHDRToneMappingType
Set 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
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
- Parameters:
type- The HDR tone mapping type. One of ["auto"|"exposure"|"aces"|"uncharted"|"filmic"|"none"].
-
setExposureToneMappingLevel
void setExposureToneMappingLevel(double level) Set the exposure level.- Parameters:
level- The exposure level in [0,n]. Set to 0 to disable exposure tone mapping.
-
setPlanetariumMode
void setPlanetariumMode(boolean state) Enable or disable the planetarium mode.- Parameters:
state- The boolean state. True to activate, false to deactivate.
-
setCubemapMode
Enable and disables the cubemap mode.- Parameters:
state- The boolean state. True to activate, false to deactivate.projection- The projection as a string.
-
setPanoramaMode
void setPanoramaMode(boolean state) Enable or disable the panorama mode.- Parameters:
state- The boolean state. True to activate, false to deactivate.
-
setCubemapResolution
void setCubemapResolution(int resolution) Set 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).- Parameters:
resolution- The resolution of each of the sides of the cubemap for the 360 mode.
-
setCubemapProjection
Set the cubemap projection to use. Accepted values are:- "equirectangular" - spherical projection.
- "cylindrical" - cylindrical projection.
- "hammer" - Hammer projection.
- "orthographic" - orthographic projection, with the two hemispheres side-by-side.
- "orthosphere" - orthographic projection, with the two hemispheres overlaid. That gives an outside view of the camera's celestial sphere.
- "orthosphere_crosseye" - same as orthosphere, but duplicated to produce a stereoscopic cross-eye image (side by side).
- "azimuthal_equidistant" - azimuthal equidistant projection, used in Planetarium mode.
CubmeapProjectionEffectfor possible values.- Parameters:
projection- The projection, in ["equirectangular"|"cylindrical"|"hammer"|"orthographic"|"orthosphere"|"orthosphere_crossye"|"azimuthal_equidistant"].
-
setOrthosphereViewMode
void setOrthosphereViewMode(boolean state) Enable or disable the orthosphere view mode.- Parameters:
state- The state, true to activate and false to deactivate.
-
setIndexOfRefraction
void setIndexOfRefraction(float ior) Set index of refraction of celestial sphere in orthosphere view mode.- Parameters:
ior- The index of refraction.
-
setStereoscopicMode
void setStereoscopicMode(boolean state) Enable and disables the stereoscopic mode.- Parameters:
state- The boolean state. True to activate, false to deactivate.
-
setStereoscopicProfile
void setStereoscopicProfile(int index) Change the stereoscopic profile.- Parameters:
index- The index of the new profile:- 0 - VR_HEADSET
- 1 - HD_3DTV
- 2 - CROSSEYE
- 3 - PARALLEL_VIEW
- 4 - ANAGLYPHIC (red-cyan)
-
setReprojectionMode
Set the re-projection mode. Possible modes are:- "disabled"
- "default"
- "accurate"
- "stereographic_screen"
- "stereographic_long"
- "stereographic_short"
- "stereographic_180"
- "lambert_screen"
- "lambert_long"
- "lambert_short"
- "lambert_180"
- "orthographic_screen"
- "orthographic_long"
- "orthographic_short"
- "orthographic_180"
- Parameters:
mode- The re-projection mode, as a string.
-
setBackBufferScale
void setBackBufferScale(float scale) Set the scaling factor for the back-buffer.- Parameters:
scale- The back-buffer scaling factor.
-
getCurrentFrameNumber
long getCurrentFrameNumber()Get the current frame number. Useful for timing actions in scripts.- Returns:
- The current frame number.
-
setLensFlare
void setLensFlare(boolean state) Enable or disable the lens flare effect.- Parameters:
state- Activate (true) or deactivate (false).
-
setLensFlare
void setLensFlare(double strength) Set the strength of the lens flare effect, in [0,1]. Set to 0 to disable the effect.- Parameters:
strength- The strength or intensity of the lens flare, in [0,1].
-
setMotionBlur
void setMotionBlur(boolean state) Enable or disable the camera motion blur effect.- Parameters:
state- Activate (true) or deactivate (false).
-
setMotionBlur
void setMotionBlur(double strength) Enable or disable the camera motion blur effect.- Parameters:
strength- The strength of camera the motion blur effect, in [Constants.MOTIONBLUR_MIN,Constants.MOTIONBLUR_MAX].
-
setStarGlow
Deprecated.UsesetStarGlowOverObjects(boolean)instead.Enable or disable the stars glowing over objects.- Parameters:
state- Activate (true) or deactivate (false).
-
setStarGlowOverObjects
void setStarGlowOverObjects(boolean state) Enable or disable stars' light glowing and spilling over closer objects.- Parameters:
state- Enable (true) or disable (false).
-
setBloom
void setBloom(float value) Set the strength value for the bloom effect.- Parameters:
value- Bloom strength between 0 and 100. Set to 0 to deactivate the bloom.
-
setChromaticAberration
void setChromaticAberration(float value) Set the amount of chromatic aberration. Set to 0 to disable the effect.- Parameters:
value- Chromatic aberration amount in [0,0.05].
-
setSmoothLodTransitions
void setSmoothLodTransitions(boolean value) Set the value of smooth lod transitions, allowing or disallowing octant fade-ins of as they come into view.- Parameters:
value- Activate (true) or deactivate (false).
-
resetImageSequenceNumber
void resetImageSequenceNumber()Resets to zero the image sequence number used to generate the file names of the frame output images. -
getDefaultFramesDir
String getDefaultFramesDir()Get the absolute path of the default directory where the still frames are saved.- Returns:
- Absolute path of directory where still frames are saved.
-
getDefaultScreenshotsDir
String getDefaultScreenshotsDir()Get the absolute path of the default directory where the screenshots are saved.- Returns:
- Absolute path of directory where screenshots are saved.
-
getDefaultCameraDir
String getDefaultCameraDir()Get the absolute path of the default directory where the camera files are saved.- Returns:
- Absolute path of directory where camera files are saved.
-
getDefaultMappingsDir
String getDefaultMappingsDir()Get the absolute path to the location of the inputListener mappings.- Returns:
- Absolute path to the location of the inputListener mappings.
-
getDataDir
String getDataDir()Get the absolute path of the local data directory, configured in yourconfig.yamlfile.- Returns:
- Absolute path to the location of the data files.
-
getConfigDir
String getConfigDir()Get the absolute path to the location of the configuration directory- Returns:
- Absolute path of config directory.
-
getLocalDataDir
String getLocalDataDir()Get the path to the default data directory. That is~/.gaiasky/in Windows and macOS, and~/.local/share/gaiaskyin Linux.- Returns:
- Absolute path of data directory.
-
postRunnable
-
parkRunnable
-
parkSceneRunnable
Parks an update
Runnableto the main loop thread, and keeps it running every frame until it finishes, or it is removed byremoveRunnable(String). This object runs after the update-scene stage and before the render stage, so it is intended for updating scene objects.Be careful with this function, as it probably needs a cleanup before the script is finished. Otherwise, all parked runnables will keep running until Gaia Sky is restarted, so make sure to remove them with
removeRunnable(String)if needed.- Parameters:
id- The string id to identify the runnable.runnable- The scene update runnable to park.
-
parkCameraRunnable
Parks a camera update
Runnableto the main loop thread, and keeps it running every frame until it finishes, or it is removed byremoveRunnable(String). This object runs after the update-camera stage and before the update-scene, so it is intended for updating the camera only.Be careful with this function, as it probably needs a cleanup before the script is finished. Otherwise, all parked runnables will keep running until Gaia Sky is restarted, so make sure to remove them with
removeRunnable(String)if needed.- Parameters:
id- The string id to identify the runnable.runnable- The camera update runnable to park.
-
removeRunnable
Remove the runnable with the given id, if any. Use this method to remove previously parked scene and camera runnables.- Parameters:
id- The id of the runnable to remove.
-
unparkRunnable
Deprecated.Remove the runnable with the given id, if any.- Parameters:
id- The id of the runnable to remove.
-
loadDataset
Load a VOTable, FITS, CSV or JSON dataset file with the 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.- Parameters:
dsName- The name of the dataset, used to identify the subsequent operations on the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile to load.- Returns:
- False if the dataset could not be loaded, true otherwise.
-
loadDataset
Load a VOTable, FITS, CSV or JSON dataset file with the given name. The call can be made synchronous or asynchronous.
Ifsyncis true, the call acts exactly likeloadDataset(String, String).
Ifsyncis false, the loading happens in a new thread and the call returns immediately. In this case, you can usehasDataset(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.- Parameters:
dsName- The name of the dataset, used to identify the subsequent operations on the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the file to load.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadDataset
boolean loadDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, DatasetOptions options, boolean sync) Load a VOTable, FITS, CSV or JSON dataset file with the given name. The call can be made synchronous or asynchronous.
Ifsyncis true, the call acts exactly likeloadDataset(String, String, boolean).
Ifsyncis false, the loading happens in a new thread and the call returns immediately. In this case, you can usehasDataset(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. This version includes the catalog info type.- Parameters:
dsName- The name of the dataset, used to identify the subsequent operations on the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the file to load.type- TheCatalogInfo.CatalogInfoSourceobject to use as the dataset type.options- TheDatasetOptionsobject holding the options for this dataset.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadStarDataset
Load a star dataset from a VOTable, a CSV or a FITS file. The dataset does not have a label. The call can be made synchronous or asynchronous.
Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadStarDataset
Load a star dataset from a VOTable, a CSV or a FITS file. The dataset does not have a label. The call can be made synchronous or asynchronous.
Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.magnitudeScale- Scaling additive factor to apply to the star magnitudes, as inappmag = appmag - magnitudeScale.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadStarDataset
boolean loadStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.magnitudeScale- Scaling additive factor to apply to the star magnitudes, as inappmag = appmag - magnitudeScale.labelColor- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadStarDataset
boolean loadStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Load a star dataset from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.magnitudeScale- Scaling additive factor to apply to the star magnitudes, as inappmag = appmag - magnitudeScale.labelColor- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].fadeIn- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeOut- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadParticleDataset
boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, boolean sync) Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.profileDecay- The profile decay of the particles as in 1 - distCentre^decay.particleColor- The base color of the particles, as an array of RGBA (red, green, blue, alpha) values in [0,1].colorNoise- In [0,1], the noise to apply to the color so that each particle gets a slightly different tone. Set to 0 so that all particles get the same color.labelColor- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].particleSize- The size of the particles in pixels.ct- The name of the component type to use like "Stars", "Galaxies", etc. (seeComponentTypes.ComponentType).sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadParticleDataset
boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.profileDecay- The profile decay of the particles as in 1 - distCentre^decay.particleColor- The base color of the particles, as an array of RGBA (red, green, blue, alpha) values in [0,1].colorNoise- In [0,1], the noise to apply to the color so that each particle gets a slightly different tone. Set to 0 so that all particles get the same color.labelColor- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].particleSize- The size of the particles in pixels.ct- The name of the component type to use like "Stars", "Galaxies", etc. (seeComponentTypes.ComponentType).fadeIn- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeOut- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadParticleDataset
boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] particleSizeLimits, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Load a particle dataset (point cloud) from a VOTable, a CSV or a FITS file. The call can be made synchronous or asynchronous.
Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.profileDecay- The profile decay of the particles as in 1 - distCentre^decay.particleColor- The base color of the particles, as an array of RGBA (red, green, blue, alpha) values in [0,1].colorNoise- In [0,1], the noise to apply to the color so that each particle gets a slightly different tone. Set to 0 so that all particles get the same color.labelColor- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].particleSize- The size of the particles in pixels.particleSizeLimits- The minimum and maximum size of the particles in pixels.ct- The name of the component type to use like "Stars", "Galaxies", etc. (seeComponentTypes.ComponentType).fadeIn- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeOut- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadStarClusterDataset
boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, double[] fadeIn, double[] fadeOut, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. Uses the same color for clusters and labels. The call can be made synchronous or asynchronous. Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.particleColor- The base color of the particles and labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].fadeIn- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeOut- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadStarClusterDataset
boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. The call can be made synchronous or asynchronous. Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.particleColor- The base color of the particles, as an array of RGBA (red, green, blue, alpha) values in [0,1].labelColor- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].fadeIn- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeOut- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadStarClusterDataset
boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. Uses the same color for clusters and labels. The call can be made synchronous or asynchronous. Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.particleColor- The base color of the particles and labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].ct- The name of the component type to use (seeComponentTypes.ComponentType).fadeIn- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeOut- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadStarClusterDataset
boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Load a star cluster dataset from a CSV, VOTable or FITS file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. The call can be made synchronous or asynchronous. Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.particleColor- The base color of the particles and labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].labelColor- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].ct- The name of the component type to use (seeComponentTypes.ComponentType).fadeIn- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeOut- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadVariableStarDataset
boolean loadVariableStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Load a variable star dataset from a VOTable, CSV or FITS file. The variable star table must have the following columns representing the light curve:g_transit_time: list of times as Julian days since J2010 for each of the magnitudesg_transit_mag: list of magnitudes corresponding to the times ing_transit_timespf: the period in days
Ifsyncis true, the call waits until the dataset is loaded and then returns. Ifsyncis false, the loading happens in a new thread and the call returns immediately. It includes some parameters to apply to the new star group.- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.vot,.csvor.fitsfile to load.magnitudeScale- Scaling additive factor to apply to the magnitudes in the light curve, as inappmag = appmag - magnitudeScale.labelColor- The color of the labels, as an array of RGBA (red, green, blue, alpha) values in [0,1].fadeIn- Two values which represent the fade in mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.fadeOut- Two values which represent the fade out mapping distances (in parsecs, as distance from camera to the Sun) of this dataset. Set to null to disable.sync- Whether the load must happen synchronously or asynchronously.- Returns:
- False if the dataset could not be loaded (sync mode). True if it could not be loaded (sync mode), or
syncis false.
-
loadJsonCatalog
Load a Gaia Sky JSON dataset file asynchronously. The call returns immediately, and the dataset becomes available when it finished loading. The Gaia Sky JSON data format is described here.- Parameters:
dsName- The name of the dataset.path- The absolute path, or the path in the data directory, of the dataset file.- Returns:
- False if the dataset could not be loaded. True otherwise.
-
loadJsonDataset
Load a JSON Gaia Sky dataset file asynchronously. The call returns immediately, and the dataset becomes available when it finished loading. The Gaia Sky JSON data format is described here.- Parameters:
dsName- The name of the dataset.path- The absolute path, or the path in the data directory, of the dataset file.- Returns:
- False if the dataset could not be loaded. True otherwise.
-
loadJsonDataset
Load a Gaia Sky JSON dataset file in a synchronous or asynchronous manner. The Gaia Sky JSON data format is described here.- Parameters:
dsName- The name of the dataset.path- The absolute path, or the path in the data directory, of the dataset file.sync- If true, the call does not return until the dataset is loaded and available in Gaia Sky.- Returns:
- False if the dataset could not be loaded. True otherwise.
-
loadJsonDataset
Load a Gaia Sky JSON dataset file in a synchronous or asynchronous manner. The Gaia Sky JSON data format is described here.- Parameters:
dsName- The name of the dataset.path- The absolute path, or the path in the data directory, of the dataset file.select- If true, focus the first object in the dataset after loading.sync- If true, the call does not return until the dataset is loaded and available in Gaia Sky.- Returns:
- False if the dataset could not be loaded. True otherwise.
-
removeDataset
Remove the dataset identified by the given name, if it exists.- Parameters:
dsName- The name of the dataset to remove.- Returns:
- False if the dataset could not be found.
-
hideDataset
Hide the dataset identified by the given name, if it exists and is not hidden.- Parameters:
dsName- The name of the dataset to hide.- Returns:
- False if the dataset could not be found.
-
listDatasets
-
hasDataset
Check whether the dataset identified by the given name is loaded- Parameters:
dsName- The name of the dataset to query.- Returns:
- True if the dataset is loaded, false otherwise.
-
showDataset
Show (un-hide) the dataset identified by the given name, if it exists and is hidden- Parameters:
dsName- The name of the dataset to show.- Returns:
- False if the dataset could not be found.
-
setDatasetTransformationMatrix
Set the given 4x4 matrix (in column-major order) as the transformation matrix to apply to all the data points in the dataset identified by the given name.- Parameters:
dsName- The name of the dataset.matrix- The 16 values of the 4x4 transformation matrix in column-major order.- Returns:
- True if the dataset was found and the transformation matrix could be applied. False otherwise.
-
clearDatasetTransformationMatrix
Clear the transformation matrix (if any) in the dataset identified by the given name.- Parameters:
dsName- The name of the dataset.- Returns:
- True if the dataset was found and the transformations cleared.
-
highlightDataset
Enable or disable the dataset highlight, using a plain color given by the color index:- 0 - blue
- 1 - red
- 2 - yellow
- 3 - green
- 4 - pink
- 5 - orange
- 6 - purple
- 7 - brown
- 8 - magenta
- Parameters:
dsName- The dataset name.colorIndex- Color index in [0,8].highlight- Whether to highlight or not.- Returns:
- False if the dataset could not be found.
-
highlightDataset
Enable or disable the dataset highlight using a plain color chosen by the system.- Parameters:
dsName- The dataset name.highlight- State.- Returns:
- False if the dataset could not be found.
-
highlightDataset
Enable or disable the dataset highlight, using a given plain color.- Parameters:
dsName- The dataset name.r- Red component.highlight- State.- Returns:
- False if the dataset could not be found.
-
highlightDataset
boolean highlightDataset(String dsName, String attributeName, String colorMap, double minMap, double maxMap, boolean highlight) Enable or disable the dataset highlight, using the given color map on the given attribute with the given maximum and minimum mapping values.- Parameters:
dsName- The dataset name.attributeName- The attribute name. You can use basic attributes (please mind the case!):- RA
- DEC
- Distance
- GalLatitude
- GalLongitude
- EclLatitude
- EclLongitude
- Mualpha
- Mudelta
- Radvel
- Absmag
- Appmag
colorMap- The color map to use, in ["reds"|"greens"|"blues"|"rainbow18"|"rainbow"|"seismic"|"carnation"|"hotmeal"|"cool"].minMap- The minimum mapping value.maxMap- The maximum mapping value.highlight- State.- Returns:
- False if the dataset could not be found.
-
setDatasetHighlightSizeFactor
Set the size increase factor of this dataset when highlighted.- Parameters:
dsName- The dataset name.sizeFactor- The size factor to apply to the particles when highlighted, must be in [Constants.MIN_DATASET_SIZE_FACTOR,Constants.MAX_DATASET_SIZE_FACTOR].- Returns:
- False if the dataset could not be found.
-
setDatasetHighlightAllVisible
Set the 'all visible' property of datasets when highlighted. If set to true, all stars in the dataset have an increased minimum opacity when highlighted, so that they are all visible. Otherwise, stars retain their minimum opacity and base brightness.- Parameters:
dsName- The dataset name.allVisible- Whether all stars in the dataset should be visible when highlighted or not.- Returns:
- False if the dataset could not be found.
-
setDatasetPointSizeMultiplier
Set the dataset point size multiplier.- Parameters:
dsName- The dataset name.multiplier- The multiplier, as a positive floating point number.
-
addShapeAroundObject
void addShapeAroundObject(String shapeName, String shape, String primitive, double size, String objectName, float r, float g, float b, float a, boolean showLabel, boolean trackObject) Create a shape object of the given type with the given size around the object with the given name and primitive.- Parameters:
shapeName- The name of the shape object.shape- The shape type, one of- sphere
- icosphere
- octahedronsphere
- ring
- cylinder
- cone
primitive- The primitive to use, one of- lines
- triangles
size- The size of the object in kilometers.objectName- The name of the object to use as the position.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].showLabel- Whether to show a label with the name of the shape.trackObject- Whether to track the object if/when it moves.
-
addShapeAroundObject
void addShapeAroundObject(String shapeName, String shape, String primitive, String orientation, double size, String objectName, float r, float g, float b, float a, boolean showLabel, boolean trackObject) Create a shape object of the given type with the given size around the object with the given name, primitive and orientation.- Parameters:
shapeName- The name of the shape object.shape- The shape type, one of- sphere
- icosphere
- octahedronsphere
- ring
- cylinder
- cone
primitive- The primitive to use, one of- lines
- triangles
orientation- The orientation to use, one of- camera
- equatorial
- ecliptic
- galactic
size- The size of the object in kilometers.objectName- The name of the object to use as the position.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].showLabel- Whether to show a label with the name of the shape.trackObject- Whether to track the object if/when it moves.
-
backupSettings
void backupSettings()Create a backup of the current settings state that can be restored later on. The settings are backed up in a stack, so multiple calls to this method put different copies of the settings on the stack in a LIFO fashion.
This method, together with
restoreSettings(), are useful to back up and restore the settings at the beginning and end of your scripts, respectively, and ensure that the user settings are left unmodified after your script ends. -
restoreSettings
boolean restoreSettings()Take the settings object at the top of the settings stack and makes it effective.
This method, together with
backupSettings(), are useful to back up and restore the settings at the beginning and end of your scripts, respectively, and ensure that the user settings are left unmodified after your script ends.WARN: This function applies all settings immediately, and the user interface may be re-initialized. Be aware that the UI may be set to its default state after this call.
- Returns:
- True if the stack was not empty and the settings were restored successfully. False otherwise.
-
clearSettingsStack
void clearSettingsStack()Clear the stack of settings objects. This will invalidate all previous calls tobackupSettings(), effectively making the settings stack empty. CallingrestoreSettings()after this method will return false. -
resetUserInterface
void resetUserInterface()Force a re-initialization of the entire user interface of Gaia Sky on the fly. -
setMaximumSimulationTime
void setMaximumSimulationTime(long years) Set the maximum simulation time allowed, in years. This sets the maximum time in the future (years) and in the past (-years). This setting is not saved to the configuration and resets to 5 Myr after restart.- Parameters:
years- The maximum year number to allow.
-
getRefSysTransform
Return the column-major matrix representing the given reference system transformation.- Parameters:
name-The name of the reference system transformation:
- 'equatorialtoecliptic', 'eqtoecl'
- 'ecliptictoequatorial', 'ecltoeq'
- 'galactictoequatorial', 'galtoeq'
- 'equatorialtogalactic', 'eqtogal'
- 'ecliptictogalactic', 'ecltogal
- 'galactictoecliptic', 'galtoecl
- Returns:
- The transformation matrix in column-major order.
-
getMeterToInternalUnitConversion
double getMeterToInternalUnitConversion()Return the meter to internal unit conversion factor. Use this factor to multiply your coordinates in meters to get them in internal units.- Returns:
- The factor M_TO_U.
-
getInternalUnitToMeterConversion
double getInternalUnitToMeterConversion()Return the internal unit to meter conversion factor. Use this factor to multiply your coordinates in internal units to get them in meters.- Returns:
- The factor U_TO_M.
-
internalUnitsToMetres
double internalUnitsToMetres(double internalUnits) Convert the value in internal units to metres.- Parameters:
internalUnits- The value in internal units.- Returns:
- The value in metres.
-
internalUnitsToKilometres
double internalUnitsToKilometres(double internalUnits) Convert the value in internal units to Kilometers.- Parameters:
internalUnits- The value in internal units.- Returns:
- The value in Kilometers.
-
internalUnitsToKilometres
double[] internalUnitsToKilometres(double[] internalUnits) Convert the array in internal units to Kilometers.- Parameters:
internalUnits- The array in internal units.- Returns:
- The array in Kilometers.
-
internalUnitsToParsecs
double internalUnitsToParsecs(double internalUnits) Convert the value in internal units to parsecs.- Parameters:
internalUnits- The value in internal units.- Returns:
- The value in parsecs.
-
internalUnitsToParsecs
double[] internalUnitsToParsecs(double[] internalUnits) Convert the array in internal units to parsecs.- Parameters:
internalUnits- The array in internal units.- Returns:
- The array in parsecs.
-
metresToInternalUnits
double metresToInternalUnits(double metres) Convert the metres to internal units.- Parameters:
metres- The value in metres.- Returns:
- The value in internal units.
-
kilometresToInternalUnits
double kilometresToInternalUnits(double kilometres) Convert the kilometres to internal units.- Parameters:
kilometres- The value in kilometers.- Returns:
- The value in internal units.
-
parsecsToInternalUnits
double parsecsToInternalUnits(double parsecs) Convert the parsecs to internal units.- Parameters:
parsecs- The value in parsecs.- Returns:
- The value in internal units.
-
getFrameNumber
long getFrameNumber()Get the current frame number. The number begins at 0 for the first frame produced when Gaia Sky is started and increases continuously.- Returns:
- The current frame number.
-
rotate3
double[] rotate3(double[] vector, double[] axis, double angle) Rotate 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.- Parameters:
vector- Vector to rotate, with at least 3 components.axis- The axis, with at least 3 components.angle- Angle in degrees.- Returns:
- The new vector, rotated.
-
rotate2
double[] rotate2(double[] vector, double angle) Rotate a 2D vector by the specified angle in degrees, counter-clockwise assuming that the Y axis points up.- Parameters:
vector- Vector to rotate, with at least 2 components.- Returns:
- The new vector, rotated.
-
cross3
double[] cross3(double[] vec1, double[] vec2) Compute the cross product between the two 3D vectors.- Parameters:
vec1- First 3D vector.vec2- Second 3D vector.- Returns:
- Cross product 3D vector.
-
dot3
double dot3(double[] vec1, double[] vec2) Compute the dot product between the two 3D vectors.- Parameters:
vec1- First 3D vector.vec2- Second 3D vector.- Returns:
- The dot product scalar.
-
print
Print text using the internal logging system.- Parameters:
message- The message.
-
log
Print text using the internal logging system.- Parameters:
message- The message.
-
error
Log an error using the internal logging system.- Parameters:
message- The error message.
-
quit
void quit()Initiate the quit action to terminate the program.
-
collapseUIPane(String).