public interface ICamera extends IUpdateable
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Point2D |
getFocus()
Gets the map location that is focused by this camera.
|
java.awt.geom.Point2D |
getMapLocation(java.awt.geom.Point2D point)
Gets the map location.
|
double |
getPixelOffsetX()
Gets the pixel offset x.
|
double |
getPixelOffsetY()
Gets the pixel offset y.
|
float |
getRenderScale() |
java.awt.geom.Rectangle2D |
getViewPort()
Gets the camera region.
|
java.awt.geom.Point2D |
getViewPortDimensionCenter(IEntity entity) |
java.awt.geom.Point2D |
getViewPortLocation(double x,
double y)
Gets the render location.
|
java.awt.geom.Point2D |
getViewPortLocation(IEntity entity)
This method calculates to location for the specified entity in relation to
the focus map location of the camera.
|
java.awt.geom.Point2D |
getViewPortLocation(java.awt.geom.Point2D point)
This method calculates to location for the specified point in relation to
the focus map location of the camera.
|
float |
getZoom() |
boolean |
isClampToMap() |
void |
onFocusChanged(java.util.function.Consumer<java.awt.geom.Point2D> focusCons) |
void |
onZoomChanged(java.util.function.Consumer<java.lang.Float> zoomCons) |
void |
setClampToMap(boolean clampToMap) |
void |
setFocus(double x,
double y) |
void |
setFocus(java.awt.geom.Point2D focus) |
void |
setZoom(float zoom,
int delay) |
void |
shake(double intensity,
int delay,
int duration) |
void |
updateFocus() |
update
java.awt.geom.Point2D getFocus()
java.awt.geom.Point2D getMapLocation(java.awt.geom.Point2D point)
point
- the pointdouble getPixelOffsetX()
double getPixelOffsetY()
java.awt.geom.Rectangle2D getViewPort()
java.awt.geom.Point2D getViewPortDimensionCenter(IEntity entity)
java.awt.geom.Point2D getViewPortLocation(double x, double y)
x
- the xy
- the yjava.awt.geom.Point2D getViewPortLocation(IEntity entity)
entity
- the entityjava.awt.geom.Point2D getViewPortLocation(java.awt.geom.Point2D point)
point
- the pointfloat getRenderScale()
float getZoom()
void onZoomChanged(java.util.function.Consumer<java.lang.Float> zoomCons)
void onFocusChanged(java.util.function.Consumer<java.awt.geom.Point2D> focusCons)
void setFocus(java.awt.geom.Point2D focus)
void setFocus(double x, double y)
void setZoom(float zoom, int delay)
boolean isClampToMap()
void setClampToMap(boolean clampToMap)
void shake(double intensity, int delay, int duration)
void updateFocus()