Class RelativisticCamera

java.lang.Object
gaiasky.scene.camera.AbstractCamera
gaiasky.scene.camera.RelativisticCamera
All Implemented Interfaces:
ICamera

public class RelativisticCamera extends AbstractCamera
  • Field Details

  • Constructor Details

    • RelativisticCamera

      public RelativisticCamera(CameraManager parent)
    • RelativisticCamera

      public RelativisticCamera(com.badlogic.gdx.assets.AssetManager assetManager, CameraManager parent)
  • Method Details

    • doneLoading

      public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
      Description copied from interface: ICamera
      Loading is finished, gather resources.
      Parameters:
      manager - The asset manager.
    • getCamera

      public com.badlogic.gdx.graphics.PerspectiveCamera getCamera()
      Description copied from interface: ICamera
      Returns the perspective camera.
      Returns:
      The perspective camera.
    • setCamera

      public void setCamera(com.badlogic.gdx.graphics.PerspectiveCamera perspectiveCamera)
      Description copied from interface: ICamera
      Sets the active camera
      Parameters:
      perspectiveCamera - The perspective camera.
    • getFrontCameras

      public com.badlogic.gdx.graphics.PerspectiveCamera[] getFrontCameras()
    • getDirection

      public Vector3D getDirection()
    • setDirection

      public void setDirection(Vector3D dir)
    • getUp

      public Vector3D getUp()
    • getDirections

      public Vector3D[] getDirections()
    • getNCameras

      public int getNCameras()
    • speedScaling

      public double speedScaling()
    • update

      public void update(double dt, ITimeFrameProvider time)
      Description copied from interface: ICamera
      Updates the camera.
      Parameters:
      dt - The time since the las frame in seconds.
      time - The frame time provider (simulation time).
    • updateMode

      public void updateMode(ICamera previousCam, CameraManager.CameraMode previousMode, CameraManager.CameraMode newMode, boolean centerFocus)
    • getMode

      public CameraManager.CameraMode getMode()
    • getSpeed

      public double getSpeed()
      Description copied from interface: ICamera
      Gets the current velocity of the camera in km/h.
      Returns:
      The velocity in km/h.
    • getFocus

      public IFocus getFocus()
      Description copied from interface: ICamera
      Returns the focus if any.
      Returns:
      The focus object if it is in focus mode. Null otherwise.
    • getFocusDx

      public Vector3Q getFocusDx()
      Description copied from interface: ICamera
      Returns the focus position delta computed in the last camera update (next focus position minus current focus position). Only meaningful in focus mode with the position lock enabled. May be null.
      Returns:
      The focus position delta, or null if not applicable.
    • hasFocus

      public boolean hasFocus()
      Description copied from interface: ICamera
      Checks whether the current camera has a focus set.
      Returns:
      True if the camera has a focus.
    • isFocus

      public boolean isFocus(com.badlogic.ashley.core.Entity entity)
      Description copied from interface: ICamera
      Checks if the given entity is the current focus.
      Parameters:
      entity - The entity.
      Returns:
      Whether the entity is focus.
    • resize

      public void resize(int width, int height)