Class FovCamera
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.scenegraph.camera.AbstractCamera
-
- gaia.cu9.ari.gaiaorbit.scenegraph.camera.FovCamera
-
public class FovCamera extends AbstractCamera implements IObserver
The field of view cameras.
-
-
Field Summary
Fields Modifier and Type Field Description long
currentTime
Vector3d[]
directions
int
dirindex
Gaia
gaia
java.util.List<Vector3d[]>
interpolatedDirections
long
lastTime
float
MAX_OVERLAP_ANGLE
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.
-
Constructor Summary
Constructors Constructor Description FovCamera(com.badlogic.gdx.assets.AssetManager assetManager, CameraManager parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
computeGaiaScan(ITimeFrameProvider time, CelestialBody cb)
com.badlogic.gdx.graphics.PerspectiveCamera
getCamera()
Returns the perspective camera.Vector3d
getDirection()
Vector3d[]
getDirections()
Vector3d[]
getDirections(java.util.Date d)
IFocus
getFocus()
Returns the foucs if anyfloat
getFovFactor()
com.badlogic.gdx.graphics.PerspectiveCamera[]
getFrontCameras()
Frustumd
getFrustum2()
CameraManager.CameraMode
getMode()
int
getNCameras()
double
getSpeed()
Gets the current velocity of the camera in km/h.double
getTranslateUnits()
Vector3d
getUp()
void
initialize(com.badlogic.gdx.assets.AssetManager assetManager)
boolean
isFocus(IFocus cb)
Checks if this body is the current focusboolean
isVisible(ITimeFrameProvider time, CelestialBody cb)
void
notify(Events event, java.lang.Object... data)
void
render(int rw, int rh)
void
resize(int width, int height)
void
setCamera(com.badlogic.gdx.graphics.PerspectiveCamera cam)
Sets the active cameravoid
setDirection(Vector3d dir)
void
update(double dt, ITimeFrameProvider time)
Updates the camera.void
updateAngleEdge(int width, int height)
We have fixed field of view angles and thus fixed aspect ratio.void
updateDirections(ITimeFrameProvider time)
Updates both FOVs' directions applying the right transformation.void
updateMode(CameraManager.CameraMode mode, boolean centerFocus, boolean postEvent)
-
Methods inherited from class gaia.cu9.ari.gaiaorbit.scenegraph.camera.AbstractCamera
checkClosest, computeVisibleFovs, copyParamsFrom, getAngleEdge, getAngleEdge, getCameraStereoLeft, getCameraStereoRight, getClosest, getClosest2, getClosestStar, getCurrent, getDistance, getInversePos, getManager, getPos, getVelocity, isVisible, setCameraStereoLeft, setCameraStereoRight, setClosestStar, setPos, updateFrustum
-
-
-
-
Field Detail
-
MAX_OVERLAP_TIME
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.
-
MAX_OVERLAP_ANGLE
public float MAX_OVERLAP_ANGLE
-
gaia
public Gaia gaia
-
directions
public Vector3d[] directions
-
interpolatedDirections
public java.util.List<Vector3d[]> interpolatedDirections
-
currentTime
public long currentTime
-
lastTime
public long lastTime
-
dirindex
public int dirindex
-
-
Constructor Detail
-
FovCamera
public FovCamera(com.badlogic.gdx.assets.AssetManager assetManager, CameraManager parent)
-
-
Method Detail
-
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.
-
updateDirections
public void updateDirections(ITimeFrameProvider time)
Updates both FOVs' directions applying the right transformation.- Parameters:
time
-
-
getDirections
public Vector3d[] getDirections(java.util.Date d)
-
getFrontCameras
public com.badlogic.gdx.graphics.PerspectiveCamera[] getFrontCameras()
- Specified by:
getFrontCameras
in interfaceICamera
-
getCamera
public com.badlogic.gdx.graphics.PerspectiveCamera getCamera()
Description copied from interface:ICamera
Returns the perspective camera.
-
getFovFactor
public float getFovFactor()
- Specified by:
getFovFactor
in interfaceICamera
- Overrides:
getFovFactor
in classAbstractCamera
-
getDirection
public Vector3d getDirection()
- Specified by:
getDirection
in interfaceICamera
-
setDirection
public void setDirection(Vector3d dir)
- Specified by:
setDirection
in interfaceICamera
-
getDirections
public final Vector3d[] getDirections()
- Specified by:
getDirections
in interfaceICamera
-
notify
public void notify(Events event, java.lang.Object... data)
-
updateMode
public void updateMode(CameraManager.CameraMode mode, boolean centerFocus, boolean postEvent)
- Specified by:
updateMode
in interfaceICamera
-
getNCameras
public int getNCameras()
- Specified by:
getNCameras
in interfaceICamera
-
getMode
public CameraManager.CameraMode getMode()
-
updateAngleEdge
public void updateAngleEdge(int width, int height)
We have fixed field of view angles and thus fixed aspect ratio.- Specified by:
updateAngleEdge
in interfaceICamera
- Overrides:
updateAngleEdge
in classAbstractCamera
-
render
public void render(int rw, int rh)
- Specified by:
render
in interfaceICamera
- Overrides:
render
in classAbstractCamera
-
getSpeed
public double getSpeed()
Description copied from interface:ICamera
Gets the current velocity of the camera in km/h.
-
isFocus
public boolean isFocus(IFocus cb)
Description copied from interface:ICamera
Checks if this body is the current focus
-
getFocus
public IFocus getFocus()
Description copied from interface:ICamera
Returns the foucs if any
-
computeGaiaScan
public void computeGaiaScan(ITimeFrameProvider time, CelestialBody cb)
- Specified by:
computeGaiaScan
in interfaceICamera
- Overrides:
computeGaiaScan
in classAbstractCamera
-
isVisible
public boolean isVisible(ITimeFrameProvider time, CelestialBody cb)
- Specified by:
isVisible
in interfaceICamera
- Overrides:
isVisible
in classAbstractCamera
-
setCamera
public void setCamera(com.badlogic.gdx.graphics.PerspectiveCamera cam)
Description copied from interface:ICamera
Sets the active camera
-
getFrustum2
public Frustumd getFrustum2()
-
getTranslateUnits
public double getTranslateUnits()
- Specified by:
getTranslateUnits
in interfaceICamera
-
-