Class EventScriptingInterface
- All Implemented Interfaces:
IObserver,IScriptingInterface
-
Constructor Summary
ConstructorsConstructorDescriptionEventScriptingInterface(com.badlogic.gdx.assets.AssetManager manager, CatalogManager catalogManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the current time frame to real time.voidSets the current time frame to simulation time.com.badlogic.ashley.core.EntityaddLineObject(String name, double[] points, double[] color, double lineWidth, int primitive, boolean arrowCaps, double trailMap, String archetypeName) com.badlogic.ashley.core.EntityaddLineObject(String name, List<?> points, List<?> color, double lineWidth, int primitive, boolean arrowCaps, double trailMap, String archetypeName) voidaddPolyline(String name, double[] points, double[] color) Adds a new polyline with the given name, points and color.voidaddPolyline(String name, double[] points, double[] color, double lineWidth) Adds a new polyline with the given name, points, color and line width.voidaddPolyline(String name, double[] points, double[] color, double lineWidth, boolean arrowCaps) Adds a new polyline with the given name, points, color and line width.voidaddPolyline(String name, double[] points, double[] color, double lineWidth, int primitive) Adds 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) Adds a new polyline with the given name, points, color, line width, primitive and arrow caps.voidaddPolyline(String name, double[] points, double[] color, int lineWidth) voidaddPolyline(String name, double[] points, double[] color, int lineWidth, int primitive) voidaddPolyline(String name, List<?> points, List<?> color) voidaddPolyline(String name, List<?> points, List<?> color, float lineWidth) voidaddPolyline(String name, List<?> points, List<?> color, float lineWidth, boolean arrowCaps) voidaddPolyline(String name, List<?> points, List<?> color, float lineWidth, int primitive) voidaddPolyline(String name, List<?> points, List<?> color, float lineWidth, int primitive, boolean arrowCaps) voidaddPolyline(String name, List<?> points, List<?> color, int lineWidth) voidaddPolyline(String name, List<?> points, List<?> color, int lineWidth, boolean arrowCaps) voidaddPolyline(String name, List<?> points, List<?> color, int lineWidth, int primitive) voidaddPolyline(String name, List<?> points, List<?> color, int lineWidth, int primitive, boolean arrowCaps) voidaddShapeAroundObject(String shapeName, String shapeType, String primitive, double size, String objectName, float r, float g, float b, float a, boolean showLabel, boolean trackObject) Creates a shape object of the given type with the given size around the object with the given name.voidaddTrajectoryLine(String name, double[] points, double[] color) Adds a new trajectory object with the given name, points and color.voidaddTrajectoryLine(String name, double[] points, double[] color, double trailMap) Adds a new trajectory object with the given name, points and color.voidaddTrajectoryLine(String name, List<?> points, List<?> color) voidaddTrajectoryLine(String name, List<?> points, List<?> color, double trailMap) voidCenters the camera to the focus, removing any deviation of the line of sight.voidcameraForward(double cameraForward) Adds a forward movement to the camera with the given value.voidcameraForward(long value) voidcameraPitch(double amount) Adds a pitch to the camera.voidcameraPitch(long amount) voidcameraRoll(double roll) Adds a roll force to the camera.voidcameraRoll(long roll) voidcameraRotate(double deltaX, double deltaY) Adds a rotation movement to the camera around the current focus, or a pitch/yaw if in free mode.voidcameraRotate(double deltaX, long deltaY) voidcameraRotate(long deltaX, double deltaY) voidStops all camera motion.voidcameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds) Creates a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.voidcameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds, boolean sync) Creates a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds.voidcameraTransition(double[] camPos, double[] camDir, double[] camUp, long seconds) voidcameraTransition(List<?> camPos, List<?> camDir, List<?> camUp, double seconds) voidcameraTransition(List<?> camPos, List<?> camDir, List<?> camUp, double seconds, boolean sync) voidcameraTransition(List<?> camPos, List<?> camDir, List<?> camUp, long seconds) voidcameraTransition(List<?> camPos, List<?> camDir, List<?> camUp, long seconds, boolean sync) voidcameraTransitionKm(double[] camPos, double[] camDir, double[] camUp, double seconds) Same asIScriptingInterface.cameraTransition(double[], double[], double[], double)but the camera position is given in Km.voidcameraTransitionKm(List<?> camPos, List<?> camDir, List<?> camUp, double seconds) voidcameraTransitionKm(List<?> camPos, List<?> camDir, List<?> camUp, long seconds) voidcameraTurn(double deltaX, double deltaY) Adds a turn force to the camera (yaw and/or pitch).voidcameraTurn(double deltaX, long deltaY) voidcameraTurn(long deltaX, double deltaY) voidcameraTurn(long deltaX, long deltaY) voidcameraYaw(double amount) Adds a yaw to the camera.voidcameraYaw(long amount) voidClears both the subhead and the headline messages.voidClears the headline messge.voidClears the subhead message.voidcollapseGuiComponent(String name) Collapses the component 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) Configures the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix.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) Computes the cross product between the two 3D vectors.double[]voidDisables the GUI rendering.voidDisables all input events from mouse, keyboard, touchscreen, etc.voiddisplayImageObject(int id, String path, double x, double y, double[] color) Same asIScriptingInterface.displayImageObject(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, double x, double y, List<?> color) voiddisplayImageObject(int id, String path, float x, float y) Adds 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) Adds a new image object at the given coordinates.voiddisplayMessageObject(int id, String message, double x, double y, double[] color, double fontSize) Same asIScriptingInterface.displayImageObject(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, double x, double y, List<?> color, double fontSize) voiddisplayMessageObject(int id, String message, float x, float y, float r, float g, float b, float a, float fontSize) Adds a new one-line message in the screen with the given id and the given coordinates.voiddisplayMessageObject(int id, String message, float x, float y, float r, float g, float b, float a, int fontSize) voiddisplayPopupNotification(String message) Displays a popup notification on the screen for the default duration.voiddisplayPopupNotification(String message, float duration) Displays a popup notification on the screen for the given duration.voiddisplayPopupNotification(String message, Double duration) voiddisplayTextObject(int id, String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, float fontSize) Adds a new multi-line text in the screen with the given id, coordinates and size.voiddisplayTextObject(int id, String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, int fontSize) doubledot3(double[] vec1, double[] vec2) Computes the dot product between the two 3D vectors.doubledouble[]eclipticToEquatorial(double[] ecl) Converts ecliptic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.double[]eclipticToEquatorial(List<?> ecl) double[]eclipticToInternalCartesian(double l, double b, double r) Converts ecliptic coordinates to the internal cartesian coordinate system.double[]eclipticToInternalCartesian(int l, int b, int r) voidEnables the GUI rendering.voidEnables all input events.double[]equatorialCartesianToInternalCartesian(double[] eq, double kmFactor) Converts regular cartesian coordinates, where XY is the equatorial plane, with X pointing to the vernal equinox (ra=0) and Y points to ra=90, and Z pointing to the celestial north pole (dec=90) to internal cartesian coordinates with internal units.double[]equatorialCartesianToInternalCartesian(List<?> eq, double kmFactor) double[]equatorialToEcliptic(double[] eq) Converts equatorial cartesian coordinates (in the internal reference system) to ecliptic cartesian coordinates.double[]equatorialToEcliptic(List<?> eq) double[]equatorialToGalactic(double[] eq) Converts equatorial cartesian coordinates (in the internal reference system) to galactic cartesian coordinates.double[]equatorialToGalactic(List<?> eq) double[]equatorialToInternalCartesian(double ra, double dec, double r) Converts equatorial coordinates to the internal cartesian coordinate system.double[]equatorialToInternalCartesian(int ra, int dec, int r) voidLog an error using the internal logging system.voidexpandGuiComponent(String name) Expands the component with the given name.voidForcefully triggers an update of the scene and the positions of all the objects.double[]galacticToEquatorial(double[] gal) Converts galactic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.double[]galacticToEquatorial(List<?> gal) double[]galacticToInternalCartesian(double l, double b, double r) Converts galactic coordinates to the internal cartesian coordinate system.double[]galacticToInternalCartesian(int l, int b, int r) Gets the location of the assets folder.double[]Gets the current camera direction vector.double[]Gets the current camera position, in km.doubleGets the current physical speed of the camera in km/h.double[]Gets the current camera up vector.Returns the closest object to the camera in this instant as aIFocus.booleanGets the visibility of the component type described by the key.Gets the absolute path to the location of the configuration directorylongGets the current frame number.Gets the absolute path of the local data directory, configured in yourconfig.yamlfile.Gets the absolute path of the default directory where the camera files are saved.Gets the absolute path of the default directory where the still frames are saved.Gets the absolute path to the location of the inputListener mappings.Gets the absolute path to the location of the music filesGets the absolute path of the default directory where the screenshots are saved.doublegetDistanceTo(String name) Returns the distance to the surface of the object identified with the givenname.com.badlogic.ashley.core.Entitycom.badlogic.ashley.core.EntitybooleangetForceDisplayLabel(String name) Gets the value of the force display label flag for the object identified with the given name.longGets the current frame number.doubleGets the current FPS setting in the frame output system.floatGets the current scale factor applied to the UI.doubleReturns the internal unit to meter conversion factor.getLineObject(String name) Gets aVertsobject from the scene byname.getLineObject(String name, double timeoutSeconds) Gets aVertsobject from the scene byname.Returns the default data directory.doubleReturns the meter to internal unit conversion factor.floatGets an object from the scene graph bynameor id (HIP, TYC, Gaia SourceId).Gets an object bynameor id (HIP, TYC, Gaia SourceID), optionally waiting until the object is available, with a timeout.double[]getObjectPosition(String name) Gets the current position of the object identified bynamein the internal coordinate system and internal units.double[]Gets the predicted position of the object identified bynamein the internal coordinate system and internal units.doublegetObjectRadius(String name) Gets the size of the object identified byname, in Km, by name or id (HIP, TYC, sourceId).booleangetObjectVisibility(String name) Gets the visibility of a particular object.float[]getPositionAndSizeGui(String name) Returns the size and position of the GUI element that goes by the given name or null if such element does not exist.longReturns the current maximum number of velocity vectors per star group.doubleGets the current FPS setting in the frame output system.intReturns the screen height in pixels.intReturns the screen width in pixels.longReturns the current simulation time as the number of milliseconds since 1970-01-01T00:00:00Z (UTC).int[]Returns the current UTC simulation time in an array.floatGets the star brightness value.floatGets the minimum star opacity.double[]Returns the star parameters given its identifier or name, if the star exists and it is loaded.floatGets the current star size value in pixels.Returns the version number string.voidgoToObject(com.badlogic.ashley.core.Entity object, double solidAngle, int waitTimeSeconds, AtomicBoolean stop) voidgoToObject(String name) Runs a seamless trip to the object with the namefocusNameuntil the object view angle is20 degrees.voidgoToObject(String name, double angle) 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.voidgoToObject(String name, double solidAngle, int waitTimeSeconds) voidgoToObject(String name, double solidAngle, int waitTimeSeconds, AtomicBoolean stop) voidgoToObject(String name, long solidAngle, float waitTimeSeconds) voidgoToObject(String name, long solidAngle, int waitTimeSeconds) voidgoToObjectInstant(String name) Sets the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.booleanhasDataset(String dsName) Checks whether the dataset identified by the given name is loadedbooleanhideDataset(String dsName) Hides the dataset identified by the given name, if it exists and is not hidden.booleanhighlightDataset(String dsName, boolean highlight) Enables or disables the dataset highlight using a plain color chosen by the system.booleanhighlightDataset(String dsName, float r, float g, float b, float a, boolean highlight) Enables or disables the dataset highlight, using a given plain color.booleanhighlightDataset(String dsName, int colorIndex, boolean highlight) Enables or disables the dataset highlight, using a plain color given by the color index: 0 - blue 1 - red 2 - yellow 3 - green 4 - pink 5 - orange 6 - purple 7 - brown 8 - magentabooleanhighlightDataset(String dsName, String attributeName, String colorMap, double minMap, double maxMap, boolean highlight) Enables or disables 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) Converts internal cartesian coordinates to equatorial[ra, dec, distance]coordinates.double[]internalCartesianToEquatorial(int x, int y, int z) doubleinternalUnitsToKilometres(double internalUnits) Converts the value in internal units to Kilometers.double[]internalUnitsToKilometres(double[] internalUnits) Converts the array in internal units to Kilometers.double[]internalUnitsToKilometres(List<?> internalUnits) doubleinternalUnitsToMetres(double internalUnits) Converts the value in internal units to metres.booleanIs the frame output system on?booleanIs the frame output system on?booleanQueries whether the time is on or not.doublekilometersToInternalUnits(double kilometres) doublekilometresToInternalUnits(double kilometres) Converts the kilometres to internal units.voidlandAtObjectLocation(com.badlogic.ashley.core.Entity object, String locationName, AtomicBoolean stop) 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.voidlandAtObjectLocation(String name, String locationName, AtomicBoolean stop) voidlandOnObject(String name) Lands on the object with the given name, if it is a planet or moon.Returns the names of all datasets currently loaded.booleanloadDataset(String dsName, String absolutePath) Loads a VOTable, FITS, CSV or JSON dataset file with the given name.booleanloadDataset(String dsName, String path, boolean sync) Loads a VOTable, FITS, CSV or JSON dataset file with the given name.booleanloadDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, boolean sync) booleanloadDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, DatasetOptions datasetOptions, boolean sync) Loads a VOTable, FITS, CSV or JSON dataset file with the given name.booleanloadDataset(String dsName, uk.ac.starlink.util.DataSource ds, CatalogInfo.CatalogInfoSource type, DatasetOptions datasetOptions, boolean sync) booleanloadJsonCatalog(String dsName, String path) Loads a JSON catalog file.booleanloadJsonCatalog(String dsName, String path, boolean sync) booleanloadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync) booleanloadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Loads a particle dataset (only positions and extra attributes) from a VOTable file (.vot).booleanloadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, boolean sync) Loads a particle dataset (only positions and extra attributes) from a VOTable file (.vot).booleanloadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Loads a particle dataset (only positions and extra attributes) from a VOTable file (.vot).booleanloadParticleDataset(String dsName, String path, double profileDecay, List<?> particleColor, double colorNoise, List<?> labelColor, double particleSize, String ct, boolean sync) booleanloadParticleDataset(String dsName, String path, double profileDecay, List<?> particleColor, double colorNoise, List<?> labelColor, double particleSize, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync) booleanloadParticleDataset(String dsName, String path, double profileDecay, List<?> particleColor, double colorNoise, List<?> labelColor, double particleSize, List<?> sizeLimits, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync) booleanloadParticleDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync) booleanloadStarClusterDataset(String dsName, String path, double[] particleColor, double[] fadeIn, double[] fadeOut, boolean sync) Loads a star cluster dataset from a CSV file.booleanloadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Loads a star cluster dataset from a CSV file.booleanloadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Loads a star cluster dataset from a CSV file.booleanloadStarClusterDataset(String dsName, String path, double[] particleColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Loads a star cluster dataset from a CSV file.booleanloadStarClusterDataset(String dsName, String path, List<?> particleColor, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync) booleanloadStarClusterDataset(String dsName, String path, List<?> particleColor, List<?> labelColor, String ct, List<?> fadeIn, List<?> fadeOut, boolean sync) booleanloadStarClusterDataset(String dsName, String path, List<?> particleColor, List<?> fadeIn, List<?> fadeOut, boolean sync) booleanloadStarClusterDataset(String dsName, String path, List<?> particleColor, List<?> labelColor, List<?> fadeIn, List<?> fadeOut, boolean sync) booleanloadStarDataset(String dsName, String path, boolean sync) Loads a star dataset from a VOTable file (.vot).booleanloadStarDataset(String dsName, String path, double magnitudeScale, boolean sync) Loads a star dataset from a VOTable file (.vot).booleanloadStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, boolean sync) Loads a star dataset from a VOTable file (.vot).booleanloadStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Loads a star dataset from a VOTable file (.vot).booleanloadStarDataset(String dsName, String path, double magnitudeScale, List<?> labelColor, boolean sync) booleanloadStarDataset(String dsName, String path, double magnitudeScale, List<?> labelColor, List<?> fadeIn, List<?> fadeOut, boolean sync) booleanloadStarDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) booleanloadVariableStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Loads a variable star dataset from a VOTable file (.vot).booleanloadVariableStarDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) voidPrint text using the internal logging system.voidMaximizes the interface window.doublemetresToInternalUnits(double metres) Converts the metres to internal units.voidMinimizes the interface window.voidEvent notification call.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 unparked byIScriptingInterface.unparkRunnable(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 unparked byIScriptingInterface.unparkRunnable(String).voidplayCameraPath(String file) voidplayCameraPath(String file, boolean sync) voidpointAtSkyCoordinate(double ra, double dec) Sets the camera in free mode and points it to the given coordinates in equatorial system.voidpointAtSkyCoordinate(long ra, long dec) 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) Pre-loads the given image as a texture for later use.voidpreloadTextures(String[] paths) Pre-loads the given images as textures for later use.voidPrint text using the internal logging system.voidquit()Initiates 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.voidRemoves all objects.voidRemoves the tracking object from the camera, if any.booleanremoveDataset(String dsName) Removes the dataset identified by the given name, if it exists.voidremoveModelObject(String name) Removes the model object identified by the given name from the internal scene graph model of Gaia Sky, if it exists.voidremoveObject(int id) Removes the item with the given id.voidremoveObjects(int[] ids) Removes the items with the given ids.voidremoveObjects(List<?> ids) voidremoveRunnable(String id) Removes 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.double[]rotate2(double[] vector, double angle) Rotates a 2D vector by the specified angle in degrees, counter-clockwise assuming that the y axis points up.double[]rotate2(double[] vector, long angle) double[]double[]double[]rotate3(double[] vector, double[] axis, double angle) Rotates a 3D vector around the given axis by the specified angle in degrees.double[]rotate3(double[] vector, double[] axis, long angle) double[]double[]voidrunCameraPath(String file) Runs a .gsc camera path file and returns immediately.voidrunCameraPath(String file, boolean sync) Runs a .gsc camera path file and returns immediately.voidrunCameraRecording(String file) Runs the camera recording file with the given path.voidTakes a screenshot of the current frame and saves it to the configured location (seeIScriptingInterface.configureScreenshots(int, int, String, String)).voidsetAmbientLight(float ambientLight) Sets the ambient light to a certain value.voidsetAmbientLight(int value) voidsetBackBufferScale(float scale) Sets the scaling factor for the back-buffer.voidsetBloom(float value) Sets the strength value for the bloom effect.voidsetBloom(int level) voidsetBrightnessLevel(double level) Sets the brightness level of the render system.voidsetBrightnessLevel(long level) 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[] direction) Sets the camera direction vector to the given vector, in the internal reference system.voidsetCameraDirection(double[] direction, boolean immediate) Sets the camera direction vector to the given vector, in the internal reference system.voidsetCameraDirection(List<?> dir) voidsetCameraDirection(List<?> dir, boolean immediate) voidsetCameraFocus(String focusName) Sets the camera in focus mode with the focus object that bears the givenfocusName.voidsetCameraFocus(String focusName, float waitTimeSeconds) Sets the camera in focus mode with the focus object that bears the givenfocusName.voidsetCameraFocus(String focusName, int waitTimeSeconds) voidsetCameraFocusInstant(String focusName) Sets the camera in focus mode with the given focus object.voidsetCameraFocusInstantAndGo(String focusName) Sets the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.voidsetCameraFocusInstantAndGo(String focusName, boolean sleep) voidSets the camera in FoV1 mode.voidSets the camera in Fov1 and 2 mode.voidSets the camera in FoV2 mode.voidSets 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.voidsetCameraPosition(double[] position) Sets the camera position to the given coordinates, in the internal reference system and kilometres.voidsetCameraPosition(double[] position, boolean immediate) Sets the camera position to the given coordinates, in the internal reference system and kilometres.voidsetCameraPosition(double x, double y, double z) Component-wise version ofIScriptingInterface.setCameraPosition(double[]).voidsetCameraPosition(double x, double y, double z, boolean immediate) Component-wise version ofIScriptingInterface.setCameraPosition(double[], boolean).voidsetCameraPosition(List<?> vec) voidsetCameraPosition(List<?> vec, boolean immediate) voidsetCameraPositionAndFocus(String focus, String other, double rotation, double solidAngle) Sets 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.voidsetCameraPositionAndFocus(String focus, String other, long rotation, long solidAngle) voidsetCameraPostion(double[] vec) Sets the camera position to the given coordinates, in Km, equatorial system.voidsetCameraRecorderFps(double targetFps) Sets the target frame rate of the camera recorder.voidsetCameraRotationSpeed(float speed) Changes the speed of the camera when it rotates around a focus.voidsetCameraRotationSpeed(int speed) voidsetCameraSpeed(float speed) Changes the speed multiplier of the camera and its acceleration.voidsetCameraSpeed(int speed) voidsetCameraSpeedLimit(int index) Sets the speed limit of the camera given an index.voidsetCameraState(double[] pos, double[] dir, double[] up) Sets the camera state (position, direction and up vector).voidsetCameraState(List<?> pos, List<?> dir, List<?> up) voidsetCameraStateAndTime(double[] pos, double[] dir, double[] up, long time) Sets the camera state (position, direction and up vector) plus the current time.voidsetCameraStateAndTime(List<?> pos, List<?> dir, List<?> up, long time) voidsetCameraTrackingObject(String objectName) Sets the camera to track the object with the given name.voidsetCameraTurningSpeed(float speed) Changes the turning speed of the camera.voidsetCameraTurningSpeed(int speed) voidsetCameraUp(double[] up) Sets the camera up vector to the given vector, in the internal reference system.voidsetCameraUp(double[] up, boolean immediate) Sets the camera up vector to the given vector, in the internal reference system.voidsetCameraUp(List<?> up) voidsetCameraUp(List<?> up, boolean immediate) voidsetCinematicCamera(boolean cinematic) Enables or disables the cinematic camera mode.voidsetClosestCrosshairVisibility(boolean visible) Sets the visibility of the closest object crosshair.voidsetComponentTypeVisibility(String key, boolean visible) Sets the component described by the given name visible or invisible.voidsetContrastLevel(double level) Sets the contrast level of the render system.voidsetContrastLevel(long level) voidsetCrosshairVisibility(boolean visible) Sets the visibility of all cross-hairs.voidsetCubemapMode(boolean state, String projection) Enables and disables the cubemap mode.voidsetCubemapProjection(String projection) Sets the cubemap projection to use.voidsetCubemapResolution(int resolution) Sets the resolution (width and height are the same) of each side of the frame buffers used to capture each of the 6 directions that go into the cubemap to construct the equirectangular image for the 360 mode.booleansetDatasetHighlightAllVisible(String dsName, boolean allVisible) Sets the 'all visible' property of datasets when highlighted.booleansetDatasetHighlightSizeFactor(String dsName, float sizeFactor) Sets the size increase factor of this dataset when highlighted.voidsetDatasetPointSizeMultiplier(String dsName, double multiplier) Sets the dataset point size multiplier.voidsetExposureToneMappingLevel(double level) Sets the exposure level.voidsetExposureToneMappingLevel(long level) voidsetFocusCrosshairVisibility(boolean visible) Sets the visibility of the focus object crosshair.voidsetForceDisplayLabel(String name, boolean forceLabel) Forces the label to display for the given object, bypassing the solid angle requirements that are usually in place and determine label visibility.voidsetFov(float newFov) Changes the field of view of the camera.voidsetFov(int newFov) voidsetFrameOutput(boolean active) Activates or deactivates the image output system.voidsetFrameOutputMode(String screenshotMode) Sets the frame output mode.voidsetGammaCorrectionLevel(double level) Sets the gamma correction level.voidsetGammaCorrectionLevel(long level) voidsetGuiPosition(float x, float y) Moves the interface window to a new position.voidsetGuiPosition(float x, int y) voidsetGuiPosition(int x, float y) voidsetGuiPosition(int x, int y) voidsetGuiScrollPosition(float pixelY) Sets the vertical scroll position in the GUI.voidsetGuiScrollPosition(int pixelY) voidsetHDRToneMappingType(String type) Sets the high dynamic range tone mapping algorithm type.voidsetHeadlineMessage(String headline) Sets a headline message that will appear in a big font in the screen.voidsetHomeCrosshairVisibility(boolean visible) Sets the visibility of the home object crosshair.voidsetHueLevel(double level) Sets the hue level of the render system.voidsetHueLevel(long level) voidsetIndexOfRefraction(float ior) Sets index of refraction of celestial sphere in orthosphere view mode.voidsetLabelColor(String name, double[] color) Sets the label color of the object identified by the given name.voidsetLabelColor(String name, List<?> color) voidsetLabelSizeFactor(float factor) Sets the label size factor.voidsetLabelSizeFactor(int factor) voidsetLensFlare(boolean state) Enables or deisables the lens flare effect.voidsetLimitFps(double limitFps) Limits the frame rate of Gaia Sky.voidsetLimitFps(int limitFps) Limits the frame rate of Gaia Sky.voidsetLineWidthFactor(float factor) Sets the line width factor.voidsetLineWidthFactor(int factor) voidsetMaximumSimulationTime(double years) voidsetMaximumSimulationTime(long years) Sets the maximum simulation time allowed, in years.voidsetMaximumSimulationTime(Double years) voidsetMaximumSimulationTime(Integer years) voidsetMaximumSimulationTime(Long years) voidsetMinimapVisibility(boolean visible) Shows or hides the minimap.voidsetMinStarOpacity(float minOpacity) voidsetMinStarOpacity(int opacity) voidsetMotionBlur(boolean state) Enables or disables the motion blur effect.voidsetObjectPosition(com.badlogic.ashley.core.Entity object, double[] position) Sets the internal position of the given entity object.voidsetObjectPosition(com.badlogic.ashley.core.Entity object, List<?> position) voidsetObjectPosition(FocusView object, double[] position) Sets the internal position of the given entity object.voidsetObjectPosition(FocusView object, List<?> position) voidsetObjectPosition(String name, double[] position) Sets the internal position of the object identified byname.voidsetObjectPosition(String name, List<?> position) voidsetObjectSizeScaling(String name, double scalingFactor) Sets the given size scaling factor to the object identified byname.booleansetObjectVisibility(String name, boolean visible) Sets the visibility of a particular object.voidsetOrbitCoordinatesScaling(String name, double scalingFactor) Sets the given orbit coordinates scaling factor to the AbstractOrbitCoordinates identified byname.voidsetOrbitSolidAngleThreshold(float angleDeg) Sets the solid angle below which orbits fade and disappear.voidsetOrthosphereViewMode(boolean state) Enables or disables the orthosphere view mode.voidsetPanoramaMode(boolean state) Enables or disables the panorama mode.voidsetPlanetariumMode(boolean state) Enables or disables the planetarium mode.voidsetProjectionFov(float newFov) Same asIScriptingInterface.setFov(float), but bypassing the restriction of an active projection in the slave (slaves that have an active projection do not accept fov modification events).voidsetProjectionPitch(float pitch) Sets the projection pitch angle (if this is a slave instance), in degrees.voidsetProjectionRoll(float roll) Sets the projection roll angle (if this is a slave instance), in degrees.voidsetProjectionYaw(float yaw) Sets the projection yaw angle (if this is a slave instance), in degrees.voidsetProperMotionsArrowheads(boolean arrowheadsEnabled) Sets whether to show arrowheads or not for the velocity vectors.voidsetProperMotionsColorMode(int mode) Sets the color mode of proper motion vectors.voidsetProperMotionsLengthFactor(float factor) Sets the length of the proper motion vectors, in [500,30000].voidsetProperMotionsLengthFactor(int factor) voidsetProperMotionsMaxNumber(long maxNumber) Sets the maximum number of proper motion vectors to add per star group.voidsetProperMotionsNumberFactor(float factor) Sets the number factor of proper motion vectors that are visible.voidsetProperMotionsNumberFactor(int factor) voidsetReprojectionMode(String mode) Sets the re-projection mode.voidsetRotationCameraSpeed(float speed) Changes the speed of the camera when it rotates around a focus.voidsetRotationCameraSpeed(int speed) voidsetSaturationLevel(double level) Sets the saturation level of the render system.voidsetSaturationLevel(long level) voidsetScreenshotsMode(String screenshotMode) Sets the screenshot mode.voidsetSimulationPace(double warp) Deprecated, useIScriptingInterface.setTimeWarp(double)instead.voidsetSimulationPace(long warp) voidsetSimulationTime(int year, int month, int day, int hour, int min, int sec, int millisec) Sets the time of the application, in UTC.voidsetSimulationTime(long time) Sets the time of the application.voidsetSmoothLodTransitions(boolean value) Sets the value of smooth lod transitions, allowing or disallowing octant fade-ins of as they come into view.voidsetStarBrightness(float brightness) Sets the star brightness value.voidsetStarBrightness(int brightness) voidsetStarBrightnessPower(float power) Sets the star brightness power profile value.voidsetStarGlow(boolean state) Enables or disables the stars glowing over objects.voidsetStarGlowFactor(float glowFactor) Sets the star glow factor level value.voidsetStarGlowOverObjects(boolean state) Enables or disables stars' light glowing and spilling over closer objects.voidsetStarGroupBillboard(boolean flag) Enable or disable the rendering of close stars as billboards.voidsetStarGroupNearestNumber(int n) Sets the number of nearest stars to be processed for each star group.voidsetStarMinOpacity(float minOpacity) Sets the minimum star opacity.voidsetStarSize(float size) Sets the size of the rasterized stars, in pixels.voidsetStarSize(int size) voidsetStarTextureIndex(int index) Sets the star texture index, in [1, 4]voidsetStereoscopicMode(boolean state) Enables and disables the stereoscopic mode.voidsetStereoscopicProfile(int index) Changes the stereoscopic profile.voidsetSubheadMessage(String subhead) Sets 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) Sets a time bookmark in the global clock that, when reached, the clock automatically stops.voidsetTargetTime(long ms) Sets a time bookmark in the global clock that, when reached, the clock automatically stops.voidsetTimeWarp(double warp) Sets the simulation time warp factor.voidsetTimeWarp(long warp) voidsetTurningCameraSpeed(float speed) Changes the turning speed of the camera.voidsetTurningCameraSpeed(int speed) voidsetUnfilteredProperMotionsNumberFactor(float factor) voidsetVisibility(String key, boolean visible) booleanshowDataset(String dsName) Shows (un-hides) 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.voidsleep(int seconds) voidsleepFrames(long frames) Sleeps for a number of frames.voidStarts recording the camera path to an auto-generated file in the default camera directory.voidstartRecordingCameraPath(String fileName) Starts recording a camera path with the given filename.voidStarts the simulation.voidStops the current camera recording.voidStops the simulation time.voidAlias toIScriptingInterface.saveScreenshot().voidunparkRunnable(String id) Removes the runnable with the given id, if any.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 keyCode) Blocks the execution until the given key or button is pressed.
-
Constructor Details
-
EventScriptingInterface
public EventScriptingInterface(com.badlogic.gdx.assets.AssetManager manager, CatalogManager catalogManager)
-
-
Method Details
-
activateRealTimeFrame
public void activateRealTimeFrame()Description copied from interface:IScriptingInterfaceSets the current time frame to real time. All the commands executed after this command becomes active will be in the real time frame (clock ticks).- Specified by:
activateRealTimeFramein interfaceIScriptingInterface
-
activateSimulationTimeFrame
public void activateSimulationTimeFrame()Description copied from interface:IScriptingInterfaceSets the current time frame to simulation time. All the commands executed after this command becomes active will be in the simulation time frame (simulation clock in the app).- Specified by:
activateSimulationTimeFramein interfaceIScriptingInterface
-
displayPopupNotification
Description copied from interface:IScriptingInterfaceDisplays a popup notification on the screen for the default duration.- Specified by:
displayPopupNotificationin interfaceIScriptingInterface- Parameters:
message- The message text.
-
displayPopupNotification
Description copied from interface:IScriptingInterfaceDisplays a popup notification on the screen for the given duration.- Specified by:
displayPopupNotificationin interfaceIScriptingInterface- Parameters:
message- The message text.duration- The duration in seconds until the notification is removed.
-
displayPopupNotification
-
setHeadlineMessage
Description copied from interface:IScriptingInterfaceSets a headline message that will appear in a big font in the screen.- Specified by:
setHeadlineMessagein interfaceIScriptingInterface- Parameters:
headline- The headline text.
-
setSubheadMessage
Description copied from interface:IScriptingInterfaceSets a subhead message that will appear in a small font below the headline.- Specified by:
setSubheadMessagein interfaceIScriptingInterface- Parameters:
subhead- The subhead text.
-
clearHeadlineMessage
public void clearHeadlineMessage()Description copied from interface:IScriptingInterfaceClears the headline messge.- Specified by:
clearHeadlineMessagein interfaceIScriptingInterface
-
clearSubheadMessage
public void clearSubheadMessage()Description copied from interface:IScriptingInterfaceClears the subhead message.- Specified by:
clearSubheadMessagein interfaceIScriptingInterface
-
clearAllMessages
public void clearAllMessages()Description copied from interface:IScriptingInterfaceClears both the subhead and the headline messages.- Specified by:
clearAllMessagesin interfaceIScriptingInterface
-
disableInput
public void disableInput()Description copied from interface:IScriptingInterfaceDisables all input events from mouse, keyboard, touchscreen, etc.- Specified by:
disableInputin interfaceIScriptingInterface
-
enableInput
public void enableInput()Description copied from interface:IScriptingInterfaceEnables all input events.- Specified by:
enableInputin interfaceIScriptingInterface
-
setCinematicCamera
public void setCinematicCamera(boolean cinematic) Description copied from interface:IScriptingInterfaceEnables or disables the cinematic camera mode.- Specified by:
setCinematicCamerain interfaceIScriptingInterface- Parameters:
cinematic- Whether to enable or disable the cinematic mode.
-
setCameraFocus
Description copied from interface:IScriptingInterfaceSets the camera in focus mode with the focus object that bears the givenfocusName. It returns immediately, so it does not wait for the camera direction to point to the focus.- Specified by:
setCameraFocusin interfaceIScriptingInterface- Parameters:
focusName- The name of the new focus object.
-
setCameraFocus
Description copied from interface:IScriptingInterfaceSets the camera in focus mode with the focus object that bears the givenfocusName. The amount of time to block and wait for the camera to face the focus can also be specified inwaitTimeSeconds.- Specified by:
setCameraFocusin interfaceIScriptingInterface- Parameters:
focusName- The name of the new focus object.waitTimeSeconds- Maximum time in seconds to wait for the camera to face the focus. If negative, we wait indefinitely.
-
setCameraFocus
-
setCameraFocusInstant
Description copied from interface:IScriptingInterfaceSets the camera in focus mode with the given focus object. It also instantly sets the camera direction vector to point towards the focus.- Specified by:
setCameraFocusInstantin interfaceIScriptingInterface- Parameters:
focusName- The name of the new focus object.
-
setCameraFocusInstantAndGo
Description copied from interface:IScriptingInterfaceSets the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.- Specified by:
setCameraFocusInstantAndGoin interfaceIScriptingInterface- Parameters:
focusName- The name of the new focus object.
-
setCameraFocusInstantAndGo
-
setCameraLock
public void setCameraLock(boolean lock) Description copied from interface:IScriptingInterfaceActivates or deactivates the camera lock to the focus reference system when in focus mode.- Specified by:
setCameraLockin interfaceIScriptingInterface- Parameters:
lock- Activate or deactivate the lock.
-
setCameraCenterFocus
public void setCameraCenterFocus(boolean centerFocus) Description copied from interface:IScriptingInterfaceWhether to look for the focus constantly when in focus mode and center it in the view or whether the view must be free. Use True to center the focus (default behaviour) and False to set it to a free view.- Specified by:
setCameraCenterFocusin interfaceIScriptingInterface- Parameters:
centerFocus- Whether to center the focus or not.
-
setCameraFree
public void setCameraFree()Description copied from interface:IScriptingInterfaceSets the camera in free mode.- Specified by:
setCameraFreein interfaceIScriptingInterface
-
setCameraFov1
public void setCameraFov1()Description copied from interface:IScriptingInterfaceSets the camera in FoV1 mode. The camera is positioned in Gaia's focal plane and observes what Gaia observes through its field of view 1.- Specified by:
setCameraFov1in interfaceIScriptingInterface
-
setCameraFov2
public void setCameraFov2()Description copied from interface:IScriptingInterfaceSets the camera in FoV2 mode. The camera is positioned in Gaia's focal plane and observes what Gaia observes through its field of view 2.- Specified by:
setCameraFov2in interfaceIScriptingInterface
-
setCameraFov1and2
public void setCameraFov1and2()Description copied from interface:IScriptingInterfaceSets the camera in Fov1 and 2 mode. The camera is positioned in Gaia's focal plane and observes what Gaia observes through its two fields of view.- Specified by:
setCameraFov1and2in interfaceIScriptingInterface
-
setCameraPostion
public void setCameraPostion(double[] vec) Description copied from interface:IScriptingInterfaceSets the camera position to the given coordinates, in Km, equatorial system.- Specified by:
setCameraPostionin interfaceIScriptingInterface- Parameters:
vec- Vector of three components in internal coordinates and Km.
-
setCameraPosition
public void setCameraPosition(double x, double y, double z) Description copied from interface:IScriptingInterfaceComponent-wise version ofIScriptingInterface.setCameraPosition(double[]).- Specified by:
setCameraPositionin interfaceIScriptingInterface
-
setCameraPosition
public void setCameraPosition(double x, double y, double z, boolean immediate) Description copied from interface:IScriptingInterfaceComponent-wise version ofIScriptingInterface.setCameraPosition(double[], boolean).- Specified by:
setCameraPositionin interfaceIScriptingInterface
-
setCameraPosition
-
setCameraPosition
public void setCameraPosition(double[] position, boolean immediate) Description copied from interface:IScriptingInterfaceSets 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.- Specified by:
setCameraPositionin interfaceIScriptingInterface- Parameters:
position- Vector of three components in internal coordinates and Km.immediate- Whether to apply the changes immediately, or wait for the next frame.
-
getCameraPosition
public double[] getCameraPosition()Description copied from interface:IScriptingInterfaceGets the current camera position, in km.- Specified by:
getCameraPositionin interfaceIScriptingInterface- Returns:
- The camera position coordinates in the internal reference system, in km.
-
setCameraPosition
public void setCameraPosition(double[] position) Description copied from interface:IScriptingInterfaceSets 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, useIScriptingInterface.setCameraPosition(double[], boolean), with the boolean set totrue.- Specified by:
setCameraPositionin interfaceIScriptingInterface- Parameters:
position- Vector of three components in internal coordinates and Km.
-
setCameraPosition
-
setCameraDirection
-
setCameraDirection
public void setCameraDirection(double[] direction, boolean immediate) Description copied from interface:IScriptingInterfaceSets 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.- Specified by:
setCameraDirectionin interfaceIScriptingInterface- Parameters:
direction- The direction vector in the internal reference system.immediate- Whether to apply the changes immediately, or wait for the next frame.
-
getCameraDirection
public double[] getCameraDirection()Description copied from interface:IScriptingInterfaceGets the current camera direction vector.- Specified by:
getCameraDirectionin interfaceIScriptingInterface- Returns:
- The camera direction vector in the internal reference system.
-
setCameraDirection
public void setCameraDirection(double[] direction) Description copied from interface:IScriptingInterfaceSets the camera direction vector to the given vector, in the internal reference system. You can convert from spherical coordinates usingIScriptingInterface.equatorialCartesianToInternalCartesian(double[], double),IScriptingInterface.galacticToInternalCartesian(double, double, double)andIScriptingInterface.eclipticToInternalCartesian(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, useIScriptingInterface.setCameraDirection(double[], boolean), with the boolean set totrue.- Specified by:
setCameraDirectionin interfaceIScriptingInterface- Parameters:
direction- The direction vector in equatorial cartesian coordinates.
-
setCameraDirection
-
setCameraUp
-
setCameraUp
public void setCameraUp(double[] up, boolean immediate) Description copied from interface:IScriptingInterfaceSets 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.- Specified by:
setCameraUpin interfaceIScriptingInterface- Parameters:
up- The up vector in equatorial coordinates.immediate- Whether to apply the changes immediately, or wait for the next frame.
-
getCameraUp
public double[] getCameraUp()Description copied from interface:IScriptingInterfaceGets the current camera up vector.- Specified by:
getCameraUpin interfaceIScriptingInterface- Returns:
- The camera up vector in the internal reference system.
-
setCameraUp
public void setCameraUp(double[] up) Description copied from interface:IScriptingInterfaceSets 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, useIScriptingInterface.setCameraUp(double[], boolean), with the boolean set totrue.- Specified by:
setCameraUpin interfaceIScriptingInterface- Parameters:
up- The up vector in equatorial coordinates.
-
setCameraUp
-
setCameraPositionAndFocus
public void setCameraPositionAndFocus(String focus, String other, double rotation, double solidAngle) Description copied from interface:IScriptingInterfaceSets 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.- Specified by:
setCameraPositionAndFocusin interfaceIScriptingInterface- Parameters:
focus- The name of the focus object.other- The name of the other object, to the fine a line from this to foucs. Usually a light source.rotation- The rotation angle, in degrees.solidAngle- The target solid angle which determines the distance, in degrees.
-
setCameraPositionAndFocus
-
pointAtSkyCoordinate
public void pointAtSkyCoordinate(double ra, double dec) Description copied from interface:IScriptingInterfaceSets the camera in free mode and points it to the given coordinates in equatorial system.- Specified by:
pointAtSkyCoordinatein interfaceIScriptingInterface- Parameters:
ra- Right ascension in degrees.dec- Declination in degrees.
-
pointAtSkyCoordinate
public void pointAtSkyCoordinate(long ra, long dec) -
getCameraSpeed
public double getCameraSpeed()Description copied from interface:IScriptingInterfaceGets the current physical speed of the camera in km/h.- Specified by:
getCameraSpeedin interfaceIScriptingInterface- Returns:
- The current speed of the camera in km/h.
-
setCameraSpeed
public void setCameraSpeed(float speed) Description copied from interface:IScriptingInterfaceChanges the speed multiplier of the camera and its acceleration.- Specified by:
setCameraSpeedin interfaceIScriptingInterface- Parameters:
speed- The new speed, from 0 to 100.
-
setCameraSpeed
public void setCameraSpeed(int speed) -
setCameraRotationSpeed
public void setCameraRotationSpeed(float speed) Description copied from interface:IScriptingInterfaceChanges the speed of the camera when it rotates around a focus.- Specified by:
setCameraRotationSpeedin interfaceIScriptingInterface- Parameters:
speed- The new rotation speed in [0,100]
-
setCameraRotationSpeed
public void setCameraRotationSpeed(int speed) -
setRotationCameraSpeed
public void setRotationCameraSpeed(float speed) Description copied from interface:IScriptingInterfaceChanges the speed of the camera when it rotates around a focus.- Specified by:
setRotationCameraSpeedin interfaceIScriptingInterface- Parameters:
speed- The new rotation speed in [0,100]
-
setRotationCameraSpeed
public void setRotationCameraSpeed(int speed) -
setCameraTurningSpeed
public void setCameraTurningSpeed(float speed) Description copied from interface:IScriptingInterfaceChanges the turning speed of the camera.- Specified by:
setCameraTurningSpeedin interfaceIScriptingInterface- Parameters:
speed- The new turning speed, from 1 to 100.
-
setCameraTurningSpeed
public void setCameraTurningSpeed(int speed) -
setTurningCameraSpeed
public void setTurningCameraSpeed(float speed) Description copied from interface:IScriptingInterfaceChanges the turning speed of the camera.- Specified by:
setTurningCameraSpeedin interfaceIScriptingInterface- Parameters:
speed- The new turning speed, from 1 to 100.
-
setTurningCameraSpeed
public void setTurningCameraSpeed(int speed) -
setCameraSpeedLimit
public void setCameraSpeedLimit(int index) Description copied from interface:IScriptingInterfaceSets the speed limit of the camera given an index. The index corresponds to the following:- 0 - 1 Km/h
- 1 - 10 Km/h
- 2 - 100 Km/h
- 3 - 1000 Km/h
- 4 - 1 Km/s
- 5 - 10 Km/s
- 6 - 100 Km/s
- 7 - 1000 Km/s
- 8 - 0.01 c
- 9 - 0.1 c
- 10 - 0.5 c
- 11 - 0.8 c
- 12 - 0.9 c
- 13 - 0.99 c
- 14 - 0.99999 c
- 15 - 1 c
- 16 - 2 c
- 17 - 10 c
- 18 - 1e3 c
- 19 - 1 AU/s
- 20 - 10 AU/s
- 21 - 1000 AU/s
- 22 - 10000 AU/s
- 23 - 1 pc/s
- 24 - 2 pc/s
- 25 - 10 pc/s
- 26 - 1000 pc/s
- 27 - unlimited
- Specified by:
setCameraSpeedLimitin interfaceIScriptingInterface- Parameters:
index- The index of the top speed.
-
setCameraTrackingObject
Description copied from interface:IScriptingInterfaceSets the camera to track the object with the given name. In this mode, the position of the camera is still dependent on the focus object (if any), but its direction points to the tracking object.- Specified by:
setCameraTrackingObjectin interfaceIScriptingInterface- Parameters:
objectName- The name of the new tracking object.
-
removeCameraTrackingObject
public void removeCameraTrackingObject()Description copied from interface:IScriptingInterfaceRemoves the tracking object from the camera, if any.- Specified by:
removeCameraTrackingObjectin interfaceIScriptingInterface
-
setCameraOrientationLock
public void setCameraOrientationLock(boolean lock) Description copied from interface:IScriptingInterfaceLocks or unlocks the orientation of the camera to the focus object's rotation.- Specified by:
setCameraOrientationLockin interfaceIScriptingInterface- Parameters:
lock- Whether to lock or unlock the camera orientation to the focus.
-
cameraForward
public void cameraForward(double cameraForward) Description copied from interface:IScriptingInterfaceAdds a forward movement to the camera with the given value. If value is negative the movement is backwards.- Specified by:
cameraForwardin interfaceIScriptingInterface- Parameters:
cameraForward- The magnitude of the movement, between -1 and 1.
-
cameraForward
public void cameraForward(long value) -
cameraRotate
public void cameraRotate(double deltaX, double deltaY) Description copied from interface:IScriptingInterfaceAdds a rotation movement to the camera around the current focus, or a pitch/yaw if in free mode.If the camera is not using the cinematic behaviour (
IScriptingInterface.setCinematicCamera(boolean), the rotation movement will not be permanent. Use the cinematic behaviour to have the camera continue to rotate around the focus.- Specified by:
cameraRotatein interfaceIScriptingInterface- Parameters:
deltaX- The x component, between 0 and 1. Positive is right and negative is left.deltaY- The y component, between 0 and 1. Positive is up and negative is down.
-
cameraRotate
public void cameraRotate(double deltaX, long deltaY) -
cameraRotate
public void cameraRotate(long deltaX, double deltaY) -
cameraRoll
public void cameraRoll(double roll) Description copied from interface:IScriptingInterfaceAdds a roll force to the camera.- Specified by:
cameraRollin interfaceIScriptingInterface- Parameters:
roll- The intensity of the roll.
-
cameraRoll
public void cameraRoll(long roll) -
cameraTurn
public void cameraTurn(double deltaX, double deltaY) Description copied from interface:IScriptingInterfaceAdds a turn force to the camera (yaw and/or pitch). If the camera is in focus mode, it permanently deviates the line of sight from the focus until centered again. If the camera is not using the cinematic behaviour (IScriptingInterface.setCinematicCamera(boolean), the turn will not be permanent. Use the cinematic behaviour to have the turn persist in time.- Specified by:
cameraTurnin interfaceIScriptingInterface- Parameters:
deltaX- The x component, between 0 and 1. Positive is right and negative is left.deltaY- The y component, between 0 and 1. Positive is up and negative is down.
-
cameraTurn
public void cameraTurn(double deltaX, long deltaY) -
cameraTurn
public void cameraTurn(long deltaX, double deltaY) -
cameraTurn
public void cameraTurn(long deltaX, long deltaY) -
cameraYaw
public void cameraYaw(double amount) Description copied from interface:IScriptingInterfaceAdds a yaw to the camera. Same asIScriptingInterface.cameraTurn(double, double)with deltaY set to zero.- Specified by:
cameraYawin interfaceIScriptingInterface- Parameters:
amount- The amount.
-
cameraYaw
public void cameraYaw(long amount) -
cameraPitch
public void cameraPitch(double amount) Description copied from interface:IScriptingInterfaceAdds a pitch to the camera. Same asIScriptingInterface.cameraTurn(double, double)with deltaX set to zero.- Specified by:
cameraPitchin interfaceIScriptingInterface- Parameters:
amount- The amount.
-
cameraPitch
public void cameraPitch(long amount) -
cameraStop
public void cameraStop()Description copied from interface:IScriptingInterfaceStops all camera motion.- Specified by:
cameraStopin interfaceIScriptingInterface
-
cameraCenter
public void cameraCenter()Description copied from interface:IScriptingInterfaceCenters the camera to the focus, removing any deviation of the line of sight. Useful to center the focus object again after turning.- Specified by:
cameraCenterin interfaceIScriptingInterface
-
getClosestObjectToCamera
Description copied from interface:IScriptingInterfaceReturns the closest object to the camera in this instant as aIFocus.- Specified by:
getClosestObjectToCamerain interfaceIScriptingInterface- Returns:
- The closest object to the camera.
-
setFov
public void setFov(float newFov) Description copied from interface:IScriptingInterfaceChanges the field of view of the camera.- Specified by:
setFovin interfaceIScriptingInterface- Parameters:
newFov- The new field of view value in degrees, betweenConstants.MIN_FOVandConstants.MAX_FOV.
-
setFov
public void setFov(int newFov) -
setVisibility
Description copied from interface:IScriptingInterface- Specified by:
setVisibilityin interfaceIScriptingInterface
-
setComponentTypeVisibility
Description copied from interface:IScriptingInterfaceSets the component described by the given name visible or invisible.- Specified by:
setComponentTypeVisibilityin interfaceIScriptingInterface- Parameters:
key- The key of the component: "element.stars", "element.planets", "element.moons", etc. SeeComponentTypes.ComponentType.visible- The visible value.
-
getComponentTypeVisibility
Description copied from interface:IScriptingInterfaceGets the visibility of the component type described by the key. Examples of keys are "element.stars", "element.planets" or "element.moons". SeeComponentTypes.ComponentType.- Specified by:
getComponentTypeVisibilityin interfaceIScriptingInterface- Parameters:
key- The key of the component type to query.- Returns:
- The visibility of the component type.
-
setObjectVisibility
Description copied from interface:IScriptingInterfaceSets the visibility of a particular object. Use this method to hide individual objects. Changes to the individual object visibility are not persisted on restart.- Specified by:
setObjectVisibilityin interfaceIScriptingInterface- 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
Description copied from interface:IScriptingInterfaceGets the visibility of a particular object.- Specified by:
getObjectVisibilityin interfaceIScriptingInterface- Parameters:
name- The name of the object. Must be an instance ofIVisibilitySwitch.- Returns:
- The visibility status of the object, if it exists.
-
setLabelSizeFactor
public void setLabelSizeFactor(float factor) Description copied from interface:IScriptingInterfaceSets the label size factor. The label size will be multiplied by this.- Specified by:
setLabelSizeFactorin interfaceIScriptingInterface- Parameters:
factor- Factor inConstants.MIN_LABEL_SIZEandConstants.MAX_LABEL_SIZE.
-
setForceDisplayLabel
Description copied from interface:IScriptingInterfaceForces the label to display for the given object, bypassing the solid angle requirements that are usually in place and determine label visibility. This setting does not override the visibility of the object itself, or of the label visibility component element. Changes to the force display label flag are not persisted on restart.- Specified by:
setForceDisplayLabelin interfaceIScriptingInterface- Parameters:
name- The object name.forceLabel- Whether to force the label to render for this object or not.
-
setLabelColor
Description copied from interface:IScriptingInterfaceSets the label color of the object identified by the given name. The label color must be an array of RGBA values in [0,1].- Specified by:
setLabelColorin interfaceIScriptingInterface- Parameters:
name- The object name.color- The label color as an array of RGBA (red, green, blue, alpha) values in [0,1].
-
setLabelColor
-
getForceDisplayLabel
Description copied from interface:IScriptingInterfaceGets the value of the force display label flag for the object identified with the given name.- Specified by:
getForceDisplayLabelin interfaceIScriptingInterface- Parameters:
name- The name of the object.- Returns:
- The value of the force display label flag of the object, if it exists.
-
setLabelSizeFactor
public void setLabelSizeFactor(int factor) -
setLineWidthFactor
public void setLineWidthFactor(float factor) Description copied from interface:IScriptingInterfaceSets the line width factor. The line width will be multiplied by this.- Specified by:
setLineWidthFactorin interfaceIScriptingInterface- Parameters:
factor- Factor inConstants.MIN_LINE_WIDTHandConstants.MAX_LINE_WIDTH.
-
setLineWidthFactor
public void setLineWidthFactor(int factor) -
setProperMotionsNumberFactor
public void setProperMotionsNumberFactor(float factor) Description copied from interface:IScriptingInterfaceSets the number factor of proper motion vectors that are visible. In [1,100].- Specified by:
setProperMotionsNumberFactorin interfaceIScriptingInterface- Parameters:
factor- Factor in [1,100].
-
setProperMotionsColorMode
public void setProperMotionsColorMode(int mode) Description copied from interface:IScriptingInterfaceSets the color mode of proper motion vectors.- Specified by:
setProperMotionsColorModein interfaceIScriptingInterface- Parameters:
mode- The color mode:- 0 - direction: the normalised cartesian velocity components XYZ are mapped to the color channels RGB.
- 1 - magnitude (speed): the magnitude of the velocity vector is mapped using a rainbow scheme (blue-green-yellow-red) with the color map limit at 100 Km/s.
- 2 - has radial velocity: blue for stars with radial velocity, red for stars without.
- 3 - redshift from Sun: blue stars have negative radial velocity (from the Sun), red stars have positive radial velocity (from the Sun). Blue is mapped to -100 Km/s, red is mapped to 100 Km/s.
- 4 - redshift from camera: blue stars have negative radial velocity (from the camera), red stars have positive radial velocity (from the camera). Blue is mapped to -100 Km/s, red is mapped to 100 Km/s.
- 5 - single color: same color for all velocity vectors.
-
setProperMotionsArrowheads
public void setProperMotionsArrowheads(boolean arrowheadsEnabled) Description copied from interface:IScriptingInterfaceSets whether to show arrowheads or not for the velocity vectors.- Specified by:
setProperMotionsArrowheadsin interfaceIScriptingInterface- Parameters:
arrowheadsEnabled- Whether to show the velocity vectors with arrowheads.
-
setProperMotionsNumberFactor
public void setProperMotionsNumberFactor(int factor) -
setUnfilteredProperMotionsNumberFactor
public void setUnfilteredProperMotionsNumberFactor(float factor) -
setProperMotionsLengthFactor
public void setProperMotionsLengthFactor(float factor) Description copied from interface:IScriptingInterfaceSets the length of the proper motion vectors, in [500,30000].- Specified by:
setProperMotionsLengthFactorin interfaceIScriptingInterface- Parameters:
factor- Factor in [500,30000].
-
setProperMotionsLengthFactor
public void setProperMotionsLengthFactor(int factor) -
getProperMotionsMaxNumber
public long getProperMotionsMaxNumber()Description copied from interface:IScriptingInterfaceReturns the current maximum number of velocity vectors per star group.- Specified by:
getProperMotionsMaxNumberin interfaceIScriptingInterface- Returns:
- Max number of velocity vectors per star group.
-
setProperMotionsMaxNumber
public void setProperMotionsMaxNumber(long maxNumber) Description copied from interface:IScriptingInterfaceSets the maximum number of proper motion vectors to add per star group.- Specified by:
setProperMotionsMaxNumberin interfaceIScriptingInterface- Parameters:
maxNumber- The maximum number of proper motion vectors per star group.
-
setCrosshairVisibility
public void setCrosshairVisibility(boolean visible) Description copied from interface:IScriptingInterfaceSets the visibility of all cross-hairs.- Specified by:
setCrosshairVisibilityin interfaceIScriptingInterface- Parameters:
visible- The visibility state, which applies to all cross-hairs.
-
setFocusCrosshairVisibility
public void setFocusCrosshairVisibility(boolean visible) Description copied from interface:IScriptingInterfaceSets the visibility of the focus object crosshair.- Specified by:
setFocusCrosshairVisibilityin interfaceIScriptingInterface- Parameters:
visible- The visibility state.
-
setClosestCrosshairVisibility
public void setClosestCrosshairVisibility(boolean visible) Description copied from interface:IScriptingInterfaceSets the visibility of the closest object crosshair.- Specified by:
setClosestCrosshairVisibilityin interfaceIScriptingInterface- Parameters:
visible- The visibility state.
-
setHomeCrosshairVisibility
public void setHomeCrosshairVisibility(boolean visible) Description copied from interface:IScriptingInterfaceSets the visibility of the home object crosshair.- Specified by:
setHomeCrosshairVisibilityin interfaceIScriptingInterface- Parameters:
visible- The visibility state.
-
setMinimapVisibility
public void setMinimapVisibility(boolean visible) Description copied from interface:IScriptingInterfaceShows or hides the minimap.- Specified by:
setMinimapVisibilityin interfaceIScriptingInterface- Parameters:
visible- The visibility state.
-
setAmbientLight
public void setAmbientLight(float ambientLight) Description copied from interface:IScriptingInterfaceSets the ambient light to a certain value.- Specified by:
setAmbientLightin interfaceIScriptingInterface- Parameters:
ambientLight- The value of the ambient light in [0,1].
-
setAmbientLight
public void setAmbientLight(int value) -
setSimulationTime
public void setSimulationTime(int year, int month, int day, int hour, int min, int sec, int millisec) Description copied from interface:IScriptingInterfaceSets the time of the application, in UTC.- Specified by:
setSimulationTimein interfaceIScriptingInterface- 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
public long getSimulationTime()Description copied from interface:IScriptingInterfaceReturns the current simulation time as the number of milliseconds since 1970-01-01T00:00:00Z (UTC).- Specified by:
getSimulationTimein interfaceIScriptingInterface- Returns:
- Number of milliseconds since the epoch (Jan 1, 1970 00:00:00 UTC).
-
setSimulationTime
public void setSimulationTime(long time) Description copied from interface:IScriptingInterfaceSets the time of the application. The long value represents specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.- Specified by:
setSimulationTimein interfaceIScriptingInterface- Parameters:
time- Number of milliseconds since the epoch (Jan 1, 1970).
-
getSimulationTimeArr
public int[] getSimulationTimeArr()Description copied from interface:IScriptingInterfaceReturns the current UTC simulation time in an array.- Specified by:
getSimulationTimeArrin interfaceIScriptingInterface- Returns:
- The current simulation time in an array with the given indices.
- 0 - The year.
- 1 - The month, from 1 (January) to 12 (December).
- 2 - The day-of-month, from 1 to 31.
- 3 - The hour-of-day, from 0 to 23.
- 4 - The minute-of-hour, from 0 to 59.
- 5 - The second-of-minute, from 0 to 59.
- 6 - The millisecond-of-second, from 0 to 999.
-
startSimulationTime
public void startSimulationTime()Description copied from interface:IScriptingInterfaceStarts the simulation.- Specified by:
startSimulationTimein interfaceIScriptingInterface
-
stopSimulationTime
public void stopSimulationTime()Description copied from interface:IScriptingInterfaceStops the simulation time.- Specified by:
stopSimulationTimein interfaceIScriptingInterface
-
isSimulationTimeOn
public boolean isSimulationTimeOn()Description copied from interface:IScriptingInterfaceQueries whether the time is on or not.- Specified by:
isSimulationTimeOnin interfaceIScriptingInterface- Returns:
- True if the time is on, false otherwise.
-
setSimulationPace
public void setSimulationPace(double warp) Description copied from interface:IScriptingInterfaceDeprecated, useIScriptingInterface.setTimeWarp(double)instead.- Specified by:
setSimulationPacein interfaceIScriptingInterface
-
setSimulationPace
public void setSimulationPace(long warp) -
setTimeWarp
public void setTimeWarp(double warp) Description copied from interface:IScriptingInterfaceSets the simulation time warp factor.- Specified by:
setTimeWarpin interfaceIScriptingInterface- Parameters:
warp- The warp as a factor of real physical time pace. 2.0 sets the time to be twice as fast as real time.
-
setTimeWarp
public void setTimeWarp(long warp) -
setTargetTime
public void setTargetTime(long ms) Description copied from interface:IScriptingInterfaceSets a time bookmark in the global clock that, when reached, the clock automatically stops.- Specified by:
setTargetTimein interfaceIScriptingInterface- Parameters:
ms- The time as the number of milliseconds since the epoch (Jan 1, 1970).
-
setTargetTime
public void setTargetTime(int year, int month, int day, int hour, int min, int sec, int millisec) Description copied from interface:IScriptingInterfaceSets a time bookmark in the global clock that, when reached, the clock automatically stops.- Specified by:
setTargetTimein interfaceIScriptingInterface- Parameters:
year- The year to represent.month- The month-of-year to represent, from 1 (January) to 12 (December).day- The day-of-month to represent, from 1 to 31.hour- The hour-of-day to represent, from 0 to 23.min- The minute-of-hour to represent, from 0 to 59.sec- The second-of-minute to represent, from 0 to 59.millisec- The millisecond-of-second, from 0 to 999.
-
unsetTargetTime
public void unsetTargetTime()Description copied from interface:IScriptingInterfaceUnsets the target time bookmark from the global clock, if any.- Specified by:
unsetTargetTimein interfaceIScriptingInterface
-
setStarBrightnessPower
public void setStarBrightnessPower(float power) Description copied from interface:IScriptingInterfaceSets the star brightness power profile value. This allows for adjusting the shape of the curve:brightness = brightness^power. Default value is 0.6.- Specified by:
setStarBrightnessPowerin interfaceIScriptingInterface- Parameters:
power- The power value.
-
setStarGlowFactor
public void setStarGlowFactor(float glowFactor) Description copied from interface:IScriptingInterfaceSets 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.- Specified by:
setStarGlowFactorin interfaceIScriptingInterface- Parameters:
glowFactor- The new glow factor value.
-
getStarBrightness
public float getStarBrightness()Description copied from interface:IScriptingInterfaceGets the star brightness value.- Specified by:
getStarBrightnessin interfaceIScriptingInterface- Returns:
- The brightness value, between 0 and 100.
-
setStarBrightness
public void setStarBrightness(float brightness) Description copied from interface:IScriptingInterfaceSets the star brightness value.- Specified by:
setStarBrightnessin interfaceIScriptingInterface- Parameters:
brightness- The brightness value, between 0 and 100.
-
setStarBrightness
public void setStarBrightness(int brightness) -
getStarSize
public float getStarSize()Description copied from interface:IScriptingInterfaceGets the current star size value in pixels.- Specified by:
getStarSizein interfaceIScriptingInterface- Returns:
- The size value, in pixels.
-
setStarSize
public void setStarSize(float size) Description copied from interface:IScriptingInterfaceSets the size of the rasterized stars, in pixels.- Specified by:
setStarSizein interfaceIScriptingInterface- Parameters:
size- The size value in pixels, betweenConstants.MIN_STAR_POINT_SIZEandConstants.MAX_STAR_POINT_SIZE.
-
setStarSize
public void setStarSize(int size) -
getStarMinOpacity
public float getStarMinOpacity()Description copied from interface:IScriptingInterfaceGets the minimum star opacity.- Specified by:
getStarMinOpacityin interfaceIScriptingInterface- Returns:
- The minimum opacity value.
-
setStarMinOpacity
public void setStarMinOpacity(float minOpacity) Description copied from interface:IScriptingInterfaceSets the minimum star opacity.- Specified by:
setStarMinOpacityin interfaceIScriptingInterface- Parameters:
minOpacity- The minimum opacity value, betweenConstants.MIN_STAR_MIN_OPACITYandConstants.MAX_STAR_MIN_OPACITY.
-
getMinStarOpacity
public float getMinStarOpacity() -
setMinStarOpacity
public void setMinStarOpacity(float minOpacity) -
setMinStarOpacity
public void setMinStarOpacity(int opacity) -
setStarTextureIndex
public void setStarTextureIndex(int index) Description copied from interface:IScriptingInterfaceSets the star texture index, in [1, 4]1 - horizontal spike 2 - god rays 3 - horizontal and vertical spikes 4 - simple radial profile
- Specified by:
setStarTextureIndexin interfaceIScriptingInterface- Parameters:
index- The new star texture index
-
setStarGroupNearestNumber
public void setStarGroupNearestNumber(int n) Description copied from interface:IScriptingInterfaceSets the number of nearest stars to be processed for each star group. This will limit the number of stars that are rendered with billboards, labels and velocity vectors.- Specified by:
setStarGroupNearestNumberin interfaceIScriptingInterface- Parameters:
n- The new number of nearest stars
-
setStarGroupBillboard
public void setStarGroupBillboard(boolean flag) Description copied from interface:IScriptingInterfaceEnable or disable the rendering of close stars as billboards.- Specified by:
setStarGroupBillboardin interfaceIScriptingInterface- Parameters:
flag- The state flag
-
setOrbitSolidAngleThreshold
public void setOrbitSolidAngleThreshold(float angleDeg) Description copied from interface:IScriptingInterfaceSets the solid angle below which orbits fade and disappear.- Specified by:
setOrbitSolidAngleThresholdin interfaceIScriptingInterface- Parameters:
angleDeg- The threshold angle in degrees
-
setProjectionYaw
public void setProjectionYaw(float yaw) Description copied from interface:IScriptingInterfaceSets the projection yaw angle (if this is a slave instance), in degrees. The yaw angle turns the camera to the right. This function is intended for multi-projector setups, to configure slaves without restarting Gaia Sky.- Specified by:
setProjectionYawin interfaceIScriptingInterface- Parameters:
yaw- The yaw angle in degrees.
-
setProjectionPitch
public void setProjectionPitch(float pitch) Description copied from interface:IScriptingInterfaceSets the projection pitch angle (if this is a slave instance), in degrees. The pitch angle turns the camera up. This function is intended for multi-projector setups, to configure slaves without restarting Gaia Sky.- Specified by:
setProjectionPitchin interfaceIScriptingInterface- Parameters:
pitch- The pitch angle in degrees.
-
setProjectionRoll
public void setProjectionRoll(float roll) Description copied from interface:IScriptingInterfaceSets the projection roll angle (if this is a slave instance), in degrees. The roll angle rolls the camera clockwise. This function is intended for multi-projector setups, to configure slaves without restarting Gaia Sky.- Specified by:
setProjectionRollin interfaceIScriptingInterface- Parameters:
roll- The roll angle in degrees.
-
setProjectionFov
public void setProjectionFov(float newFov) Description copied from interface:IScriptingInterfaceSame asIScriptingInterface.setFov(float), but bypassing the restriction of an active projection in the slave (slaves that have an active projection do not accept fov modification events).- Specified by:
setProjectionFovin interfaceIScriptingInterface- Parameters:
newFov- The field of view angle.
-
setLimitFps
public void setLimitFps(double limitFps) Description copied from interface:IScriptingInterfaceLimits the frame rate of Gaia Sky.- Specified by:
setLimitFpsin interfaceIScriptingInterface- Parameters:
limitFps- The new maximum frame rate as a double-precision floating point number. Set zero or negative to unlimited.
-
setLimitFps
public void setLimitFps(int limitFps) Description copied from interface:IScriptingInterfaceLimits the frame rate of Gaia Sky.- Specified by:
setLimitFpsin interfaceIScriptingInterface- Parameters:
limitFps- The new maximum frame rate as an integer number. Set zero or negative to unlimited.
-
configureScreenshots
Description copied from interface:IScriptingInterfaceConfigures the screenshot system, setting the resolution of the images, the output directory and the image name prefix.- Specified by:
configureScreenshotsin interfaceIScriptingInterface- Parameters:
width- Width of images.height- Height of images.directory- The output directory path.namePrefix- The file name prefix.
-
setScreenshotsMode
Description copied from interface:IScriptingInterfaceSets 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 usingIScriptingInterface.configureScreenshots(int, int, String, String)and it does not draw the UI.- Specified by:
setScreenshotsModein interfaceIScriptingInterface- Parameters:
screenshotMode- The screenshot mode. 'simple' or 'advanced'.
-
saveScreenshot
public void saveScreenshot()Description copied from interface:IScriptingInterfaceTakes a screenshot of the current frame and saves it to the configured location (seeIScriptingInterface.configureScreenshots(int, int, String, String)).- Specified by:
saveScreenshotin interfaceIScriptingInterface
-
takeScreenshot
public void takeScreenshot()Description copied from interface:IScriptingInterfaceAlias toIScriptingInterface.saveScreenshot().- Specified by:
takeScreenshotin interfaceIScriptingInterface
-
configureFrameOutput
public void configureFrameOutput(int width, int height, int fps, String directory, String namePrefix) Description copied from interface:IScriptingInterfaceConfigures 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'.- Specified by:
configureFrameOutputin interfaceIScriptingInterface- 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
public void configureFrameOutput(int width, int height, double fps, String directory, String namePrefix) Description copied from interface:IScriptingInterfaceConfigures 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'.- Specified by:
configureFrameOutputin interfaceIScriptingInterface- 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.
-
configureRenderOutput
public void configureRenderOutput(int width, int height, int fps, String directory, String namePrefix) Description copied from interface:IScriptingInterfaceConfigures the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix.- Specified by:
configureRenderOutputin interfaceIScriptingInterface- 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
Description copied from interface:IScriptingInterfaceSets 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 usingIScriptingInterface.configureFrameOutput(int, int, int, String, String)and it does not draw the UI.- Specified by:
setFrameOutputModein interfaceIScriptingInterface- Parameters:
screenshotMode- The screenshot mode. 'simple' or 'advanced'.
-
isFrameOutputActive
public boolean isFrameOutputActive()Description copied from interface:IScriptingInterfaceIs the frame output system on?- Specified by:
isFrameOutputActivein interfaceIScriptingInterface- Returns:
- True if the render output is active.
-
isRenderOutputActive
public boolean isRenderOutputActive()Description copied from interface:IScriptingInterfaceIs the frame output system on?- Specified by:
isRenderOutputActivein interfaceIScriptingInterface- Returns:
- True if the frame output is active.
-
getFrameOutputFps
public double getFrameOutputFps()Description copied from interface:IScriptingInterfaceGets the current FPS setting in the frame output system.- Specified by:
getFrameOutputFpsin interfaceIScriptingInterface- Returns:
- The FPS setting.
-
getRenderOutputFps
public double getRenderOutputFps()Description copied from interface:IScriptingInterfaceGets the current FPS setting in the frame output system.- Specified by:
getRenderOutputFpsin interfaceIScriptingInterface- Returns:
- The FPS setting.
-
setFrameOutput
public void setFrameOutput(boolean active) Description copied from interface:IScriptingInterfaceActivates or deactivates the image output system. If called with true, the system starts outputting images right away.- Specified by:
setFrameOutputin interfaceIScriptingInterface- Parameters:
active- Whether to activate or deactivate the frame output system.
-
getObject
Description copied from interface:IScriptingInterfaceGets an object from the scene graph bynameor id (HIP, TYC, Gaia SourceId).- Specified by:
getObjectin interfaceIScriptingInterface- Parameters:
name- The name or id (HIP, TYC, Gaia SourceId) of the object.- Returns:
- The object as a
FocusView, or null if it does not exist.
-
getObject
Description copied from interface:IScriptingInterfaceGets an object bynameor id (HIP, TYC, Gaia SourceID), optionally waiting until the object is available, with a timeout.- Specified by:
getObjectin interfaceIScriptingInterface- 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
Description copied from interface:IScriptingInterfaceGets aVertsobject from the scene byname.- Specified by:
getLineObjectin interfaceIScriptingInterface- Parameters:
name- The name of the line object.- Returns:
- The line object as a
VertsView, or null if it does not exist.
-
getLineObject
Description copied from interface:IScriptingInterfaceGets aVertsobject from the scene byname.- Specified by:
getLineObjectin interfaceIScriptingInterface- Parameters:
name- The name of the line object.timeoutSeconds- The timeout in seconds to wait until returning. If negative, it waits indefinitely.- Returns:
- The line object as a
VertsView, or null if it does not exist.
-
getEntity
-
getEntity
-
setObjectSizeScaling
Description copied from interface:IScriptingInterfaceSets the given size scaling factor to the object identified byname. This method will only work with model objects such as planets, asteroids, satellites, etc. It will not work with orbits, stars or any other types.Also, use this with caution, as scaling the size of objects can have unintended side effects, and remember to set the scaling back to 1.0 at the end of your script.
- Specified by:
setObjectSizeScalingin interfaceIScriptingInterface- Parameters:
name- The name or id of the object.scalingFactor- The scaling factor to scale the size of that object.
-
setOrbitCoordinatesScaling
Description copied from interface:IScriptingInterfaceSets 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
IScriptingInterface.refreshAllOrbits()orIScriptingInterface.refreshObjectOrbit(String)right after this call in order to immediately refresh the scaled orbits.- Specified by:
setOrbitCoordinatesScalingin interfaceIScriptingInterface- 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.
-
refreshAllOrbits
public void refreshAllOrbits()Description copied from interface:IScriptingInterfaceForces all orbits to refresh immediately.- Specified by:
refreshAllOrbitsin interfaceIScriptingInterface
-
forceUpdateScene
public void forceUpdateScene()Description copied from interface:IScriptingInterfaceForcefully triggers an update of the scene and the positions of all the objects. Useful to call after operations that modify the position of objects.- Specified by:
forceUpdateScenein interfaceIScriptingInterface
-
refreshObjectOrbit
Description copied from interface:IScriptingInterfaceForces the refresh of the orbit of the object identified byname. This should generally be called after a call toIScriptingInterface.setOrbitCoordinatesScaling(String, double).- Specified by:
refreshObjectOrbitin interfaceIScriptingInterface
-
getObjectRadius
Description copied from interface:IScriptingInterfaceGets the size of the object identified byname, in Km, by name or id (HIP, TYC, sourceId).- Specified by:
getObjectRadiusin interfaceIScriptingInterface- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.- Returns:
- The radius of the object in Km. If the object identifed by name or id (HIP, TYC, sourceId). does not exist, it returns a negative value.
-
goToObject
Description copied from interface:IScriptingInterfaceRuns a seamless trip to the object with the namefocusNameuntil the object view angle is20 degrees.- Specified by:
goToObjectin interfaceIScriptingInterface- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.
-
goToObject
Description copied from interface:IScriptingInterfaceRuns a seamless trip to the object with the namefocusNameuntil the object view angleviewAngleis met. If angle is negative, the default angle is20 degrees.- Specified by:
goToObjectin interfaceIScriptingInterface- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.angle- The target solid angle of the object, in degrees. The angle gets larger and larger as we approach the object.
-
goToObject
Description copied from interface:IScriptingInterfaceRuns 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. SeeIScriptingInterface.setTurningCameraSpeed(float).- Specified by:
goToObjectin interfaceIScriptingInterface- 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.
-
goToObject
-
goToObject
-
goToObject
-
goToObject
-
goToObject
public void goToObject(com.badlogic.ashley.core.Entity object, double solidAngle, int waitTimeSeconds, AtomicBoolean stop) -
goToObjectInstant
Description copied from interface:IScriptingInterfaceSets the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.- Specified by:
goToObjectInstantin interfaceIScriptingInterface- Parameters:
name- The name of the new focus object.
-
landOnObject
Description copied from interface:IScriptingInterfaceLands 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.- Specified by:
landOnObjectin interfaceIScriptingInterface- Parameters:
name- The proper name of the object.
-
landAtObjectLocation
Description copied from interface:IScriptingInterfaceLands on the object with the givenname, if it is a planet or moon, at the location with the given name, if it exists.- Specified by:
landAtObjectLocationin interfaceIScriptingInterface- Parameters:
name- The proper name of the object.locationName- The name of the location to land on
-
landAtObjectLocation
-
landAtObjectLocation
public void landAtObjectLocation(com.badlogic.ashley.core.Entity object, String locationName, AtomicBoolean stop) -
landAtObjectLocation
Description copied from interface:IScriptingInterfaceLands on the object with the givenname, if it is a planet or moon, at the location specified in by [latitude, longitude], in degrees.- Specified by:
landAtObjectLocationin interfaceIScriptingInterface- Parameters:
name- The proper name of the object.longitude- The location longitude, in degrees.latitude- The location latitude, in degrees.
-
getDistanceTo
Description copied from interface:IScriptingInterfaceReturns the distance to the surface of the object identified with the givenname. If the object is an abstract node or does not exist, it returns a negative distance.- Specified by:
getDistanceToin interfaceIScriptingInterface- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.- Returns:
- The distance to the object in km if it exists, a negative value otherwise.
-
getStarParameters
Description copied from interface:IScriptingInterfaceReturns the star parameters given its identifier or name, if the star exists and it is loaded.- Specified by:
getStarParametersin interfaceIScriptingInterface- Parameters:
id- The star identifier or name.- Returns:
- An array with (ra [deg], dec [deg], parallax [mas], pmra [mas/yr], pmdec [mas/yr], radvel [km/s], appmag [mag], red [0,1], green [0,1], blue [0,1]) if the star exists and is loaded, null otherwise.
-
getObjectPosition
Description copied from interface:IScriptingInterfaceGets the current position of the object identified bynamein the internal coordinate system and internal units. If the object does not exist, it returns null.- Specified by:
getObjectPositionin interfaceIScriptingInterface- Parameters:
name- The name or id (HIP, TYC, sourceId) of the object.- Returns:
- A 3-vector with the object's position in the internal reference system.
-
getObjectPredictedPosition
Description copied from interface:IScriptingInterfaceGets 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.- Specified by:
getObjectPredictedPositionin interfaceIScriptingInterface- 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.
-
setObjectPosition
Description copied from interface:IScriptingInterfaceSets 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.- Specified by:
setObjectPositionin interfaceIScriptingInterface- Parameters:
name- The name of the object.position- The position in the internal reference system and internal units.
-
setObjectPosition
-
setObjectPosition
Description copied from interface:IScriptingInterfaceSets 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.- Specified by:
setObjectPositionin interfaceIScriptingInterface- Parameters:
object- The object in a focus view wrapper.position- The position in the internal reference system and internal units.
-
setObjectPosition
-
setObjectPosition
public void setObjectPosition(com.badlogic.ashley.core.Entity object, double[] position) Description copied from interface:IScriptingInterfaceSets 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.- Specified by:
setObjectPositionin interfaceIScriptingInterface- Parameters:
object- The object entity.position- The position in the internal reference system and internal units.
-
setObjectPosition
-
setGuiScrollPosition
public void setGuiScrollPosition(float pixelY) Description copied from interface:IScriptingInterfaceSets the vertical scroll position in the GUI.- Specified by:
setGuiScrollPositionin interfaceIScriptingInterface- Parameters:
pixelY- The pixel to set the scroll position to.
-
setGuiScrollPosition
public void setGuiScrollPosition(int pixelY) -
enableGui
public void enableGui()Description copied from interface:IScriptingInterfaceEnables the GUI rendering. This makes the user interface to be rendered and updated again if it was previously disabled. Otherwise, it has no effect.- Specified by:
enableGuiin interfaceIScriptingInterface
-
disableGui
public void disableGui()Description copied from interface:IScriptingInterfaceDisables the GUI rendering. This causes the user interface to no longer be rendered or updated.- Specified by:
disableGuiin interfaceIScriptingInterface
-
getGuiScaleFactor
public float getGuiScaleFactor()Description copied from interface:IScriptingInterfaceGets the current scale factor applied to the UI.- Specified by:
getGuiScaleFactorin interfaceIScriptingInterface- Returns:
- The scale factor.
-
displayMessageObject
public void displayMessageObject(int id, String message, float x, float y, float r, float g, float b, float a, float fontSize) Description copied from interface:IScriptingInterfaceAdds a new one-line message in the screen with the given id and the given coordinates. If an object already exists with the given id, it is removed. However, if a message object already exists with the same id, its properties are updated. The messages placed with this method will not appear in the screenshots/frames in advanced mode. This is intended for running interactively only.- Specified by:
displayMessageObjectin interfaceIScriptingInterface- Parameters:
id- A unique identifier, used to identify this message when you want to remove it.message- The string message, to be displayed in one line. But explicit newline breaks the line.x- The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.y- The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.r- The red component of the color in [0,1].g- The green component of the color in [0,1].b- The blue component of the color in [0,1].a- The alpha component of the color in [0,1].fontSize- The size of the font. The system will use the existing font closest to the chosen size and scale it up or down to match the desired size. Scaling can cause artifacts, so to ensure the best font quality, stick to the existing sizes.
-
displayMessageObject
public void displayMessageObject(int id, String message, double x, double y, double[] color, double fontSize) Description copied from interface:IScriptingInterfaceSame asIScriptingInterface.displayImageObject(int, String, float, float, float, float, float, float)but using an array for the color instead of giving each component separately.- Specified by:
displayMessageObjectin interfaceIScriptingInterface- Parameters:
id- A unique identifier, used to identify this message when you want to remove it.message- The string message, to be displayed in one line. But explicit newline breaks the line.x- The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.y- The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.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.
-
displayMessageObject
-
displayMessageObject
public void displayMessageObject(int id, String message, float x, float y, float r, float g, float b, float a, int fontSize) -
displayTextObject
public void displayTextObject(int id, String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, float fontSize) Description copied from interface:IScriptingInterfaceAdds a new multi-line text in the screen with the given id, coordinates and size. If an object already exists with the given id, it is removed. However, if a text object already exists with the same id, its properties are updated. The texts placed with this method will not appear in the screenshots/frames in advanced mode. This is intended for running interactively only.- Specified by:
displayTextObjectin interfaceIScriptingInterface- Parameters:
id- A unique identifier, used to identify this message when you want to remove it.text- The string message, to be displayed line-wrapped in the box defined by maxWidth and maxHeight. Explicit newline still breaks the line.x- The x coordinate of the bottom-left corner, in [0,1] from left to right. This is not resolution-dependant.y- The y coordinate of the bottom-left corner, in [0,1] from bottom to top. This is not resolution-dependant.maxWidth- The maximum width in screen percentage [0,1]. Set to 0 to let the system decide.maxHeight- The maximum height in screen percentage [0,1]. Set to 0 to let the system decide.r- The red component of the color in [0,1].g- The green component of the color in [0,1].b- The blue component of the color in [0,1].a- The alpha component of the color in [0,1].fontSize- The size of the font. The system will use the existing font closest to the chosen size.
-
displayTextObject
public void displayTextObject(int id, String text, float x, float y, float maxWidth, float maxHeight, float r, float g, float b, float a, int fontSize) -
displayImageObject
public void displayImageObject(int id, String path, float x, float y, float r, float g, float b, float a) Description copied from interface:IScriptingInterfaceAdds a new image object at the given coordinates. If an object already exists with the given id, it is removed. However, if an image object already exists with the same id, its properties are updated.
Warning: This method will only work in the asynchronous mode. Run the script with the "asynchronous" check box activated!- Specified by:
displayImageObjectin interfaceIScriptingInterface- Parameters:
id- A unique identifier, used to identify this message when you want to remove it.path- The path to the image. It can either be an absolute path (not recommended) or a path relative to the Gaia Sky 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
Description copied from interface:IScriptingInterfaceSame asIScriptingInterface.displayImageObject(int, String, float, float, float, float, float, float)but using a double array for the color instead of each component separately.- Specified by:
displayImageObjectin interfaceIScriptingInterface- Parameters:
id- A unique identifier, used to identify this message when you want to remove it.path- The path to the image. It can either be an absolute path (not recommended) or a path relative to the Gaia Sky 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].
-
displayImageObject
-
displayImageObject
Description copied from interface:IScriptingInterfaceAdds a new image object at the given coordinates. If an object already exists with the given id, it is removed. However, if an image object already exists with the same id, its properties are updated.
The messages placed with this method will not appear in the screenshots/frames in advanced mode. This is intended for running interactively only.- Specified by:
displayImageObjectin interfaceIScriptingInterface- Parameters:
id- A unique identifier, used to identify this message when you want to remove it.path- The path to the image. It can either be an absolute path (not recommended) or a path relative to the Gaia Sky 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.
-
removeAllObjects
public void removeAllObjects()Description copied from interface:IScriptingInterfaceRemoves all objects.- Specified by:
removeAllObjectsin interfaceIScriptingInterface
-
removeObject
public void removeObject(int id) Description copied from interface:IScriptingInterfaceRemoves the item with the given id.- Specified by:
removeObjectin interfaceIScriptingInterface- Parameters:
id- Integer with the integer id of the object to remove.
-
removeObjects
public void removeObjects(int[] ids) Description copied from interface:IScriptingInterfaceRemoves the items with the given ids. They can either messages, images or whatever else.- Specified by:
removeObjectsin interfaceIScriptingInterface- Parameters:
ids- Vector with the integer ids of the objects to remove
-
removeObjects
-
maximizeInterfaceWindow
public void maximizeInterfaceWindow()Description copied from interface:IScriptingInterfaceMaximizes the interface window.- Specified by:
maximizeInterfaceWindowin interfaceIScriptingInterface
-
minimizeInterfaceWindow
public void minimizeInterfaceWindow()Description copied from interface:IScriptingInterfaceMinimizes the interface window.- Specified by:
minimizeInterfaceWindowin interfaceIScriptingInterface
-
setGuiPosition
public void setGuiPosition(float x, float y) Description copied from interface:IScriptingInterfaceMoves the interface window to a new position.- Specified by:
setGuiPositionin interfaceIScriptingInterface- Parameters:
x- The new x coordinate of the new top-left corner of the window, in [0,1] from left to right.y- The new y coordinate of the new top-left corner of the window, in [0,1] from bottom to top.
-
setGuiPosition
public void setGuiPosition(int x, int y) -
setGuiPosition
public void setGuiPosition(float x, int y) -
setGuiPosition
public void setGuiPosition(int x, float y) -
waitForInput
public void waitForInput()Description copied from interface:IScriptingInterfaceBlocks the execution until any kind of input (keyboard, mouse, etc.) is received.- Specified by:
waitForInputin interfaceIScriptingInterface
-
waitForEnter
public void waitForEnter()Description copied from interface:IScriptingInterfaceBlocks the execution until the Enter key is pressed.- Specified by:
waitForEnterin interfaceIScriptingInterface
-
waitForInput
public void waitForInput(int keyCode) Description copied from interface:IScriptingInterfaceBlocks the execution until the given key or button is pressed.- Specified by:
waitForInputin interfaceIScriptingInterface- Parameters:
keyCode- The key or button code. Please seeInput.
-
getScreenWidth
public int getScreenWidth()Description copied from interface:IScriptingInterfaceReturns the screen width in pixels.- Specified by:
getScreenWidthin interfaceIScriptingInterface- Returns:
- The screen width in pixels.
-
getScreenHeight
public int getScreenHeight()Description copied from interface:IScriptingInterfaceReturns the screen height in pixels.- Specified by:
getScreenHeightin interfaceIScriptingInterface- Returns:
- The screen height in pixels.
-
getPositionAndSizeGui
Description copied from interface:IScriptingInterfaceReturns the size and position of the GUI element that goes by the given name or null if such element does not exist. Warning> This will only work in asynchronous mode.- Specified by:
getPositionAndSizeGuiin interfaceIScriptingInterface- Parameters:
name- The name of the gui element.- Returns:
- A vector of floats with the position (0, 1) of the bottom left corner in pixels from the bottom-left of the screen and the size (2, 3) in pixels of the element.
-
expandGuiComponent
Description copied from interface:IScriptingInterfaceExpands the component with the given name.- Specified by:
expandGuiComponentin interfaceIScriptingInterface- Parameters:
name- The name, as in `CameraComponent` or `ObjectsComponent`
-
collapseGuiComponent
Description copied from interface:IScriptingInterfaceCollapses the component with the given name.- Specified by:
collapseGuiComponentin interfaceIScriptingInterface- Parameters:
name- The name, as in `CameraComponent` or `ObjectsComponent`
-
getVersionNumber
Description copied from interface:IScriptingInterfaceReturns the version number string.- Specified by:
getVersionNumberin interfaceIScriptingInterface- Returns:
- The version number string.
-
waitFocus
Description copied from interface:IScriptingInterfaceBlocks the script until the focus is the object indicated by the name. There is an optional time out.- Specified by:
waitFocusin interfaceIScriptingInterface- Parameters:
name- The name of the focus to wait for.timeoutMs- Timeout in ms to wait. Set negative to disable timeout.- Returns:
- True if the timeout ran out. False otherwise.
-
setCameraRecorderFps
public void setCameraRecorderFps(double targetFps) Description copied from interface:IScriptingInterfaceSets the target frame rate of the camera recorder. This will cap the frame rate of Gaia Sky to this value while the camera is recording. When playing the camera file back, you are responsible to set the right frame rate.- Specified by:
setCameraRecorderFpsin interfaceIScriptingInterface- Parameters:
targetFps- The target frame rate for the camera recorder.
-
preloadTexture
Description copied from interface:IScriptingInterfacePre-loads the given image as a texture for later use. The texture will be cached for later use.- Specified by:
preloadTexturein interfaceIScriptingInterface- Parameters:
path- The path of the image file to preload.
-
getAssetsLocation
Description copied from interface:IScriptingInterfaceGets the location of the assets folder.- Specified by:
getAssetsLocationin interfaceIScriptingInterface
-
preloadTextures
Description copied from interface:IScriptingInterfacePre-loads the given images as textures for later use. They will be cached for the subsequent uses.- Specified by:
preloadTexturesin interfaceIScriptingInterface- Parameters:
paths- The texture paths.
-
startRecordingCameraPath
public void startRecordingCameraPath()Description copied from interface:IScriptingInterfaceStarts 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.- Specified by:
startRecordingCameraPathin interfaceIScriptingInterface
-
startRecordingCameraPath
Description copied from interface:IScriptingInterfaceStarts recording a camera path with the given filename. The filename is without extension or path. The final path with the camera file, after invokingIScriptingInterface.stopRecordingCameraPath(), is:
IScriptingInterface.getDefaultCameraDir()+ "/" + filename + ".gsc"
This command has no effect if the camera is already being recorded.- Specified by:
startRecordingCameraPathin interfaceIScriptingInterface
-
stopRecordingCameraPath
public void stopRecordingCameraPath()Description copied from interface:IScriptingInterfaceStops the current camera recording. This command has no effect if the camera was not being recorded.- Specified by:
stopRecordingCameraPathin interfaceIScriptingInterface
-
playCameraPath
Description copied from interface:IScriptingInterface- Specified by:
playCameraPathin interfaceIScriptingInterface
-
runCameraPath
Description copied from interface:IScriptingInterfaceRuns a .gsc camera path file and returns immediately. This function accepts a boolean indicating whether to wait for the camera path file to finish or not.- Specified by:
runCameraPathin interfaceIScriptingInterface- Parameters:
file- The path to the camera file. Path is relative to the application's root directory or absolute.sync- If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
-
playCameraPath
Description copied from interface:IScriptingInterface- Specified by:
playCameraPathin interfaceIScriptingInterface
-
runCameraPath
Description copied from interface:IScriptingInterfaceRuns a .gsc camera path file and returns immediately. This function does not wait for the camera file to finish playing.- Specified by:
runCameraPathin interfaceIScriptingInterface- Parameters:
file- The path to the camera file. Path is relative to the application's root directory or absolute.
-
runCameraRecording
Description copied from interface:IScriptingInterfaceRuns the camera recording file with the given path. Does not wait for the camera file to finish playing.- Specified by:
runCameraRecordingin interfaceIScriptingInterface- Parameters:
file- The path of the camera file. Path is relative to the application's root directory or absolute.
-
cameraTransitionKm
public void cameraTransitionKm(double[] camPos, double[] camDir, double[] camUp, double seconds) Description copied from interface:IScriptingInterfaceSame asIScriptingInterface.cameraTransition(double[], double[], double[], double)but the camera position is given in Km.- Specified by:
cameraTransitionKmin interfaceIScriptingInterface- Parameters:
camPos- The target camera position in Km.camDir- The target camera direction vector.camUp- The target camera up vector.seconds- The duration of the transition in seconds.
-
cameraTransitionKm
-
cameraTransitionKm
-
cameraTransition
public void cameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds) Description copied from interface:IScriptingInterfaceCreates a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds. This function waits for the transition to finish and then returns control to the script. This function will put the camera in free mode, so make sure to change it afterwards if you need to. Also, this only works with the natural camera.- Specified by:
cameraTransitionin interfaceIScriptingInterface- Parameters:
camPos- The target camera position in the internal reference system.camDir- The target camera direction in the internal reference system.camUp- The target camera up in the internal reference system.seconds- The duration of the transition in seconds.
-
cameraTransition
public void cameraTransition(double[] camPos, double[] camDir, double[] camUp, long seconds) -
cameraTransition
-
cameraTransition
-
cameraTransition
public void cameraTransition(double[] camPos, double[] camDir, double[] camUp, double seconds, boolean sync) Description copied from interface:IScriptingInterfaceCreates a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} in the given number of seconds. Optionally, the transition may be run synchronously or asynchronously to the current script. This function will put the camera in free mode, so make sure to change it afterwards if you need to. Also, this only works with the natural camera.- Specified by:
cameraTransitionin interfaceIScriptingInterface- Parameters:
camPos- The target camera position in the internal reference system.camDir- The target camera direction in the internal reference system.camUp- The target camera up in the internal reference system.seconds- The duration of the transition in seconds.sync- If true, the call waits for the transition to finish before returning, otherwise it returns immediately
-
cameraTransition
-
cameraTransition
-
sleep
public void sleep(float seconds) Description copied from interface:IScriptingInterfaceSleeps for the given number of seconds in the application time (FPS), so if we are capturing frames and the frame rate is set to 30 FPS, the command sleep(1) will put the script to sleep for 30 frames.- Specified by:
sleepin interfaceIScriptingInterface- Parameters:
seconds- The number of seconds to wait.
-
sleep
public void sleep(int seconds) -
sleepFrames
public void sleepFrames(long frames) Description copied from interface:IScriptingInterfaceSleeps 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.- Specified by:
sleepFramesin interfaceIScriptingInterface- Parameters:
frames- The number of frames to wait.
-
galacticToInternalCartesian
public double[] galacticToInternalCartesian(double l, double b, double r) Description copied from interface:IScriptingInterfaceConverts galactic coordinates to the internal cartesian coordinate system.- Specified by:
galacticToInternalCartesianin interfaceIScriptingInterface- Parameters:
l- The galactic longitude in degrees.b- The galactic latitude in degrees.r- The distance in Km.- Returns:
- An array of doubles containing
[x, y, z]in the internal reference system, in internal units.
-
galacticToInternalCartesian
public double[] galacticToInternalCartesian(int l, int b, int r) -
eclipticToInternalCartesian
public double[] eclipticToInternalCartesian(double l, double b, double r) Description copied from interface:IScriptingInterfaceConverts ecliptic coordinates to the internal cartesian coordinate system.- Specified by:
eclipticToInternalCartesianin interfaceIScriptingInterface- Parameters:
l- The ecliptic longitude in degrees.b- The ecliptic latitude in degrees.r- The distance in Km.- Returns:
- An array of doubles containing
[x, y, z]in the internal reference system, in internal units.
-
eclipticToInternalCartesian
public double[] eclipticToInternalCartesian(int l, int b, int r) -
equatorialToInternalCartesian
public double[] equatorialToInternalCartesian(double ra, double dec, double r) Description copied from interface:IScriptingInterfaceConverts equatorial coordinates to the internal cartesian coordinate system.- Specified by:
equatorialToInternalCartesianin interfaceIScriptingInterface- Parameters:
ra- The right ascension in degrees.dec- The declination in degrees.r- The distance in Km.- Returns:
- An array of doubles containing
[x, y, z]in the internal reference system, in internal units.
-
equatorialToInternalCartesian
public double[] equatorialToInternalCartesian(int ra, int dec, int r) -
internalCartesianToEquatorial
public double[] internalCartesianToEquatorial(double x, double y, double z) Description copied from interface:IScriptingInterfaceConverts internal cartesian coordinates to equatorial[ra, dec, distance]coordinates.- Specified by:
internalCartesianToEquatorialin interfaceIScriptingInterface- Parameters:
x- The x component, in any distance units.y- The y component, in any distance units.z- The z component, in any distance units.- Returns:
- An array of doubles containing
[ra, dec, distance]withraanddecin degrees anddistancein the same distance units as the input position.
-
internalCartesianToEquatorial
public double[] internalCartesianToEquatorial(int x, int y, int z) -
equatorialCartesianToInternalCartesian
public double[] equatorialCartesianToInternalCartesian(double[] eq, double kmFactor) Description copied from interface:IScriptingInterfaceConverts regular cartesian coordinates, where XY is the equatorial plane, with X pointing to the vernal equinox (ra=0) and Y points to ra=90, and Z pointing to the celestial north pole (dec=90) to internal cartesian coordinates with internal units.- Specified by:
equatorialCartesianToInternalCartesianin interfaceIScriptingInterface- 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
-
equatorialCartesianToInternalCartesian
-
equatorialToGalactic
public double[] equatorialToGalactic(double[] eq) Description copied from interface:IScriptingInterfaceConverts equatorial cartesian coordinates (in the internal reference system) to galactic cartesian coordinates.- Specified by:
equatorialToGalacticin interfaceIScriptingInterface- Parameters:
eq- Vector with [x, y, z] equatorial cartesian coordinates- Returns:
- Vector with [x, y, z] galactic cartesian coordinates
-
equatorialToGalactic
-
equatorialToEcliptic
public double[] equatorialToEcliptic(double[] eq) Description copied from interface:IScriptingInterfaceConverts equatorial cartesian coordinates (in the internal reference system) to ecliptic cartesian coordinates.- Specified by:
equatorialToEclipticin interfaceIScriptingInterface- Parameters:
eq- Vector with [x, y, z] equatorial cartesian coordinates- Returns:
- Vector with [x, y, z] ecliptic cartesian coordinates
-
equatorialToEcliptic
-
galacticToEquatorial
public double[] galacticToEquatorial(double[] gal) Description copied from interface:IScriptingInterfaceConverts galactic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.- Specified by:
galacticToEquatorialin interfaceIScriptingInterface- Parameters:
gal- Vector with [x, y, z] galactic cartesian coordinates- Returns:
- Vector with [x, y, z] equatorial cartesian coordinates
-
galacticToEquatorial
-
eclipticToEquatorial
public double[] eclipticToEquatorial(double[] ecl) Description copied from interface:IScriptingInterfaceConverts ecliptic cartesian coordinates (in the internal reference system) to equatorial cartesian coordinates.- Specified by:
eclipticToEquatorialin interfaceIScriptingInterface- Parameters:
ecl- Vector with [x, y, z] ecliptic cartesian coordinates- Returns:
- Vector with [x, y, z] equatorial cartesian coordinates
-
eclipticToEquatorial
-
setBrightnessLevel
public void setBrightnessLevel(double level) Description copied from interface:IScriptingInterfaceSets the brightness level of the render system.- Specified by:
setBrightnessLevelin interfaceIScriptingInterface- Parameters:
level- The brightness level as a double precision floating point number in [-1,1]. The neutral value is 0.0.
-
setBrightnessLevel
public void setBrightnessLevel(long level) -
setContrastLevel
public void setContrastLevel(double level) Description copied from interface:IScriptingInterfaceSets the contrast level of the render system.- Specified by:
setContrastLevelin interfaceIScriptingInterface- Parameters:
level- The contrast level as a double precision floating point number in [0,2]. The neutral value is 1.0.
-
setContrastLevel
public void setContrastLevel(long level) -
setHueLevel
public void setHueLevel(double level) Description copied from interface:IScriptingInterfaceSets the hue level of the render system.- Specified by:
setHueLevelin interfaceIScriptingInterface- Parameters:
level- The hue level as a double precision floating point number in [0,2]. The neutral value is 1.0.
-
setHueLevel
public void setHueLevel(long level) -
setSaturationLevel
public void setSaturationLevel(double level) Description copied from interface:IScriptingInterfaceSets the saturation level of the render system.- Specified by:
setSaturationLevelin interfaceIScriptingInterface- Parameters:
level- The saturation level as a double precision floating point number in [0,2]. The neutral value is 1.0.
-
setSaturationLevel
public void setSaturationLevel(long level) -
setGammaCorrectionLevel
public void setGammaCorrectionLevel(double level) Description copied from interface:IScriptingInterfaceSets the gamma correction level.- Specified by:
setGammaCorrectionLevelin interfaceIScriptingInterface- Parameters:
level- The gamma correction level in [0,3] as a floating point number. The neutral value is 1.2.
-
setGammaCorrectionLevel
public void setGammaCorrectionLevel(long level) -
setHDRToneMappingType
Description copied from interface:IScriptingInterfaceSets the high dynamic range tone mapping algorithm type. The types can be:- "auto" - performs an automatic HDR tone mapping based on the current luminosity of the scene
- "exposure" - performs an exposure-based HDR tone mapping. The exposure value must be set with
IScriptingInterface.setExposureToneMappingLevel(double) - "aces" - performs the ACES tone mapping
- "uncharted" - performs the tone mapping implemented in Uncharted
- "filmic" - performs a filmic tone mapping
- "none" - no HDR tone mapping
- Specified by:
setHDRToneMappingTypein interfaceIScriptingInterface- Parameters:
type- The HDR tone mapping type. One of ["auto"|"exposure"|"aces"|"uncharted"|"filmic"|"none"].
-
setExposureToneMappingLevel
public void setExposureToneMappingLevel(double level) Description copied from interface:IScriptingInterfaceSets the exposure level.- Specified by:
setExposureToneMappingLevelin interfaceIScriptingInterface- Parameters:
level- The exposure level in [0,n]. Set to 0 to disable exposure tone mapping.
-
setExposureToneMappingLevel
public void setExposureToneMappingLevel(long level) -
setCubemapMode
Description copied from interface:IScriptingInterfaceEnables and disables the cubemap mode.- Specified by:
setCubemapModein interfaceIScriptingInterface- Parameters:
state- The boolean state. True to activate, false to deactivate.projection- The projection as a string.
-
setPanoramaMode
public void setPanoramaMode(boolean state) Description copied from interface:IScriptingInterfaceEnables or disables the panorama mode.- Specified by:
setPanoramaModein interfaceIScriptingInterface- Parameters:
state- The boolean state. True to activate, false to deactivate.
-
setReprojectionMode
Description copied from interface:IScriptingInterfaceSets 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"
- Specified by:
setReprojectionModein interfaceIScriptingInterface- Parameters:
mode- The re-projection mode, as a string.
-
setBackBufferScale
public void setBackBufferScale(float scale) Description copied from interface:IScriptingInterfaceSets the scaling factor for the back-buffer.- Specified by:
setBackBufferScalein interfaceIScriptingInterface- Parameters:
scale- The back-buffer scaling factor.
-
setIndexOfRefraction
public void setIndexOfRefraction(float ior) Description copied from interface:IScriptingInterfaceSets index of refraction of celestial sphere in orthosphere view mode.- Specified by:
setIndexOfRefractionin interfaceIScriptingInterface- Parameters:
ior- The index of refraction.
-
setPlanetariumMode
public void setPlanetariumMode(boolean state) Description copied from interface:IScriptingInterfaceEnables or disables the planetarium mode.- Specified by:
setPlanetariumModein interfaceIScriptingInterface- Parameters:
state- The boolean state. True to activate, false to deactivate.
-
setCubemapResolution
public void setCubemapResolution(int resolution) Description copied from interface:IScriptingInterfaceSets the resolution (width and height are the same) of each side of the frame buffers used to capture each of the 6 directions that go into the cubemap to construct the equirectangular image for the 360 mode. This should roughly be 1/3 of the output resolution at which the 360 mode are to be captured (or screen resolution).- Specified by:
setCubemapResolutionin interfaceIScriptingInterface- Parameters:
resolution- The resolution of each of the sides of the cubemap for the 360 mode.
-
setCubemapProjection
Description copied from interface:IScriptingInterfaceSets 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.
CubemapProjectionsfor possible values.- Specified by:
setCubemapProjectionin interfaceIScriptingInterface- Parameters:
projection- The projection, in ["equirectangular"|"cylindrical"|"hammer"|"orthographic"|"orthosphere"|"orthosphere_crossye"|"azimuthal_equidistant"].
-
setOrthosphereViewMode
public void setOrthosphereViewMode(boolean state) Description copied from interface:IScriptingInterfaceEnables or disables the orthosphere view mode.- Specified by:
setOrthosphereViewModein interfaceIScriptingInterface- Parameters:
state- The state, true to activate and false to deactivate.
-
setStereoscopicMode
public void setStereoscopicMode(boolean state) Description copied from interface:IScriptingInterfaceEnables and disables the stereoscopic mode.- Specified by:
setStereoscopicModein interfaceIScriptingInterface- Parameters:
state- The boolean state. True to activate, false to deactivate.
-
setStereoscopicProfile
public void setStereoscopicProfile(int index) Description copied from interface:IScriptingInterfaceChanges the stereoscopic profile.- Specified by:
setStereoscopicProfilein interfaceIScriptingInterface- Parameters:
index- The index of the new profile:- 0 - VR_HEADSET
- 1 - HD_3DTV
- 2 - CROSSEYE
- 3 - PARALLEL_VIEW
- 4 - ANAGLYPHIC (red-cyan)
-
getCurrentFrameNumber
public long getCurrentFrameNumber()Description copied from interface:IScriptingInterfaceGets the current frame number. Useful for timing actions in scripts.- Specified by:
getCurrentFrameNumberin interfaceIScriptingInterface- Returns:
- The current frame number.
-
setLensFlare
public void setLensFlare(boolean state) Description copied from interface:IScriptingInterfaceEnables or deisables the lens flare effect.- Specified by:
setLensFlarein interfaceIScriptingInterface- Parameters:
state- Activate (true) or deactivate (false).
-
setMotionBlur
public void setMotionBlur(boolean state) Description copied from interface:IScriptingInterfaceEnables or disables the motion blur effect.- Specified by:
setMotionBlurin interfaceIScriptingInterface- Parameters:
state- Activate (true) or deactivate (false).
-
setStarGlow
public void setStarGlow(boolean state) Description copied from interface:IScriptingInterfaceEnables or disables the stars glowing over objects.- Specified by:
setStarGlowin interfaceIScriptingInterface- Parameters:
state- Activate (true) or deactivate (false).
-
setStarGlowOverObjects
public void setStarGlowOverObjects(boolean state) Description copied from interface:IScriptingInterfaceEnables or disables stars' light glowing and spilling over closer objects.- Specified by:
setStarGlowOverObjectsin interfaceIScriptingInterface- Parameters:
state- Enable (true) or disable (false).
-
setBloom
public void setBloom(float value) Description copied from interface:IScriptingInterfaceSets the strength value for the bloom effect.- Specified by:
setBloomin interfaceIScriptingInterface- Parameters:
value- Bloom strength between 0 and 100. Set to 0 to deactivate the bloom.
-
setBloom
public void setBloom(int level) -
setSmoothLodTransitions
public void setSmoothLodTransitions(boolean value) Description copied from interface:IScriptingInterfaceSets the value of smooth lod transitions, allowing or disallowing octant fade-ins of as they come into view.- Specified by:
setSmoothLodTransitionsin interfaceIScriptingInterface- Parameters:
value- Activate (true) or deactivate (false).
-
rotate3
public double[] rotate3(double[] vector, double[] axis, double angle) Description copied from interface:IScriptingInterfaceRotates a 3D vector around the given axis by the specified angle in degrees. Vectors are arrays with 3 components. If more components are there, they are ignored.- Specified by:
rotate3in interfaceIScriptingInterface- Parameters:
vector- Vector to rotate, with at least 3 components.axis- The axis, with at least 3 components.angle- Angle in degrees.- Returns:
- The new vector, rotated.
-
rotate3
public double[] rotate3(double[] vector, double[] axis, long angle) -
rotate3
-
rotate3
-
rotate2
public double[] rotate2(double[] vector, double angle) Description copied from interface:IScriptingInterfaceRotates a 2D vector by the specified angle in degrees, counter-clockwise assuming that the y axis points up.- Specified by:
rotate2in interfaceIScriptingInterface- Parameters:
vector- Vector to rotate, with at least 2 components.- Returns:
- The new vector, rotated.
-
rotate2
public double[] rotate2(double[] vector, long angle) -
rotate2
-
rotate2
-
cross3
public double[] cross3(double[] vec1, double[] vec2) Description copied from interface:IScriptingInterfaceComputes the cross product between the two 3D vectors.- Specified by:
cross3in interfaceIScriptingInterface- Parameters:
vec1- First 3D vector.vec2- Second 3D vector.- Returns:
- Cross product 3D vector.
-
cross3
-
dot3
public double dot3(double[] vec1, double[] vec2) Description copied from interface:IScriptingInterfaceComputes the dot product between the two 3D vectors.- Specified by:
dot3in interfaceIScriptingInterface- Parameters:
vec1- First 3D vector.vec2- Second 3D vector.- Returns:
- The dot product scalar.
-
dot3
-
addTrajectoryLine
Description copied from interface:IScriptingInterfaceAdds 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 toIScriptingInterface.addPolyline(String, double[], double[]), but in this case the line can be rendered with higher quality polyline quadstrips.- Specified by:
addTrajectoryLinein interfaceIScriptingInterface- 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
-
addTrajectoryLine
Description copied from interface:IScriptingInterfaceAdds 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 toIScriptingInterface.addPolyline(String, double[], double[]), but in this case the line can be rendered with higher quality polyline quadstrips.- Specified by:
addTrajectoryLinein interfaceIScriptingInterface- 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.
-
addTrajectoryLine
-
addPolyline
Description copied from interface:IScriptingInterfaceAdds a new polyline with the given name, points and color. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. The default primitive of GL_LINE_STRIP is used.- Specified by:
addPolylinein interfaceIScriptingInterface- Parameters:
name- The name to identify the polyline, to possibly remove it later.points- The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn] 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
-
addPolyline
Description copied from interface:IScriptingInterfaceAdds a new polyline with the given name, points, color and line width. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. The default primitive type of GL_LINE_STRIP is used.- Specified by:
addPolylinein interfaceIScriptingInterface- Parameters:
name- The name to identify the polyline, to possibly remove it later.points- The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].color- 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
public void addPolyline(String name, double[] points, double[] color, double lineWidth, boolean arrowCaps) Description copied from interface:IScriptingInterfaceAdds a new polyline with the given name, points, color and line width. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. The default primitive type of GL_LINE_STRIP is used. This version enables the addition of arrow caps. In the case arrow caps are enabled, the line will be rendered in CPU mode (no VBO), making it slightly slower, especially for lines with many points. The arrow cap is added at the first point in the series.- Specified by:
addPolylinein interfaceIScriptingInterface- Parameters:
name- The name to identify the polyline, to possibly remove it later.points- The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].color- 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
public void addPolyline(String name, double[] points, double[] color, double lineWidth, int primitive) Description copied from interface:IScriptingInterfaceAdds a new polyline with the given name, points, color, line width and primitive. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it.- Specified by:
addPolylinein interfaceIScriptingInterface- Parameters:
name- The name to identify the polyline, to possibly remove it later.points- The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].color- 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
public void addPolyline(String name, double[] points, double[] color, double lineWidth, int primitive, boolean arrowCaps) Description copied from interface:IScriptingInterfaceAdds a new polyline with the given name, points, color, line width, primitive and arrow caps. The polyline will be created with the 'Others' component type, so you need to enable the visibility of 'Others' in order to see it. This version enables the addition of arrow caps. In the case arrow caps are enabled, the line will be rendered in CPU mode (no VBO), making it slightly slower, especially for lines with many points. The arrow cap is added at the first point in the series.- Specified by:
addPolylinein interfaceIScriptingInterface- Parameters:
name- The name to identify the polyline, to possibly remove it later.points- The points of the polyline. It is an array containing all the points as in [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn].color- 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.
-
addLineObject
-
addLineObject
-
addPolyline
-
addPolyline
-
addPolyline
-
addPolyline
-
addPolyline
-
addPolyline
-
addPolyline
-
addPolyline
-
addPolyline
-
addPolyline
-
removeModelObject
Description copied from interface:IScriptingInterfaceRemoves the model object identified by the given name from the internal scene graph model of Gaia Sky, if it exists. If the object has children, they are removed recursively. Be careful with this function, as it can have unexpected side effects depending on what objects are removed. For example,
gs.removeModelObject("Earth")removes the Earth, the Moon, Gaia and any dependent object from Gaia Sky.
- Specified by:
removeModelObjectin interfaceIScriptingInterface- Parameters:
name- The name of the object to remove.
-
postRunnable
Description copied from interface:IScriptingInterfacePosts aRunnableto the main loop thread that runs once after the update-scene stage, and before the render stage.- Specified by:
postRunnablein interfaceIScriptingInterface- Parameters:
runnable- The runnable to run.
-
parkRunnable
Description copied from interface:IScriptingInterface- Specified by:
parkRunnablein interfaceIScriptingInterface
-
parkSceneRunnable
Description copied from interface:IScriptingInterfaceParks an update
Runnableto the main loop thread, and keeps it running every frame until it finishes or it is unparked byIScriptingInterface.unparkRunnable(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
IScriptingInterface.unparkRunnable(String)if needed.- Specified by:
parkSceneRunnablein interfaceIScriptingInterface- Parameters:
id- The string id to identify the runnable.runnable- The scene update runnable to park.
-
parkCameraRunnable
Description copied from interface:IScriptingInterfaceParks a camera update
Runnableto the main loop thread, and keeps it running every frame until it finishes or it is unparked byIScriptingInterface.unparkRunnable(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
IScriptingInterface.unparkRunnable(String)if needed.- Specified by:
parkCameraRunnablein interfaceIScriptingInterface- Parameters:
id- The string id to identify the runnable.runnable- The camera update runnable to park.
-
removeRunnable
Description copied from interface:IScriptingInterfaceRemoves the runnable with the given id, if any. Use this method to remove previously parked scene and camera runnables.- Specified by:
removeRunnablein interfaceIScriptingInterface- Parameters:
id- The id of the runnable to remove.
-
unparkRunnable
Description copied from interface:IScriptingInterfaceRemoves the runnable with the given id, if any.- Specified by:
unparkRunnablein interfaceIScriptingInterface- Parameters:
id- The id of the runnable to remove.
-
setCameraState
public void setCameraState(double[] pos, double[] dir, double[] up) Description copied from interface:IScriptingInterfaceSets the camera state (position, direction and up vector).- Specified by:
setCameraStatein interfaceIScriptingInterface- Parameters:
pos- The position of the camera in internal units, not Km.dir- The direction of the camera.up- The up vector of the camera.
-
setCameraState
-
setCameraStateAndTime
public void setCameraStateAndTime(double[] pos, double[] dir, double[] up, long time) Description copied from interface:IScriptingInterfaceSets the camera state (position, direction and up vector) plus the current time.- Specified by:
setCameraStateAndTimein interfaceIScriptingInterface- Parameters:
pos- The position of the camera in internal units, not Km.dir- The direction of the camera.up- The up vector of the camera.time- The new time of the camera as the number of milliseconds since the epoch (Jan 1, 1970).
-
setCameraStateAndTime
-
resetImageSequenceNumber
public void resetImageSequenceNumber()Description copied from interface:IScriptingInterfaceResets to zero the image sequence number used to generate the file names of the frame output images.- Specified by:
resetImageSequenceNumberin interfaceIScriptingInterface
-
loadDataset
Description copied from interface:IScriptingInterfaceLoads 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.- Specified by:
loadDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset, used to identify the subsequent operations on the dataset.absolutePath- Absolute path (or relative to the working path of Gaia Sky) to the.votfile to load.- Returns:
- False if the dataset could not be loaded, true otherwise.
-
loadDataset
Description copied from interface:IScriptingInterfaceLoads 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 likeIScriptingInterface.loadDataset(String, String).
Ifsyncis false, the loading happens in a new thread and the call returns immediately. In this case, you can useIScriptingInterface.hasDataset(String)to check whether the dataset is already loaded and available. The actual loading process is carried out making educated guesses about semantics using UCDs and column names. Please check the official documentation for a complete reference on what can and what can't be loaded.- Specified by:
loadDatasetin interfaceIScriptingInterface- 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.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
public boolean loadDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, boolean sync) -
loadDataset
public boolean loadDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, DatasetOptions datasetOptions, boolean sync) Description copied from interface:IScriptingInterfaceLoads 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 likeIScriptingInterface.loadDataset(String, String, boolean).
Ifsyncis false, the loading happens in a new thread and the call returns immediately. In this case, you can useIScriptingInterface.hasDataset(String)to check whether the dataset is already loaded and available. The actual loading process is carried out making educated guesses about semantics using UCDs and column names. Please check the official documentation for a complete reference on what can and what can't be loaded. This version includes the catalog info type.- Specified by:
loadDatasetin interfaceIScriptingInterface- 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.type- TheCatalogInfo.CatalogInfoSourceobject to use as the dataset type.datasetOptions- 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.
-
loadDataset
public boolean loadDataset(String dsName, uk.ac.starlink.util.DataSource ds, CatalogInfo.CatalogInfoSource type, DatasetOptions datasetOptions, boolean sync) -
loadStarDataset
Description copied from interface:IScriptingInterfaceLoads a star dataset from a VOTable file (.vot). 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.- Specified by:
loadStarDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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
Description copied from interface:IScriptingInterfaceLoads a star dataset from a VOTable file (.vot). 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.- Specified by:
loadStarDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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
public boolean loadStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, boolean sync) Description copied from interface:IScriptingInterfaceLoads a star dataset from a VOTable file (.vot). 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.- Specified by:
loadStarDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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
-
loadStarDataset
public boolean loadStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Description copied from interface:IScriptingInterfaceLoads a star dataset from a VOTable file (.vot). 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.- Specified by:
loadStarDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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.
-
loadStarDataset
-
loadStarDataset
public boolean loadStarDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) -
loadParticleDataset
public boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, boolean sync) Description copied from interface:IScriptingInterfaceLoads a particle dataset (only positions and extra attributes) from a VOTable file (.vot). 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.- Specified by:
loadParticleDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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
-
loadParticleDataset
public boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Description copied from interface:IScriptingInterfaceLoads a particle dataset (only positions and extra attributes) from a VOTable file (.vot). 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.- Specified by:
loadParticleDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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
-
loadParticleDataset
public boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Description copied from interface:IScriptingInterfaceLoads a particle dataset (only positions and extra attributes) from a VOTable file (.vot). 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.- Specified by:
loadParticleDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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.sizeLimits- 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.
-
loadParticleDataset
-
loadParticleDataset
public boolean loadParticleDataset(String dsName, String path, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync) -
loadParticleDataset
public boolean loadParticleDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, double profileDecay, double[] particleColor, double colorNoise, double[] labelColor, double particleSize, double[] sizeLimits, ComponentTypes.ComponentType ct, double[] fadeIn, double[] fadeOut, boolean sync) -
loadStarClusterDataset
public boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, double[] fadeIn, double[] fadeOut, boolean sync) Description copied from interface:IScriptingInterfaceLoads a star cluster dataset from a CSV file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. Uses the same color for clusters and labels. The call can be made synchronous or asynchronous. 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.- Specified by:
loadStarClusterDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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
-
loadStarClusterDataset
public boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Description copied from interface:IScriptingInterfaceLoads a star cluster dataset from a CSV file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. The call can be made synchronous or asynchronous. 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.- Specified by:
loadStarClusterDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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
-
loadStarClusterDataset
public boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Description copied from interface:IScriptingInterfaceLoads a star cluster dataset from a CSV file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. Uses the same color for clusters and labels. The call can be made synchronous or asynchronous. 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.- Specified by:
loadStarClusterDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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
-
loadStarClusterDataset
public boolean loadStarClusterDataset(String dsName, String path, double[] particleColor, double[] labelColor, String ct, double[] fadeIn, double[] fadeOut, boolean sync) Description copied from interface:IScriptingInterfaceLoads a star cluster dataset from a CSV file. The file needs the columns with the following names: name, ra, dec, dist, pmra, pmdec, radius, radvel. The call can be made synchronous or asynchronous. 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.- Specified by:
loadStarClusterDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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
public boolean loadVariableStarDataset(String dsName, String path, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) Description copied from interface:IScriptingInterfaceLoads a variable star dataset from a VOTable file (.vot). 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.- Specified by:
loadVariableStarDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- Absolute path (or relative to the working path of Gaia Sky) to the.votfile 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.
-
loadVariableStarDataset
public boolean loadVariableStarDataset(String dsName, String path, CatalogInfo.CatalogInfoSource type, double magnitudeScale, double[] labelColor, double[] fadeIn, double[] fadeOut, boolean sync) -
loadStarClusterDataset
-
loadJsonCatalog
Description copied from interface:IScriptingInterfaceLoads a JSON catalog file. This call does not block.- Specified by:
loadJsonCatalogin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset.path- The absolute path, or the path in the data directory, of the catalog file.- Returns:
- False if the dataset could not be loaded. True otherwise.
-
loadJsonCatalog
-
hasDataset
Description copied from interface:IScriptingInterfaceChecks whether the dataset identified by the given name is loaded- Specified by:
hasDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset to query.- Returns:
- True if the dataset is loaded, false otherwise.
-
removeDataset
Description copied from interface:IScriptingInterfaceRemoves the dataset identified by the given name, if it exists.- Specified by:
removeDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset to remove.- Returns:
- False if the dataset could not be found.
-
hideDataset
Description copied from interface:IScriptingInterfaceHides the dataset identified by the given name, if it exists and is not hidden.- Specified by:
hideDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset to hide.- Returns:
- False if the dataset could not be found.
-
showDataset
Description copied from interface:IScriptingInterfaceShows (un-hides) the dataset identified by the given name, if it exists and is hidden- Specified by:
showDatasetin interfaceIScriptingInterface- Parameters:
dsName- The name of the dataset to show.- Returns:
- False if the dataset could not be found.
-
highlightDataset
Description copied from interface:IScriptingInterfaceEnables or disables the dataset highlight using a plain color chosen by the system.- Specified by:
highlightDatasetin interfaceIScriptingInterface- Parameters:
dsName- The dataset name.highlight- State.- Returns:
- False if the dataset could not be found.
-
highlightDataset
Description copied from interface:IScriptingInterfaceEnables or disables the dataset highlight, using a plain color given by the color index:- 0 - blue
- 1 - red
- 2 - yellow
- 3 - green
- 4 - pink
- 5 - orange
- 6 - purple
- 7 - brown
- 8 - magenta
- Specified by:
highlightDatasetin interfaceIScriptingInterface- Parameters:
dsName- The dataset name.colorIndex- Color index in [0,8].highlight- Whether to highlight or not.- Returns:
- False if the dataset could not be found.
-
highlightDataset
public boolean highlightDataset(String dsName, float r, float g, float b, float a, boolean highlight) Description copied from interface:IScriptingInterfaceEnables or disables the dataset highlight, using a given plain color.- Specified by:
highlightDatasetin interfaceIScriptingInterface- Parameters:
dsName- The dataset name.r- Red component.highlight- State.- Returns:
- False if the dataset could not be found.
-
highlightDataset
public boolean highlightDataset(String dsName, String attributeName, String colorMap, double minMap, double maxMap, boolean highlight) Description copied from interface:IScriptingInterfaceEnables or disables the dataset highlight, using the given color map on the given attribute with the given maximum and minimum mapping values.- Specified by:
highlightDatasetin interfaceIScriptingInterface- 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
Description copied from interface:IScriptingInterfaceSets the size increase factor of this dataset when highlighted.- Specified by:
setDatasetHighlightSizeFactorin interfaceIScriptingInterface- 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
Description copied from interface:IScriptingInterfaceSets the 'all visible' property of datasets when highlighted. If set to true, all stars in the dataset have an increased minimum opacity when highlighted, so that they are all visible. Otherwise, stars retain their minimum opacity and base brightness.- Specified by:
setDatasetHighlightAllVisiblein interfaceIScriptingInterface- 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
Description copied from interface:IScriptingInterfaceSets the dataset point size multiplier.- Specified by:
setDatasetPointSizeMultiplierin interfaceIScriptingInterface- Parameters:
dsName- The dataset name.multiplier- The multiplier, as a positive floating point number.
-
addShapeAroundObject
public void addShapeAroundObject(String shapeName, String shapeType, String primitive, double size, String objectName, float r, float g, float b, float a, boolean showLabel, boolean trackObject) Description copied from interface:IScriptingInterfaceCreates a shape object of the given type with the given size around the object with the given name.- Specified by:
addShapeAroundObjectin interfaceIScriptingInterface- Parameters:
shapeName- The name of the shape object.shapeType- 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.
-
setMaximumSimulationTime
public void setMaximumSimulationTime(long years) Description copied from interface:IScriptingInterfaceSets the maximum simulation time allowed, in years. This sets the maximum time in the future (years) and in the past (-years). This setting is not saved to the configuration and resets to 5 Myr after restart.- Specified by:
setMaximumSimulationTimein interfaceIScriptingInterface- Parameters:
years- The maximum year number to allow.
-
setMaximumSimulationTime
public void setMaximumSimulationTime(double years) -
setMaximumSimulationTime
-
setMaximumSimulationTime
-
setMaximumSimulationTime
-
getMeterToInternalUnitConversion
public double getMeterToInternalUnitConversion()Description copied from interface:IScriptingInterfaceReturns the meter to internal unit conversion factor. Use this factor to multiply your coordinates in meters to get them in internal units.- Specified by:
getMeterToInternalUnitConversionin interfaceIScriptingInterface- Returns:
- The factor M_TO_U.
-
getInternalUnitToMeterConversion
public double getInternalUnitToMeterConversion()Description copied from interface:IScriptingInterfaceReturns the internal unit to meter conversion factor. Use this factor to multiply your coordinates in internal units to get them in meters.- Specified by:
getInternalUnitToMeterConversionin interfaceIScriptingInterface- Returns:
- The factor U_TO_M.
-
internalUnitsToMetres
public double internalUnitsToMetres(double internalUnits) Description copied from interface:IScriptingInterfaceConverts the value in internal units to metres.- Specified by:
internalUnitsToMetresin interfaceIScriptingInterface- Parameters:
internalUnits- The value in internal units.- Returns:
- The value in metres.
-
internalUnitsToKilometres
public double internalUnitsToKilometres(double internalUnits) Description copied from interface:IScriptingInterfaceConverts the value in internal units to Kilometers.- Specified by:
internalUnitsToKilometresin interfaceIScriptingInterface- Parameters:
internalUnits- The value in internal units.- Returns:
- The value in Kilometers.
-
internalUnitsToKilometres
public double[] internalUnitsToKilometres(double[] internalUnits) Description copied from interface:IScriptingInterfaceConverts the array in internal units to Kilometers.- Specified by:
internalUnitsToKilometresin interfaceIScriptingInterface- Parameters:
internalUnits- The array in internal units.- Returns:
- The array in Kilometers.
-
internalUnitsToKilometres
-
metresToInternalUnits
public double metresToInternalUnits(double metres) Description copied from interface:IScriptingInterfaceConverts the metres to internal units.- Specified by:
metresToInternalUnitsin interfaceIScriptingInterface- Parameters:
metres- The value in metres.- Returns:
- The value in internal units.
-
kilometresToInternalUnits
public double kilometresToInternalUnits(double kilometres) Description copied from interface:IScriptingInterfaceConverts the kilometres to internal units.- Specified by:
kilometresToInternalUnitsin interfaceIScriptingInterface- Parameters:
kilometres- The value in kilometers.- Returns:
- The value in internal units.
-
kilometersToInternalUnits
public double kilometersToInternalUnits(double kilometres) -
listDatasets
Description copied from interface:IScriptingInterfaceReturns the names of all datasets currently loaded.- Specified by:
listDatasetsin interfaceIScriptingInterface- Returns:
- A list with all the names of the loaded datasets.
-
getFrameNumber
public long getFrameNumber()Description copied from interface:IScriptingInterfaceGets the current frame number. The number begins at 0 for the first frame produced when Gaia Sky is started and increases continuously.- Specified by:
getFrameNumberin interfaceIScriptingInterface- Returns:
- The current frame number.
-
getDefaultFramesDir
Description copied from interface:IScriptingInterfaceGets the absolute path of the default directory where the still frames are saved.- Specified by:
getDefaultFramesDirin interfaceIScriptingInterface- Returns:
- Absolute path of directory where still frames are saved.
-
getDefaultScreenshotsDir
Description copied from interface:IScriptingInterfaceGets the absolute path of the default directory where the screenshots are saved.- Specified by:
getDefaultScreenshotsDirin interfaceIScriptingInterface- Returns:
- Absolute path of directory where screenshots are saved.
-
getDefaultCameraDir
Description copied from interface:IScriptingInterfaceGets the absolute path of the default directory where the camera files are saved.- Specified by:
getDefaultCameraDirin interfaceIScriptingInterface- Returns:
- Absolute path of directory where camera files are saved.
-
getDefaultMusicDir
Description copied from interface:IScriptingInterfaceGets the absolute path to the location of the music files- Specified by:
getDefaultMusicDirin interfaceIScriptingInterface- Returns:
- Absolute path to the location of the music files
-
getDefaultMappingsDir
Description copied from interface:IScriptingInterfaceGets the absolute path to the location of the inputListener mappings.- Specified by:
getDefaultMappingsDirin interfaceIScriptingInterface- Returns:
- Absolute path to the location of the inputListener mappings.
-
getDataDir
Description copied from interface:IScriptingInterfaceGets the absolute path of the local data directory, configured in yourconfig.yamlfile.- Specified by:
getDataDirin interfaceIScriptingInterface- Returns:
- Absolute path to the location of the data files.
-
getConfigDir
Description copied from interface:IScriptingInterfaceGets the absolute path to the location of the configuration directory- Specified by:
getConfigDirin interfaceIScriptingInterface- Returns:
- Absolute path of config directory.
-
getLocalDataDir
Description copied from interface:IScriptingInterfaceReturns the default data directory. That is ~/.gaiasky/ in Windows and macOS, and ~/.local/share/gaiasky in Linux.- Specified by:
getLocalDataDirin interfaceIScriptingInterface- Returns:
- Absolute path of data directory.
-
print
Description copied from interface:IScriptingInterfacePrint text using the internal logging system.- Specified by:
printin interfaceIScriptingInterface- Parameters:
message- The message.
-
log
Description copied from interface:IScriptingInterfacePrint text using the internal logging system.- Specified by:
login interfaceIScriptingInterface- Parameters:
message- The message.
-
error
Description copied from interface:IScriptingInterfaceLog an error using the internal logging system.- Specified by:
errorin interfaceIScriptingInterface- Parameters:
message- The error message.
-
quit
public void quit()Description copied from interface:IScriptingInterfaceInitiates the quit action to terminate the program.- Specified by:
quitin interfaceIScriptingInterface
-
notify
Description copied from interface:IObserverEvent notification call.
-