Package com.toxicrain.rainengine.core
Class GameEngine
java.lang.Object
com.toxicrain.rainengine.core.GameEngine
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean
static com.github.strubium.windowmanager.window.WindowManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FloatBuffer
createPerspectiveProjectionMatrix
(float fov, float aspectRatio, float near, float far) Creates a perspective projection matrix.static void
drawMap
(BatchRenderer batchRenderer) static FloatBuffer
Gets the perspective projection matrix.static void
run()
-
Field Details
-
windowManager
public static com.github.strubium.windowmanager.window.WindowManager windowManager -
gamePaused
public static boolean gamePaused
-
-
Constructor Details
-
GameEngine
public GameEngine()
-
-
Method Details
-
run
public static void run() -
drawMap
-
createPerspectiveProjectionMatrix
public static FloatBuffer createPerspectiveProjectionMatrix(float fov, float aspectRatio, float near, float far) Creates a perspective projection matrix.- Parameters:
fov
- the field of view angle in degreesaspectRatio
- the aspect ratio of the viewport (width/height)near
- the distance to the near clipping planefar
- the distance to the far clipping plane- Returns:
- a FloatBuffer containing the perspective projection matrix
-
getPerspectiveProjectionMatrixBuffer
Gets the perspective projection matrix.- Returns:
- The FloatBuffer containing the perspective projection matrix
-