Package com.nevergarden.myna.display
Class View
- java.lang.Object
-
- com.nevergarden.myna.events.EventDispatcher
-
- com.nevergarden.myna.display.View
-
public class View extends EventDispatcher
A View is the same concept as a camera, a viewer or anything that moves and can view the world.
-
-
Field Summary
Fields Modifier and Type Field Description protected Vector3f
position
Current position of view.protected org.joml.Matrix4f
transform
Transformation of this camera.-
Fields inherited from class com.nevergarden.myna.events.EventDispatcher
eventListeners
-
-
Constructor Summary
Constructors Constructor Description View()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector3f
getPosition()
Get position.protected void
recalculateMatrix()
Recalculates the view matrix used by stage.void
setPosition(float x, float y)
Set current position of the view.-
Methods inherited from class com.nevergarden.myna.events.EventDispatcher
addEventListener, dispatchEvent, dispatchEventWith, dispatchEventWith, dispose, hasEventListener, invokeEvent, removeEventListener, removeEventListeners
-
-
-
-
Field Detail
-
transform
protected org.joml.Matrix4f transform
Transformation of this camera.
-
position
protected Vector3f position
Current position of view.
-
-
Method Detail
-
getPosition
public Vector3f getPosition()
Get position.- Returns:
- position
-
setPosition
public void setPosition(float x, float y)
Set current position of the view.- Parameters:
x
- x valuey
- y value
-
recalculateMatrix
protected void recalculateMatrix()
Recalculates the view matrix used by stage.
-
-