Interface OutputAPI

All Known Implementing Classes:
OutputModule

public interface OutputAPI
API definition for the output module, 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 Details

    • configure_screenshots

      void configure_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.
      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, use BaseModule.get_default_screenshots_dir().
      Returns:
      The absolute path to the current output directory for screenshots.
    • screenshot_mode

      void screenshot_mode(String mode)
      Set the screenshot mode. Possible values are simple and advanced.

      The simple mode is faster and just outputs the last frame rendered to the Gaia Sky window, with the same resolution and containing the UI elements. The advanced mode redraws the last frame using the resolution configured using configure_screenshots(int, int, String, String) and it does not draw the UI.

      Parameters:
      mode - The screenshot mode. simple or advanced.
    • screenshot

      void screenshot()
      Take a screenshot of the current frame and saves it to the configured location (see configure_screenshots(int, int, String, String)).
    • configure_frame_output

      void configure_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. 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, use BaseModule.get_default_frame_output_dir().
      Returns:
      The absolute path to the current output directory for the frame output system.
    • configure_frame_output

      void configure_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. 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

      void frame_output_mode(String mode)
      Set the frame output mode. Possible values are simple and advanced.

      The simple mode is faster and just outputs the last frame rendered to the Gaia Sky window, with the same resolution and containing the UI elements. The advanced mode redraws the last frame using the resolution configured using configure_frame_output(int, int, int, String, String) and it does not draw the UI.

      Parameters:
      mode - The screenshot mode. simple or advanced.
    • 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.