Interface OutputAPI
- All Known Implementing Classes:
OutputModule
OutputModule.
The output module contains calls and methods to access, modify, and query the frame output, the screenshots and other kinds of output systems.
-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure_frame_output(int w, int h, double fps, String path, String prefix) Configure the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix.voidconfigure_frame_output(int w, int h, int fps, String path, String prefix) Configure the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix.voidconfigure_screenshots(int w, int h, String path, String prefix) Configures the screenshot system, setting the resolution of the images, the output directory and the image name prefix.voidframe_output(boolean active) Activate or deactivate the frame output system.voidframe_output_mode(String mode) Set the frame output mode.Get the current output directory for the frame output system as a string.Get the current output directory for screenshots as a string.doubleGet the current frame rate setting of the frame output system.booleanCheck whether the frame output system is currently on (i.e.voidResets to zero the image sequence number used to generate the file names of the frame output images.voidTake a screenshot of the current frame and saves it to the configured location (seeconfigure_screenshots(int, int, String, String)).voidscreenshot_mode(String mode) Set the screenshot mode.
-
Method Details
-
configure_screenshots
Configures the screenshot system, setting the resolution of the images, the output directory and the image name prefix.- Parameters:
w- Width of images.h- Height of images.path- The output directory path.prefix- The file name prefix.
-
get_current_screenshots_dir
String get_current_screenshots_dir()Get the current output directory for screenshots as a string. This comes from a setting stored in the configuration file. To get the default screenshots location, useBaseModule.get_default_screenshots_dir().- Returns:
- The absolute path to the current output directory for screenshots.
-
screenshot_mode
Set the screenshot mode. Possible values aresimpleandadvanced.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 using
configure_screenshots(int, int, String, String)and it does not draw the UI.- Parameters:
mode- The screenshot mode.simpleoradvanced.
-
screenshot
void screenshot()Take a screenshot of the current frame and saves it to the configured location (seeconfigure_screenshots(int, int, String, String)). -
configure_frame_output
Configure the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix. This function sets the frame output mode to 'advanced'.- Parameters:
w- Width of images.h- Height of images.fps- Target frames per second (number of images per second).path- The output directory path.prefix- The file name prefix.
-
get_current_frame_output_dir
String get_current_frame_output_dir()Get the current output directory for the frame output system as a string. This comes from a setting stored in the configuration file. To get the default frame output location, useBaseModule.get_default_frame_output_dir().- Returns:
- The absolute path to the current output directory for the frame output system.
-
configure_frame_output
Configure the frame output system, setting the resolution of the images, the target frames per second, the output directory and the image name prefix. This function sets the frame output mode to 'advanced'.- Parameters:
w- Width of images.h- Height of images.fps- Target frames per second (number of images per second).path- The output directory path.prefix- The file name prefix.
-
frame_output_mode
Set the frame output mode. Possible values aresimpleandadvanced.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 using
configure_frame_output(int, int, int, String, String)and it does not draw the UI.- Parameters:
mode- The screenshot mode.simpleoradvanced.
-
frame_output
void frame_output(boolean active) Activate or deactivate the frame output system. If called with true, the system starts outputting images right away.- Parameters:
active- Whether to activate or deactivate the frame output system.
-
is_frame_output_active
boolean is_frame_output_active()Check whether the frame output system is currently on (i.e. frames are being saved to disk).- Returns:
- True if the render output is active.
-
get_frame_output_fps
double get_frame_output_fps()Get the current frame rate setting of the frame output system.- Returns:
- The frame rate setting of the frame output system.
-
reset_frame_output_sequence_number
void reset_frame_output_sequence_number()Resets to zero the image sequence number used to generate the file names of the frame output images.
-