MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / Mat4

Class Mat4

src/main/java/field/linalg/Mat4.java:45–5719  ·  view source on GitHub ↗

Contains the definition of a 4x4 Matrix of doubles, and associated functions to transform it. The matrix is column-major to match OpenGL's interpretation, and it looks like this: m00 m10 m20 m30 m01 m11 m21 m31 m02 m12 m22 m32 m03 m13 m23 m33 @author Richard Greenlee

Source from the content-addressed store, hash-verified

43 * @author Kai Burjack
44 */
45public class Mat4 implements Externalizable, Supplier<Mat4>, Mutable, Serializable_safe {
46
47 /**
48 * Argument to the first parameter of {@link #frustumPlane(int, Vec4)} or return value of {@link #isAabInsideFrustum(double, double, double, double, double, double) isAabInsideFrustum()} or
49 * {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} identifying the plane with equation <tt>x=-1</tt> when using the identity
50 * matrix.
51 */
52 public static final int PLANE_NX = 0;
53 /**
54 * Argument to the first parameter of {@link #frustumPlane(int, Vec4)} or return value of {@link #isAabInsideFrustum(double, double, double, double, double, double) isAabInsideFrustum()} or
55 * {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} identifying the plane with equation <tt>x=1</tt> when using the identity
56 * matrix.
57 */
58 public static final int PLANE_PX = 1;
59 /**
60 * Argument to the first parameter of {@link #frustumPlane(int, Vec4)} or return value of {@link #isAabInsideFrustum(double, double, double, double, double, double) isAabInsideFrustum()} or
61 * {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} identifying the plane with equation <tt>y=-1</tt> when using the identity
62 * matrix.
63 */
64 public static final int PLANE_NY = 2;
65 /**
66 * Argument to the first parameter of {@link #frustumPlane(int, Vec4)} or return value of {@link #isAabInsideFrustum(double, double, double, double, double, double) isAabInsideFrustum()} or
67 * {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} identifying the plane with equation <tt>y=1</tt> when using the identity
68 * matrix.
69 */
70 public static final int PLANE_PY = 3;
71 /**
72 * Argument to the first parameter of {@link #frustumPlane(int, Vec4)} or return value of {@link #isAabInsideFrustum(double, double, double, double, double, double) isAabInsideFrustum()} or
73 * {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} identifying the plane with equation <tt>z=-1</tt> when using the identity
74 * matrix.
75 */
76 public static final int PLANE_NZ = 4;
77 /**
78 * Argument to the first parameter of {@link #frustumPlane(int, Vec4)} or return value of {@link #isAabInsideFrustum(double, double, double, double, double, double) isAabInsideFrustum()} or
79 * {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} identifying the plane with equation <tt>z=1</tt> when using the identity
80 * matrix.
81 */
82 public static final int PLANE_PZ = 5;
83 /**
84 * The value in a bitmask for {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} that identifies the plane with equation
85 * <tt>x=-1</tt> when using the identity matrix.
86 */
87 public static final int PLANE_MASK_NX = 1 << PLANE_NX;
88 /**
89 * The value in a bitmask for {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} that identifies the plane with equation
90 * <tt>x=1</tt> when using the identity matrix.
91 */
92 public static final int PLANE_MASK_PX = 1 << PLANE_PX;
93 /**
94 * The value in a bitmask for {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} that identifies the plane with equation
95 * <tt>y=-1</tt> when using the identity matrix.
96 */
97 public static final int PLANE_MASK_NY = 1 << PLANE_NY;
98 /**
99 * The value in a bitmask for {@link #isAabInsideFrustumMasked(double, double, double, double, double, double, int) isAabInsideFrustumMasked()} that identifies the plane with equation
100 * <tt>y=1</tt> when using the identity matrix.
101 */
102 public static final int PLANE_MASK_PY = 1 << PLANE_PY;

Callers 15

ShaderGroupClass · 0.85
vrGazeDirectionMethod · 0.85
vrViewerUpMethod · 0.85
vrViewerPositionMethod · 0.85
vrLeftHandPositionMethod · 0.85
vrLeftHandDirectionMethod · 0.85
vrRightHandDirectionMethod · 0.85
vrRightHandPositionMethod · 0.85
setShaderMethod · 0.85
leftViewMethod · 0.85
rightViewMethod · 0.85
leftProjectionMatrixMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected