Interface ICamera

All Known Implementing Classes:
AbstractCamera, CameraManager, NaturalCamera, RelativisticCamera, SpacecraftCamera

public interface ICamera
  • Method Details

    • getCamera getCamera()
      Returns the perspective camera.
      The perspective camera.
    • setCamera

      void setCamera( perspectiveCamera)
      Sets the active camera
      perspectiveCamera - The perspective camera.
    • getCameraStereoLeft getCameraStereoLeft()
    • setCameraStereoLeft

      void setCameraStereoLeft( cam)
    • getCameraStereoRight getCameraStereoRight()
    • setCameraStereoRight

      void setCameraStereoRight( cam)
    • getFrontCameras[] getFrontCameras()
    • getCurrent

      ICamera getCurrent()
    • getFovFactor

      float getFovFactor()
    • getPos

      Vector3b getPos()
    • setPos

      void setPos(Vector3d pos)
    • setPos

      void setPos(Vector3b pos)
    • getPreviousPos

      Vector3b getPreviousPos()
    • setPreviousPos

      void setPreviousPos(Vector3d pos)
    • setPreviousPos

      void setPreviousPos(Vector3b pos)
    • getInversePos

      Vector3b getInversePos()
    • getDirection

      Vector3d getDirection()
    • setDirection

      void setDirection(Vector3d dir)
    • getVelocity

      Vector3d getVelocity()
    • getUp

      Vector3d getUp()
    • getDirections

      Vector3d[] getDirections()
    • getNCameras

      int getNCameras()
    • speedScaling

      double speedScaling()
    • getShift

      Vector3d getShift()
    • setShift

      void setShift(Vector3d shift)
    • getProjView

      com.badlogic.gdx.math.Matrix4 getProjView()
    • getPreviousProjView

      com.badlogic.gdx.math.Matrix4 getPreviousProjView()
    • setPreviousProjView

      void setPreviousProjView(com.badlogic.gdx.math.Matrix4 mat)
    • update

      void update(double dt, ITimeFrameProvider time)
      Updates the camera.
      dt - The time since the las frame in seconds.
      time - The frame time provider (simulation time).
    • updateMode

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

    • updateAngleEdge

      void updateAngleEdge(int width, int height)
    • getAngleEdge

      float getAngleEdge()
      Gets the angle of the edge of the screen, diagonally. It assumes the vertical angle is the field of view and corrects the horizontal using the aspect ratio. It depends on the viewport size and the field of view itself.
      The angle in radians.
    • getManager

      CameraManager getManager()
    • render

      void render(int rw, int rh)
    • getSpeed

      double getSpeed()
      Gets the current velocity of the camera in km/h.
      The velocity in km/h.
    • getDistance

      double getDistance()
      Gets the distance from the camera to the centre of our reference frame (Sun)
      The distance
    • getFocus

      IFocus getFocus()
      Returns the focus if any.
      The focus object if it is in focus mode. Null otherwise.
    • hasFocus

      boolean hasFocus()
      Checks whether the current camera has a focus set.
      True if the camera has a focus.
    • isFocus

      boolean isFocus(com.badlogic.ashley.core.Entity entity)
      Checks if the given entity is the current focus.
      entity - The entity.
      Whether the entity is focus.
    • checkClosestBody

      void checkClosestBody(IFocus focus)
      Called after updating the body's distance to the cam, it updates the closest body in the camera to figure out the camera near
      focus - The body to check
    • checkClosestBody

      void checkClosestBody(com.badlogic.ashley.core.Entity entity)
      Called after updating the body's distance to the cam, it updates the closest body in the camera to figure out the camera near
      entity - The body to check.
    • getClosestBody

      IFocus getClosestBody()
    • getSecondClosestBody

      IFocus getSecondClosestBody()
    • isVisible

      boolean isVisible(com.badlogic.ashley.core.Entity cb)
    • isVisible

      boolean isVisible(double viewAngle, Vector3d pos, double distToCamera)
    • resize

      void resize(int width, int height)
    • getClosestParticle

      IFocus getClosestParticle()
      Gets the current closest particle to this camera
      The closest particle
    • getCloseLightSource

      IFocus getCloseLightSource(int i)
      Gets the current i-close light source to this camera
      The i close light source (star?)
    • checkClosestParticle

      void checkClosestParticle(IFocus particle)
      Sets the current closest particle to this camera. This will be only set if the given particle is closer than the current.
      particle - The candidate particle
    • getClosest

      IFocus getClosest()
      Returns the current closest object
    • setClosest

      void setClosest(IFocus focus)
      Sets the closest of all
      focus - The new closest object
    • updateFrustumPlanes

      void updateFrustumPlanes()
    • getNear

      double getNear()
    • getFar

      double getFar()
    • swapBuffers

      void swapBuffers()
    • setGamepadInput

      void setGamepadInput(boolean state)
      Main input mode is a gamepad.
    • setPointerProjectionOnFocus

      void setPointerProjectionOnFocus(com.badlogic.gdx.math.Vector3 point)
      Sets the current pointer coordinates, as projected on the current focus object. This only applies when the camera is in focus mode, and the focus is a planet.
      point - The Cartesian coordinates of the pointer on the sphere representing the focus object.