core library

Classes

Aabb3
Defines a 3-dimensional axis-aligned bounding box between a min and a max position.
Matrix2
2D Matrix. Values are stored in column major order.
Matrix3
3D Matrix. Values are stored in column major order.
Matrix4
4D Matrix. Values are stored in column major order.
Quaternion
Defines a Quaternion (a four-dimensional vector) for efficient rotation calculations.
QuaternionUtils
Vector2
2D column vector.
Vector2Utils
Vector3
3D column vector.
Vector3Utils
Vector4
4D column vector.
Vector4Utils

Constants

degrees2Radians → const double
Constant factor to convert and angle from degrees to radians.

Functions

setOrthographicMatrix(Matrix4 orthographicMatrix, double left, double right, double bottom, double top, double near, double far) → void
Constructs an OpenGL orthographic projection matrix in orthographicMatrix.
setPerspectiveMatrix(Matrix4 perspectiveMatrix, double fovYRadians, double aspectRatio, double zNear, double zFar) → void
Constructs an OpenGL perspective projection matrix in perspectiveMatrix.
setViewMatrix(Matrix4 viewMatrix, Vector3 cameraPosition, Vector3 cameraFocusPosition, Vector3 upDirection) → void
Constructs an OpenGL view matrix in viewMatrix. View transformation is the inverse of the model transformation. View matrix is commonly used to compute the camera location/orientation into the full model-view stack.

Typedefs

ImmutableVector2 = ({double x, double y})
Represents an immutable Vector2.
ImmutableVector3 = ({double x, double y, double z})
Represents an immutable Vector3.
ImmutableVector4 = ({double w, double x, double y, double z})
Represents an immutable Vector3.