Interface ICamera

    • Method Detail

      • getCamera

        com.badlogic.gdx.graphics.PerspectiveCamera getCamera()
        Returns the perspective camera.
        Returns:
        The perspective camera.
      • setCamera

        void setCamera​(com.badlogic.gdx.graphics.PerspectiveCamera cam)
        Sets the active camera
        Parameters:
        cam -
      • getCameraStereoLeft

        com.badlogic.gdx.graphics.PerspectiveCamera getCameraStereoLeft()
      • getCameraStereoRight

        com.badlogic.gdx.graphics.PerspectiveCamera getCameraStereoRight()
      • setCameraStereoLeft

        void setCameraStereoLeft​(com.badlogic.gdx.graphics.PerspectiveCamera cam)
      • setCameraStereoRight

        void setCameraStereoRight​(com.badlogic.gdx.graphics.PerspectiveCamera cam)
      • getFrontCameras

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

        float getFovFactor()
      • getPreviousPos

        Vector3d getPreviousPos()
      • setPreviousPos

        void setPreviousPos​(Vector3d pos)
      • setDirection

        void setDirection​(Vector3d dir)
      • getInversePos

        Vector3d getInversePos()
      • getDirections

        Vector3d[] getDirections()
      • getNCameras

        int getNCameras()
      • speedScaling

        double speedScaling()
      • 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.
        Parameters:
        dt - The time since the las frame in seconds.
        time - The frame time provider (simulation time).
      • 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.
        Returns:
        The angle in radians.
      • render

        void render​(int rw,
                    int rh)
      • getSpeed

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

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

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

        boolean isFocus​(IFocus cb)
        Checks if this body is the current focus
        Parameters:
        cb - The body
        Returns:
        Whether the body 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
        Parameters:
        focus - The body to check
      • getClosestBody

        IFocus getClosestBody()
      • getSecondClosestBody

        IFocus getSecondClosestBody()
      • resize

        void resize​(int width,
                    int height)
      • getClosestParticle

        IFocus getClosestParticle()
        Gets the current closest particle to this camera
        Returns:
        The closest particle
      • 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.
        Parameters:
        particle - The candidate particle
      • getClosest

        IFocus getClosest()
        Returns the current closest object
      • setClosest

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

        void updateFrustumPlanes()
      • getNear

        double getNear()
      • getFar

        double getFar()