Class RelativisticCamera
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.scenegraph.camera.AbstractCamera
-
- gaia.cu9.ari.gaiaorbit.scenegraph.camera.RelativisticCamera
-
- All Implemented Interfaces:
ICamera
public class RelativisticCamera extends AbstractCamera
-
-
Constructor Summary
Constructors Constructor Description RelativisticCamera(com.badlogic.gdx.assets.AssetManager assetManager, CameraManager parent)RelativisticCamera(CameraManager parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.badlogic.gdx.graphics.PerspectiveCameragetCamera()Returns the perspective camera.Vector3dgetDirection()Vector3d[]getDirections()IFocusgetFocus()Returns the foucs if anycom.badlogic.gdx.graphics.PerspectiveCamera[]getFrontCameras()CameraManager.CameraModegetMode()intgetNCameras()doublegetSpeed()Gets the current velocity of the camera in km/h.doublegetTranslateUnits()Vector3dgetUp()booleanisFocus(IFocus cb)Checks if this body is the current focusvoidresize(int width, int height)voidsetCamera(com.badlogic.gdx.graphics.PerspectiveCamera cam)Sets the active cameravoidsetDirection(Vector3d dir)voidupdate(double dt, ITimeFrameProvider time)Updates the camera.voidupdateMode(CameraManager.CameraMode mode, boolean centerFocus, boolean postEvent)-
Methods inherited from class gaia.cu9.ari.gaiaorbit.scenegraph.camera.AbstractCamera
checkClosest, computeGaiaScan, computeVisibleFovs, copyParamsFrom, getAngleEdge, getAngleEdge, getCameraStereoLeft, getCameraStereoRight, getClosest, getClosest2, getClosestStar, getCurrent, getDistance, getFovFactor, getInversePos, getManager, getPos, getVelocity, isVisible, isVisible, render, setCameraStereoLeft, setCameraStereoRight, setClosestStar, setPos, updateAngleEdge, updateFrustum
-
-
-
-
Constructor Detail
-
RelativisticCamera
public RelativisticCamera(CameraManager parent)
-
RelativisticCamera
public RelativisticCamera(com.badlogic.gdx.assets.AssetManager assetManager, CameraManager parent)
-
-
Method Detail
-
getCamera
public com.badlogic.gdx.graphics.PerspectiveCamera getCamera()
Description copied from interface:ICameraReturns the perspective camera.- Returns:
- The perspective camera.
-
setCamera
public void setCamera(com.badlogic.gdx.graphics.PerspectiveCamera cam)
Description copied from interface:ICameraSets the active camera
-
getFrontCameras
public com.badlogic.gdx.graphics.PerspectiveCamera[] getFrontCameras()
-
setDirection
public void setDirection(Vector3d dir)
-
getDirection
public Vector3d getDirection()
-
getUp
public Vector3d getUp()
-
getDirections
public Vector3d[] getDirections()
-
getNCameras
public int getNCameras()
-
getTranslateUnits
public double getTranslateUnits()
-
update
public void update(double dt, ITimeFrameProvider time)Description copied from interface:ICameraUpdates the camera.- Parameters:
dt- The time since the las frame in seconds.time- The frame time provider (simulation time).
-
updateMode
public void updateMode(CameraManager.CameraMode mode, boolean centerFocus, boolean postEvent)
-
getMode
public CameraManager.CameraMode getMode()
-
getSpeed
public double getSpeed()
Description copied from interface:ICameraGets the current velocity of the camera in km/h.- Returns:
- The velocity in km/h.
-
getFocus
public IFocus getFocus()
Description copied from interface:ICameraReturns the foucs if any- Returns:
- The foucs object if it is in focus mode. Null otherwise
-
isFocus
public boolean isFocus(IFocus cb)
Description copied from interface:ICameraChecks if this body is the current focus- Parameters:
cb- The body- Returns:
- Whether the body is focus
-
resize
public void resize(int width, int height)
-
-