Class FovCamera

All Implemented Interfaces:
IObserver, ICamera

public class FovCamera extends AbstractCamera implements IObserver
The field of view cameras
  • Field Details


      public long MAX_OVERLAP_TIME
      time that has to pass with the current scan rate so that we scan to the edge of the current field of view.

      public float MAX_OVERLAP_ANGLE
    • gaia

      public Gaia gaia
    • directions

      public Vector3d[] directions
    • interpolatedDirections

      public List<Vector3d[]> interpolatedDirections
    • currentTime

      public long currentTime
    • lastTime

      public long lastTime
    • dirindex

      public int dirindex
  • Constructor Details

    • FovCamera

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

    • initialize

      public void initialize(com.badlogic.gdx.assets.AssetManager assetManager)
    • update

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

      public void updateDirections(ITimeFrameProvider time)
      Updates both FOVs' directions applying the right transformation.
      time -
    • getDirections

      public Vector3d[] getDirections(Date d)
    • getFrontCameras

      public[] getFrontCameras()
      Specified by:
      getFrontCameras in interface ICamera
    • getCamera

      public getCamera()
      Description copied from interface: ICamera
      Returns the perspective camera.
      Specified by:
      getCamera in interface ICamera
      The perspective camera.
    • getFovFactor

      public float getFovFactor()
      Specified by:
      getFovFactor in interface ICamera
      getFovFactor in class AbstractCamera
    • getDirection

      public Vector3d getDirection()
      Specified by:
      getDirection in interface ICamera
    • setDirection

      public void setDirection(Vector3d dir)
      Specified by:
      setDirection in interface ICamera
    • getUp

      public Vector3d getUp()
      Specified by:
      getUp in interface ICamera
    • getDirections

      public final Vector3d[] getDirections()
      Specified by:
      getDirections in interface ICamera
    • notify

      public void notify(Events event, Object... data)
      Specified by:
      notify in interface IObserver
    • updateMode

      public void updateMode(ICamera previousCam, CameraManager.CameraMode previousMode, CameraManager.CameraMode newMode, boolean centerFocus, boolean postEvent)
      Specified by:
      updateMode in interface ICamera
    • getNCameras

      public int getNCameras()
      Specified by:
      getNCameras in interface ICamera
    • getMode

      public CameraManager.CameraMode getMode()
      Specified by:
      getMode in interface ICamera
    • updateAngleEdge

      public void updateAngleEdge(int width, int height)
      We have fixed field of view angles and thus fixed aspect ratio.
      Specified by:
      updateAngleEdge in interface ICamera
      updateAngleEdge in class AbstractCamera
    • render

      public void render(int rw, int rh)
      Specified by:
      render in interface ICamera
      render in class AbstractCamera
    • getSpeed

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

      public boolean isFocus(IFocus cb)
      Description copied from interface: ICamera
      Checks if this body is the current focus
      Specified by:
      isFocus in interface ICamera
      cb - The body
      Whether the body is focus
    • getFocus

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

      public boolean isVisible(CelestialBody cb)
      Specified by:
      isVisible in interface ICamera
      isVisible in class AbstractCamera
    • setCamera

      public void setCamera( cam)
      Description copied from interface: ICamera
      Sets the active camera
      Specified by:
      setCamera in interface ICamera
    • resize

      public void resize(int width, int height)
      Specified by:
      resize in interface ICamera
    • getFrustum2

      public Frustumd getFrustum2()
    • speedScaling

      public double speedScaling()
      Specified by:
      speedScaling in interface ICamera