Class FreeFlightCamera
java.lang.Object
de.gurkenlabs.litiengine.graphics.Camera
de.gurkenlabs.litiengine.graphics.FreeFlightCamera
- All Implemented Interfaces:
ICamera
,IUpdateable
public class FreeFlightCamera
extends Camera
implements IUpdateable
Nested Class Summary
Nested classes/interfaces inherited from interface de.gurkenlabs.litiengine.graphics.ICamera
ICamera.FocusChangedListener, ICamera.ZoomChangedListener
Constructor Summary
Constructors Constructor Description FreeFlightCamera()
Initializes a new instance of theFreeFlightCamera
.FreeFlightCamera(double x, double y)
Initializes a new instance of theFreeFlightCamera
with the specified initial focus.FreeFlightCamera(java.awt.geom.Point2D focus)
Initializes a new instance of theFreeFlightCamera
with the specified initial focus.Method Summary
Modifier and Type Method Description double
getScrollPadding()
double
getVelocity()
void
setScrollPadding(double scrollPadding)
void
setVelocity(double velocity)
void
update()
This method is called by the game loop on all objects that are attached to the loop.Methods inherited from class de.gurkenlabs.litiengine.graphics.Camera
clampToMap, getClampAlign, getClampValign, getFocus, getMapLocation, getPixelOffsetX, getPixelOffsetY, getViewport, getViewportDimensionCenter, getViewportHeight, getViewportLocation, getViewportWidth, getZoom, isClampToMap, onFocus, onZoom, pan, pan, panTime, removeFocusListener, removeZoomListener, setClampAlign, setClampToMap, setFocus, setFocus, setZoom, shake, updateFocus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.gurkenlabs.litiengine.graphics.ICamera
getRenderScale, getViewportLocation, getViewportLocation
Constructor Details
FreeFlightCamera
public FreeFlightCamera()Initializes a new instance of theFreeFlightCamera
.FreeFlightCamera
public FreeFlightCamera(double x, double y)Initializes a new instance of theFreeFlightCamera
with the specified initial focus.- Parameters:
x
- The x-coordinate of the initial focus of this instance.y
- The y-coordinate of the initial focus of this instance.
FreeFlightCamera
public FreeFlightCamera(java.awt.geom.Point2D focus)Initializes a new instance of theFreeFlightCamera
with the specified initial focus.- Parameters:
focus
- The initial focus of this instance.
Method Details
getVelocity
public double getVelocity()getScrollPadding
public double getScrollPadding()setVelocity
public void setVelocity(double velocity)setScrollPadding
public void setScrollPadding(double scrollPadding)update
public void update()Description copied from interface:IUpdateable
This method is called by the game loop on all objects that are attached to the loop. It's called on every tick of the loop and the frequency can be configured using theClientConfiguration
.- Specified by:
update
in interfaceIUpdateable
- Overrides:
update
in classCamera
- See Also:
ClientConfiguration.setMaxFps(int)