Interface Camera


public interface Camera
Camera represents the "camera" of the 3D view.
Since:
9.10.8
  • Method Details

    • getLocation

      Vector3d getLocation()
      Returns the global location of the 3D camera.
      Returns:
      the location of the camera
      Since:
      9.10.8
    • setLocation

      void setLocation​(Vector3d location)
      Sets the location of the camera.
      Parameters:
      location - the new location
      Since:
      9.10.8
    • getDirection

      Vector3d getDirection()
      Returns the direction the camera is targeting. The returned vector is always non-zero.
      Returns:
      the direction of the camera
      Since:
      9.10.8
    • getUpVector

      Vector3d getUpVector()
      Returns the upwards direction of the camera. The returned vector is always non-zero.
      Returns:
      the upwards direction of the camera
      Since:
      9.10.8
    • lookAt

      void lookAt​(Vector3d lookTarget)
      Look at the given target point. If the target point is the camera position, no changes to the camera direction is done. If the given target point is to the same direction from the camera position as the current upvector, the upvector might change to any arbitrary vector, otherwise the upvector will remain the same as previously, but is corrected based on the new direction.
      Parameters:
      lookTarget - the target point for the camera position
      Since:
      9.10.8
    • lookAt

      void lookAt​(Component component)
      Sets the camera to look at the given component. Best effort is used to make sure the camera position and angle would be suitable.
      Parameters:
      component - the target component
    • lookAt

      void lookAt​(Collection<Component> components)
      Sets the camera to look at the given components. Best effort is used to make sure the camera position and angle would be suitable.
      Parameters:
      components - the target components
    • lookAtComponentsFromPosition

      void lookAtComponentsFromPosition​(Collection<Component> components, Vector3d cameraLocation)
      Moves the camera to look at the given components from the given location.
      Parameters:
      components - the target components
      cameraLocation - the location of the camera
    • setUpVector

      void setUpVector​(Vector3d upVector)
      Sets the upwards vector to the given vector. The given upvector must be non-zero.
      Parameters:
      upVector - the new upVector