Package engine.tools

Class Maths

java.lang.Object
engine.tools.Maths

public class Maths extends Object
Class used to create the Matrices needed by the shaders for calculations.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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
    ViewMatrix is calculated with the position of the camera withing the 3D world

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static org.joml.Matrix4f createViewMatrix(Camera camera)
      ViewMatrix is calculated with the position of the camera withing the 3D world
      Parameters:
      camera -
      Returns: