Package engine.tools
Class Maths
java.lang.Object
engine.tools.Maths
Class used to create the Matrices needed by the shaders for calculations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.joml.Matrix4f
createTransformationMatrix
(org.joml.Vector2f translation, org.joml.Vector2f scale) Transformation matrix is calculated by the change in position of the 2D components within the 3D world.static org.joml.Matrix4f
createTransformationMatrix
(org.joml.Vector3f translation, float rx, float ry, float rz, float scale) Transformation matrix is calculated by the change in position of the 3D objects within the 3D world.static org.joml.Matrix4f
createViewMatrix
(Camera camera) ViewMatrix is calculated with the position of the camera withing the 3D world
-
Constructor Details
-
Maths
public Maths()
-
-
Method Details
-
createTransformationMatrix
public static org.joml.Matrix4f createTransformationMatrix(org.joml.Vector2f translation, org.joml.Vector2f scale) Transformation matrix is calculated by the change in position of the 2D components within the 3D world.- Parameters:
translation
-scale
-- Returns:
-
createTransformationMatrix
public static org.joml.Matrix4f createTransformationMatrix(org.joml.Vector3f translation, float rx, float ry, float rz, float scale) Transformation matrix is calculated by the change in position of the 3D objects within the 3D world.- Parameters:
translation
-rx
-ry
-rz
-scale
-- Returns:
-
createViewMatrix
ViewMatrix is calculated with the position of the camera withing the 3D world- Parameters:
camera
-- Returns:
-