Interface CameraAPI

All Known Implementing Classes:
CameraModule

public interface CameraAPI
Public API definition for the camera module, CameraModule.

The camera module contains methods and calls that modify and query the camera.

  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    Center the camera so that its direction vector is aligned with the direction to the focus object, removing any deviation of the line of sight.
    void
    center_focus(boolean center)
    Set the center focus property of the camera.
    void
    Set the camera in focus mode with the focus object identified by the given focusName.
    void
    focus_mode(String name, float wait)
    Set the camera in focus mode with the focus object identified by the given focusName.
    void
    Set the camera in focus mode with the focus object identified by the given focusName.
    void
    Set the camera in focus mode with the focus object identified by the given focusName.
    void
    Set the camera in free mode.
    Return the closest object to the camera in this instant as a IFocus.
    double[]
    Get the current camera direction vector.
    double
    Return the distance from the current postion of the camera to the surface of the object identified with the given name.
    double
    Return the current camera field of view angle, in degrees.
    double[]
    Get the current camera orientation quaternion.
    double[]
    Get the current camera position, in km.
    double[]
    Get the current camera position, in the requested units.
    double[]
    Get the current camera up vector.
    void
    go_to_object(String name, double pos_duration, double ori_duration)
    Move the camera to the object identified by the given name, internally using smooth camera transition calls, like transition(double[], double[], double[], double).
    void
    go_to_object(String name, double pos_duration, double ori_duration, boolean sync)
    Same as go_to_object(String, double, double), but with a boolean that indicates whether the call is synchronous.
    void
    go_to_object(String name, double sa, double pos_duration, double ori_duration)
    Same as go_to_object(String, double, double), but with the target solid angle of the object.
    void
    go_to_object(String name, double sa, double pos_duration, double ori_duration, boolean sync)
    Same as go_to_object(String, double, double, boolean), but with the target solid angle of the object.
    void
    Set the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.
    void
    point_at_equatorial(double ra, double dec)
    Set the camera in free mode and points it to the given coordinates in equatorial system.
    void
    Remove the tracking object from the camera, if any.
    void
    set_direction(double[] dir)
    Set the camera direction vector to the given vector, in the internal reference system.
    void
    set_direction(double[] dir, boolean immediate)
    Set the camera direction vector to the given vector, in the internal reference system.
    void
    set_direction_equatorial(double ra, double dec)
    Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in equatorial coordinates.
    void
    set_direction_galactic(double l, double b)
    Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in galactic coordinates.
    void
    set_focus_lock(boolean lock)
    Activates or deactivates the camera lock to the focus reference system when in focus mode.
    void
    set_fov(float fov)
    Set the field of view of the perspective matrix of the camera, in degrees.
    void
    set_max_speed(int index)
    Set the maximum speed of the camera as an index pointing to a pre-set value.
    void
    set_orientation_lock(boolean lock)
    Lock or unlock the orientation of the camera to the focus object's rotation.
    void
    Set the camera orientation to the given quaternion, given as an array of [x, y, z, w].
    void
    set_position(double[] pos)
    Set the camera position to the given coordinates, in the internal reference system and kilometres.
    void
    set_position(double[] pos, boolean immediate)
    Set the camera position to the given coordinates, in the internal reference system and kilometres.
    void
    set_position(double[] dir, String units)
    Set the camera position to the given coordinates, in the internal reference system and the given units.
    void
    set_position(double[] pos, String units, boolean immediate)
    Set the camera position to the given coordinates, in the internal reference system and in the requested units.
    void
    set_position(double x, double y, double z)
    Component-wise version of set_position(double[]).
    void
    set_position(double x, double y, double z, boolean immediate)
    Component-wise version of set_position(double[], boolean).
    void
    set_position(double x, double y, double z, String units)
    Component-wise version of set_position(double[], String).
    void
    set_position(double x, double y, double z, String units, boolean immediate)
    Component-wise version of set_position(double[], String, boolean).
    void
    set_position_and_focus(String name, String other, double rot, double sa)
    Set the focus and instantly moves the camera to a point in the line defined by focus-other and rotated rotation degrees around focus using the camera up vector as a rotation axis.
    void
    set_state(double[] pos, double[] dir, double[] up)
    Set the camera state (position, direction and up vector).
    void
    set_state_and_time(double[] pos, double[] dir, double[] up, long time)
    Set the camera state (position, direction and up vector) plus the current time.
    void
    Set the camera to track the object with the given name.
    void
    set_up(double[] up)
    Set the camera up vector to the given vector, in the internal reference system.
    void
    set_up(double[] up, boolean immediate)
    Set the camera up vector to the given vector, in the internal reference system.
    void
    Stop all camera motion.
    void
    transition(double[] pos, double[] dir, double[] up, double duration)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds.
    void
    transition(double[] pos, double[] dir, double[] up, double duration, boolean sync)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds.
    void
    transition(double[] pos, double[] dir, double[] up, double pos_duration, String pos_smooth_type, double pos_smooth_factor, double ori_duration, String ori_smooth_type, double ori_smooth_factor)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp}, with the given duration, in seconds.
    void
    transition(double[] pos, String units, double[] dir, double[] up, double duration)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds.
    void
    transition(double[] pos, String units, double[] dir, double[] up, double duration, boolean sync)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds.
    void
    transition(double[] pos, String units, double[] dir, double[] up, double pos_duration, String pos_smooth_type, double pos_smooth_factor, double ori_duration, String ori_smooth_type, double ori_smooth_factor, boolean sync)
    Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp}, with the given duration, in seconds.
    void
    transition_fov(double target_fov, double duration)
    Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.
    void
    transition_fov(double target_fov, double duration, String smooth_type, double smooth_factor)
    Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.
    void
    transition_fov(double target_fov, double duration, String smooth_type, double smooth_factor, boolean sync)
    Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.
    void
    transition_km(double[] pos, double[] dir, double[] up, double duration)
    Same as transition(double[], double[], double[], double) but the camera position is given in Km.
    void
    transition_orientation(double[] dir, double[] up, double duration, String smooth_type, double smooth_factor, boolean sync)
    Create a smooth transition from the current camera orientation to the given camera orientation {camDir, camUp}, with the given duration, in seconds.
    void
    transition_position(double[] pos, String units, double duration, String smooth_type, double smooth_factor, boolean sync)
    Create a smooth transition from the current camera position to the given camera position, with the given duration, in seconds.
    boolean
    wait_focus(String name, long timeout)
    This method blocks until the focus is the object indicated by the name.
  • Method Details Link icon

    • focus_mode Link icon

      void focus_mode(String name)
      Set the camera in focus mode with the focus object identified by the given focusName. It returns immediately, i.e., it does not wait for the camera direction to finish the transition that makes it point to the new focus object.
      Parameters:
      name - The name of the new focus object.
    • focus_mode Link icon

      void focus_mode(String name, float wait)
      Set the camera in focus mode with the focus object identified by the given focusName. Additionally, waitTimeSeconds contains the amount of time, in seconds, to wait for the camera transition that makes it point to the new focus object to finish. If the transition has not finished after this amount of time, the call returns. If the transition finishes before this amount of time, it returns immediately after finishing.
      Parameters:
      name - The name of the new focus object.
      wait - Maximum time, in seconds, to wait for the camera to face the focus. If negative, the call waits until the camera transition is finished.
    • focus_mode_instant Link icon

      void focus_mode_instant(String name)
      Set the camera in focus mode with the focus object identified by the given focusName. This call is different from focus_mode(String) in that the camera direction vector is set to point towards the focus object instantly.
      Parameters:
      name - The name of the new focus object.
    • focus_mode_instant_go Link icon

      void focus_mode_instant_go(String name)
      Set the camera in focus mode with the focus object identified by the given focusName. This call is different from focus_mode(String) in that the camera is moved to the vicinity of the focus object instantly, and its direction vector is set to point towards the focus object, also instantly.
      Parameters:
      name - The name of the new focus object.
    • wait_focus Link icon

      boolean wait_focus(String name, long timeout)
      This method blocks until the focus is the object indicated by the name. There is an optional timeout time, given in milliseconds. If the focus has not been acquired after this timeout, the call returns.
      Parameters:
      name - The name of the focus to wait for.
      timeout - Timeout to wait, in milliseconds. Set negative to use no timeout.
      Returns:
      True if the timeout triggered the return. False otherwise.
    • set_focus_lock Link icon

      void set_focus_lock(boolean lock)
      Activates or deactivates the camera lock to the focus reference system when in focus mode.
      Parameters:
      lock - Activate or deactivate the lock.
    • center_focus Link icon

      void center_focus(boolean center)
      Set the center focus property of the camera. If set to true, the camera centers the focus in view. If set to false, the camera does not seek to center the focus object, leaving the camera in a 'free view' state.

      Note that the camera is in focus mode, so its movement is determined by the focus object. 'Free view' state and free mode are not the same thing. Use free_mode() to set the camera in free mode.

      Parameters:
      center - Whether to center the focus or not.
    • set_orientation_lock Link icon

      void set_orientation_lock(boolean lock)
      Lock or unlock the orientation of the camera to the focus object's rotation.
      Parameters:
      lock - Whether to lock or unlock the camera orientation to the focus.
    • free_mode Link icon

      void free_mode()
      Set the camera in free mode.
    • set_position Link icon

      void set_position(double[] pos)
      Set the camera position to the given coordinates, in the internal reference system and kilometres. The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, use set_position(double[], boolean), with the boolean set to true.
      Parameters:
      pos - Vector of three components in internal coordinates and Km.
    • set_position Link icon

      void set_position(double[] pos, boolean immediate)
      Set the camera position to the given coordinates, in the internal reference system and kilometres. The immediate parameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.
      Parameters:
      pos - Vector of three components in internal coordinates and Km.
      immediate - Whether to apply the changes immediately, or wait for the next frame.
    • set_position Link icon

      void set_position(double[] pos, String units, boolean immediate)
      Set the camera position to the given coordinates, in the internal reference system and in the requested units. The immediate parameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.
      Parameters:
      pos - Vector of three components in internal coordinates and the requested units.
      units - The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
      immediate - Whether to apply the changes immediately, or wait for the next frame.
    • set_position Link icon

      void set_position(double x, double y, double z)
      Component-wise version of set_position(double[]).
    • set_position Link icon

      void set_position(double x, double y, double z, String units)
      Component-wise version of set_position(double[], String).
    • set_position Link icon

      void set_position(double x, double y, double z, boolean immediate)
      Component-wise version of set_position(double[], boolean).
    • set_position Link icon

      void set_position(double x, double y, double z, String units, boolean immediate)
      Component-wise version of set_position(double[], String, boolean).
    • get_position Link icon

      double[] get_position()
      Get the current camera position, in km.
      Returns:
      The camera position coordinates in the internal reference system, in km.
    • get_position Link icon

      double[] get_position(String units)
      Get the current camera position, in the requested units.
      Parameters:
      units - The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
      Returns:
      The camera position coordinates in the internal reference system and in the requested units.
    • set_position Link icon

      void set_position(double[] dir, String units)
      Set the camera position to the given coordinates, in the internal reference system and the given units. The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, use set_position(double[], boolean), with the boolean set to true.
      Parameters:
      dir - Vector of three components in internal coordinates and the given units.
      units - The distance units to use. One of "m", "km", "au", "ly", "pc", "internal".
    • set_direction Link icon

      void set_direction(double[] dir, boolean immediate)
      Set the camera direction vector to the given vector, in the internal reference system. The immediate parameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.
      Parameters:
      dir - The direction vector in the internal reference system.
      immediate - Whether to apply the changes immediately, or wait for the next frame.
    • get_direction Link icon

      double[] get_direction()
      Get the current camera direction vector.
      Returns:
      The camera direction vector in the internal reference system.
    • set_direction Link icon

      void set_direction(double[] dir)
      Set the camera direction vector to the given vector, in the internal reference system.

      You can convert from spherical coordinates using the following methods:

      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, use set_direction(double[], boolean), with the boolean set to true.
      Parameters:
      dir - The direction vector in equatorial cartesian coordinates.
    • set_direction_equatorial Link icon

      void set_direction_equatorial(double ra, double dec)
      Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in equatorial coordinates. This method sets the camera in free mode.
      Parameters:
      ra - The right ascension, in decimal degrees.
      dec - The declination, in decimal degrees.
    • set_direction_galactic Link icon

      void set_direction_galactic(double l, double b)
      Create a smooth camera orientation transition from the current camera orientation to the given sky coordinates, in galactic coordinates. This method sets the camera in free mode.
      Parameters:
      l - The galactic longitude, in decimal degrees.
      b - The galactic latitude, in decimal degrees.
    • set_up Link icon

      void set_up(double[] up, boolean immediate)
      Set the camera up vector to the given vector, in the internal reference system. The immediate parameter enables setting the camera state immediately without waiting for the possible current update operation to finish. Set this to true if you run this function from within a parked runnable.
      Parameters:
      up - The up vector in equatorial coordinates.
      immediate - Whether to apply the changes immediately, or wait for the next frame.
    • get_up Link icon

      double[] get_up()
      Get the current camera up vector.
      Returns:
      The camera up vector in the internal reference system.
    • set_up Link icon

      void set_up(double[] up)
      Set the camera up vector to the given vector, in the internal reference system. The default behavior of this method posts a runnable to update the camera after the current frame. If you need to call this method from within a parked runnable, use set_up(double[], boolean), with the boolean set to true.
      Parameters:
      up - The up vector in equatorial coordinates.
    • set_orientation_quaternion Link icon

      void set_orientation_quaternion(double[] q)
      Set the camera orientation to the given quaternion, given as an array of [x, y, z, w].
      Parameters:
      q - The 4-component quaternion.
    • get_orientation_quaternion Link icon

      double[] get_orientation_quaternion()
      Get the current camera orientation quaternion.
      Returns:
      The current camera orientation quaternion, as an array of [x, y, z, w].
    • set_position_and_focus Link icon

      void set_position_and_focus(String name, String other, double rot, double sa)
      Set the focus and instantly moves the camera to a point in the line defined by focus-other and rotated rotation degrees around focus using the camera up vector as a rotation axis.
      Parameters:
      name - The name of the focus object.
      other - The name of the other object, to the fine a line from this to focus. Usually a light source.
      rot - The rotation angle, in degrees.
      sa - The target solid angle which determines the distance, in degrees.
    • point_at_equatorial Link icon

      void point_at_equatorial(double ra, double dec)
      Set the camera in free mode and points it to the given coordinates in equatorial system.
      Parameters:
      ra - Right ascension in degrees.
      dec - Declination in degrees.
    • go_to_object_instant Link icon

      void go_to_object_instant(String name)
      Set the camera in focus mode with the given focus object and instantly moves the camera next to the focus object.
      Parameters:
      name - The name of the new focus object.
    • go_to_object Link icon

      void go_to_object(String name, double pos_duration, double ori_duration)
      Move the camera to the object identified by the given name, internally using smooth camera transition calls, like transition(double[], double[], double[], double). The target position and orientation are computed first during the call execution and are not subsequently updated. This means that the camera does not follow the object if it moves. If time is activated, and the object moves, this call does not go to the object's current position at the end, but at the beginning.
      Parameters:
      name - The name of the object to go to.
      pos_duration - The duration of the transition in position, in seconds.
      ori_duration - The duration of the transition in orientation, in seconds.
    • go_to_object Link icon

      void go_to_object(String name, double sa, double pos_duration, double ori_duration)
      Same as go_to_object(String, double, double), but with the target solid angle of the object.
      Parameters:
      name - The name of the object to go to.
      sa - The target solid angle of the object, in degrees. This is used to compute the final distance to the object. The angle gets larger and larger as we approach the object.
      pos_duration - The duration of the transition in position, in seconds.
      ori_duration - The duration of the transition in orientation, in seconds.
    • go_to_object Link icon

      void go_to_object(String name, double pos_duration, double ori_duration, boolean sync)
      Same as go_to_object(String, double, double), but with a boolean that indicates whether the call is synchronous.
      Parameters:
      name - The name of the object to go to.
      pos_duration - The duration of the transition in position, in seconds.
      ori_duration - The duration of the transition in orientation, in seconds.
      sync - If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
    • go_to_object Link icon

      void go_to_object(String name, double sa, double pos_duration, double ori_duration, boolean sync)
      Same as go_to_object(String, double, double, boolean), but with the target solid angle of the object.
      Parameters:
      name - The name of the object to go to.
      sa - The target solid angle of the object, in degrees. This is used to compute the final distance to the object. The angle gets larger and larger as we approach the object.
      pos_duration - The duration of the transition in position, in seconds.
      ori_duration - The duration of the transition in orientation, in seconds.
      sync - If true, the call is synchronous and waits for the camera file to finish. Otherwise, it returns immediately.
    • get_distance_to_object Link icon

      double get_distance_to_object(String name)
      Return the distance from the current postion of the camera to the surface of the object identified with the given name. If the object is an abstract node or does not exist, it returns a negative distance.
      Parameters:
      name - The name or id (HIP, TYC, sourceId) of the object.
      Returns:
      The distance to the object in km if it exists, a negative value otherwise.
    • stop Link icon

      void stop()
      Stop all camera motion.
    • center Link icon

      void center()
      Center the camera so that its direction vector is aligned with the direction to the focus object, removing any deviation of the line of sight. Useful to center the focus object again after turning.

      This method only has effect if the camera is in focus_mode(String).

    • set_max_speed Link icon

      void set_max_speed(int index)
      Set the maximum speed of the camera as an index pointing to a pre-set value. The index corresponds to one of the following values:
      1. 1 Km/h
      2. 10 Km/h
      3. 100 Km/h
      4. 1000 Km/h
      5. 1 Km/s
      6. 10 Km/s
      7. 100 Km/s
      8. 1000 Km/s
      9. 0.01 c
      10. 0.1 c
      11. 0.5 c
      12. 0.8 c
      13. 0.9 c
      14. 0.99 c
      15. 0.99999 c
      16. 1 c
      17. 2 c
      18. 10 c
      19. 1e3 c
      20. 1 AU/s
      21. 10 AU/s
      22. 1000 AU/s
      23. 10000 AU/s
      24. 1 pc/s
      25. 2 pc/s
      26. 10 pc/s
      27. 1000 pc/s
      28. unlimited
      Parameters:
      index - The index of the maximum speed setting.
    • set_tracking_object Link icon

      void set_tracking_object(String name)
      Set the camera to track the object with the given name. In this mode, the position of the camera is still dependent on the focus object (if any), but its direction points to the tracking object.
      Parameters:
      name - The name of the new tracking object.
    • remove_tracking_object Link icon

      void remove_tracking_object()
      Remove the tracking object from the camera, if any.
    • get_closest_object Link icon

      IFocus get_closest_object()
      Return the closest object to the camera in this instant as a IFocus.
      Returns:
      The closest object to the camera.
    • set_fov Link icon

      void set_fov(float fov)
      Set the field of view of the perspective matrix of the camera, in degrees.
      Parameters:
      fov - The new field of view value in degrees, between Constants.MIN_FOV and Constants.MAX_FOV.
    • get_fov Link icon

      double get_fov()
      Return the current camera field of view angle, in degrees.
      Returns:
      The current camera field of view angle, in degrees.
    • set_state Link icon

      void set_state(double[] pos, double[] dir, double[] up)
      Set the camera state (position, direction and up vector).
      Parameters:
      pos - The position of the camera in internal units, not Km.
      dir - The direction of the camera.
      up - The up vector of the camera.
    • set_state_and_time Link icon

      void set_state_and_time(double[] pos, double[] dir, double[] up, long time)
      Set the camera state (position, direction and up vector) plus the current time.
      Parameters:
      pos - The position of the camera in internal units, not Km.
      dir - The direction of the camera.
      up - The up vector of the camera.
      time - The new time of the camera as the number of milliseconds since the epoch (Jan 1, 1970).
    • transition Link icon

      void transition(double[] pos, double[] dir, double[] up, double duration)
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds. This function waits for the transition to finish and then returns control to the script.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Parameters:
      pos - The target camera position in the internal reference system.
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      duration - The duration of the transition in seconds.
    • transition Link icon

      void transition(double[] pos, String units, double[] dir, double[] up, double duration)
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds. This function waits for the transition to finish and then returns control to the script.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      units - The distance units to use. One of "m", "km", "AU", "ly", "pc", "internal".
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      duration - The duration of the transition in seconds.
    • transition_km Link icon

      void transition_km(double[] pos, double[] dir, double[] up, double duration)
      Same as transition(double[], double[], double[], double) but the camera position is given in Km.
      Parameters:
      pos - The target camera position in Km.
      dir - The target camera direction vector.
      up - The target camera up vector.
      duration - The duration of the transition in seconds.
    • transition Link icon

      void transition(double[] pos, double[] dir, double[] up, double duration, boolean sync)
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds. Optionally, the transition may be run synchronously or asynchronously to the current script.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Parameters:
      pos - The target camera position in the internal reference system.
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      duration - The duration of the transition in seconds.
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition Link icon

      void transition(double[] pos, String units, double[] dir, double[] up, double duration, boolean sync)
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp} with the given duration, in seconds. Optionally, the transition may be run synchronously or asynchronously to the current script.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      units - The distance units to use. One of "m", "km", "AU", "ly", "pc", "internal".
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      duration - The duration of the transition in seconds.
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition Link icon

      void transition(double[] pos, double[] dir, double[] up, double pos_duration, String pos_smooth_type, double pos_smooth_factor, double ori_duration, String ori_smooth_type, double ori_smooth_factor)
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp}, with the given duration, in seconds.

      This function accepts smoothing types and factors for the position and orientation.

      This function will put the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      pos_duration - The duration of the transition in position, in seconds.
      pos_smooth_type - The function type to use for the smoothing of positions. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      pos_smooth_factor - Smooth factor for the positions (depends on type).
      ori_duration - The duration of the transition in orientation, in seconds.
      ori_smooth_type - The function type to use for the smoothing of orientations. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      ori_smooth_factor - Smooth factor for the orientations (depends on type).
    • transition Link icon

      void transition(double[] pos, String units, double[] dir, double[] up, double pos_duration, String pos_smooth_type, double pos_smooth_factor, double ori_duration, String ori_smooth_type, double ori_smooth_factor, boolean sync)
      Create a smooth transition from the current camera state to the given camera state {camPos, camDir, camUp}, with the given duration, in seconds.

      This function accepts smoothing types and factors for the position and orientation.

      Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).

      This function puts the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      units - The distance units to use. One of "m", "km", "AU", "ly", "pc", "internal".
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      pos_duration - The duration of the transition in position, in seconds.
      pos_smooth_type - The function type to use for the smoothing of positions. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      pos_smooth_factor - Smooth factor for the positions (depends on type).
      ori_duration - The duration of the transition in orientation, in seconds.
      ori_smooth_type - The function type to use for the smoothing of orientations. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      ori_smooth_factor - Smooth factor for the orientations (depends on type).
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition_position Link icon

      void transition_position(double[] pos, String units, double duration, String smooth_type, double smooth_factor, boolean sync)
      Create a smooth transition from the current camera position to the given camera position, with the given duration, in seconds.

      This function accepts smoothing type and factor.

      Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).

      This function puts the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Parameters:
      pos - The target camera position in the internal reference system and the given distance units.
      units - The distance units to use. One of "m", "km", "AU", "ly", "pc", "internal".
      duration - The duration of the transition in position, in seconds.
      smooth_type - The function type to use for the smoothing of positions. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      smooth_factor - Smooth factor for the positions (depends on type).
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition_orientation Link icon

      void transition_orientation(double[] dir, double[] up, double duration, String smooth_type, double smooth_factor, boolean sync)
      Create a smooth transition from the current camera orientation to the given camera orientation {camDir, camUp}, with the given duration, in seconds.

      This function accepts smoothing type and factor.

      Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).

      This function puts the camera in free mode, so make sure to change it afterward if you need to. Also, this only works with the natural camera.

      Parameters:
      dir - The target camera direction in the internal reference system.
      up - The target camera up in the internal reference system.
      duration - The duration of the transition in orientation, in seconds.
      smooth_type - The function type to use for the smoothing of orientations. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      smooth_factor - Smooth factor for the orientations (depends on type).
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.
    • transition_fov Link icon

      void transition_fov(double target_fov, double duration)
      Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.

      This call is synchronous, i.e., returns only after the transition has finished.

      Parameters:
      target_fov - The target FOV angle.
      duration - The duration of the transition, in seconds.
    • transition_fov Link icon

      void transition_fov(double target_fov, double duration, String smooth_type, double smooth_factor)
      Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.

      This function accepts smoothing type and factor.

      This call is synchronous, i.e., returns only after the transition has finished.

      Parameters:
      target_fov - The target FOV angle.
      duration - The duration of the transition, in seconds.
      smooth_type - The function type to use for the smoothing. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      smooth_factor - Smoothing factor (depends on type).
    • transition_fov Link icon

      void transition_fov(double target_fov, double duration, String smooth_type, double smooth_factor, boolean sync)
      Create a smooth transition from the current camera field of view angle (FOV) to the given target FOV, with the given duration, in seconds.

      This function accepts smoothing type and factor.

      Optionally, this call may return immediately (async) or it may wait for the transition to finish (sync).

      Parameters:
      target_fov - The target FOV angle.
      duration - The duration of the transition, in seconds.
      smooth_type - The function type to use for the smoothing. Either "logit", "logisticsigmoid" or "none".
      • "logisticsigmoid": starts slow and ends slow. The smooth factor must be over 12 to produce an effect, otherwise, linear interpolation is used.
      • "logit": starts fast and ends fast. The smooth factor must be between 0.09 and 0.01.
      • "none": no smoothing is applied.
      smooth_factor - Smoothing factor (depends on type).
      sync - If true, the call waits for the transition to finish before returning, otherwise it returns immediately.