public class Matrix4f
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
float |
m00 |
float |
m01 |
float |
m02 |
float |
m03 |
float |
m10 |
float |
m11 |
float |
m12 |
float |
m13 |
float |
m20 |
float |
m21 |
float |
m22 |
float |
m23 |
float |
m30 |
float |
m31 |
float |
m32 |
float |
m33 |
Constructor and Description |
---|
Matrix4f()
Construct a new matrix, initialized to the identity.
|
Matrix4f(Matrix4f src) |
Modifier and Type | Method and Description |
---|---|
static Matrix4f |
add(Matrix4f left,
Matrix4f right,
Matrix4f dest)
Add two matrices together and place the result in a third matrix.
|
Matrix4f |
copy() |
float |
determinant() |
static Matrix4f |
fromVanilla(net.minecraft.util.math.vector.Matrix4f mat) |
Matrix4f |
invert()
Invert this matrix
|
static Matrix4f |
invert(Matrix4f src) |
static Matrix4f |
invert(Matrix4f src,
Matrix4f dest)
Invert the source matrix and put the result in the destination
|
Matrix4f |
load(java.nio.FloatBuffer buf)
Load from a float buffer.
|
Matrix4f |
load(Matrix4f src)
Load from another matrix4f
|
static Matrix4f |
load(Matrix4f src,
Matrix4f dest)
Copy the source matrix to the destination matrix
|
Matrix4f |
loadTranspose(java.nio.FloatBuffer buf)
Load from a float buffer.
|
static Matrix4f |
mul(Matrix4f left,
Matrix4f right,
Matrix4f dest)
Multiply the right matrix by the left and place the result in a third matrix.
|
Matrix4f |
negate()
Negate this matrix
|
Matrix4f |
negate(Matrix4f dest)
Negate this matrix and place the result in a destination matrix.
|
static Matrix4f |
negate(Matrix4f src,
Matrix4f dest)
Negate this matrix and place the result in a destination matrix.
|
Matrix4f |
rotate(float angle,
net.minecraft.util.math.vector.Vector3f axis)
Rotates the matrix around the given axis the specified angle
|
Matrix4f |
rotate(float angle,
net.minecraft.util.math.vector.Vector3f axis,
Matrix4f dest)
Rotates the matrix around the given axis the specified angle
|
static Matrix4f |
rotate(float angle,
net.minecraft.util.math.vector.Vector3f axis,
Matrix4f src,
Matrix4f dest)
Rotates the source matrix around the given axis the specified angle and
put the result in the destination matrix.
|
Matrix4f |
scale(net.minecraft.util.math.vector.Vector3f vec)
Scales this matrix
|
static Matrix4f |
scale(net.minecraft.util.math.vector.Vector3f vec,
Matrix4f src,
Matrix4f dest)
Scales the source matrix and put the result in the destination matrix
|
Matrix4f |
setIdentity()
Set this matrix to be the identity matrix.
|
static Matrix4f |
setIdentity(Matrix4f m)
Set the given matrix to be the identity matrix.
|
Matrix4f |
setZero()
Set this matrix to 0.
|
static Matrix4f |
setZero(Matrix4f m)
Set the given matrix to 0.
|
Matrix4f |
store(java.nio.FloatBuffer buf)
Store this matrix in a float buffer.
|
Matrix4f |
store3f(java.nio.FloatBuffer buf)
Store the rotation portion of this matrix in a float buffer.
|
Matrix4f |
storeTranspose(java.nio.FloatBuffer buf)
Store this matrix in a float buffer.
|
static Matrix4f |
sub(Matrix4f left,
Matrix4f right,
Matrix4f dest)
Subtract the right matrix from the left and place the result in a third matrix.
|
java.lang.String |
toString()
Returns a string representation of this matrix
|
net.minecraft.util.math.vector.Matrix4f |
toVanilla() |
static Vector4f |
transform(Matrix4f left,
Vector4f right,
Vector4f dest)
Transform a Vector by a matrix and return the result in a destination
vector.
|
Matrix4f |
translate(net.minecraft.util.math.vector.Vector2f vec)
Translate this matrix
|
Matrix4f |
translate(net.minecraft.util.math.vector.Vector2f vec,
Matrix4f dest)
Translate this matrix and stash the result in another matrix
|
static Matrix4f |
translate(net.minecraft.util.math.vector.Vector2f vec,
Matrix4f src,
Matrix4f dest)
Translate the source matrix and stash the result in the destination matrix
|
Matrix4f |
translate(net.minecraft.util.math.vector.Vector3f vec)
Translate this matrix
|
Matrix4f |
translate(net.minecraft.util.math.vector.Vector3f vec,
Matrix4f dest)
Translate this matrix and stash the result in another matrix
|
static Matrix4f |
translate(net.minecraft.util.math.vector.Vector3f vec,
Matrix4f src,
Matrix4f dest)
Translate the source matrix and stash the result in the destination matrix
|
Matrix4f |
transpose()
Transpose this matrix
|
Matrix4f |
transpose(Matrix4f dest)
Transpose this matrix and place the result in another matrix
|
static Matrix4f |
transpose(Matrix4f src,
Matrix4f dest)
Transpose the source matrix and place the result in the destination matrix
|
public float m00
public float m01
public float m02
public float m03
public float m10
public float m11
public float m12
public float m13
public float m20
public float m21
public float m22
public float m23
public float m30
public float m31
public float m32
public float m33
public Matrix4f()
public Matrix4f(Matrix4f src)
public java.lang.String toString()
toString
in class java.lang.Object
public Matrix4f setIdentity()
public static Matrix4f setIdentity(Matrix4f m)
m
- The matrix to set to the identitypublic Matrix4f setZero()
public static Matrix4f setZero(Matrix4f m)
m
- The matrix to set to 0public Matrix4f load(Matrix4f src)
src
- The source matrixpublic static Matrix4f load(Matrix4f src, Matrix4f dest)
src
- The source matrixdest
- The destination matrix, or null of a new one is to be createdpublic Matrix4f load(java.nio.FloatBuffer buf)
buf
- A float buffer to read frompublic Matrix4f loadTranspose(java.nio.FloatBuffer buf)
buf
- A float buffer to read frompublic Matrix4f store(java.nio.FloatBuffer buf)
buf
- The buffer to store this matrix inpublic Matrix4f storeTranspose(java.nio.FloatBuffer buf)
buf
- The buffer to store this matrix inpublic Matrix4f store3f(java.nio.FloatBuffer buf)
buf
- The buffer to store this matrix inpublic static Matrix4f add(Matrix4f left, Matrix4f right, Matrix4f dest)
left
- The left source matrixright
- The right source matrixdest
- The destination matrix, or null if a new one is to be createdpublic static Matrix4f sub(Matrix4f left, Matrix4f right, Matrix4f dest)
left
- The left source matrixright
- The right source matrixdest
- The destination matrix, or null if a new one is to be createdpublic static Matrix4f mul(Matrix4f left, Matrix4f right, Matrix4f dest)
left
- The left source matrixright
- The right source matrixdest
- The destination matrix, or null if a new one is to be createdpublic static Vector4f transform(Matrix4f left, Vector4f right, Vector4f dest)
left
- The left matrixright
- The right vectordest
- The destination vector, or null if a new one is to be createdpublic Matrix4f transpose()
public Matrix4f translate(net.minecraft.util.math.vector.Vector2f vec)
vec
- The vector to translate bypublic Matrix4f translate(net.minecraft.util.math.vector.Vector3f vec)
vec
- The vector to translate bypublic Matrix4f scale(net.minecraft.util.math.vector.Vector3f vec)
vec
- The vector to scale bypublic static Matrix4f scale(net.minecraft.util.math.vector.Vector3f vec, Matrix4f src, Matrix4f dest)
vec
- The vector to scale bysrc
- The source matrixdest
- The destination matrix, or null if a new matrix is to be createdpublic Matrix4f rotate(float angle, net.minecraft.util.math.vector.Vector3f axis)
angle
- the angle, in radians.axis
- The vector representing the rotation axis. Must be normalized.public Matrix4f rotate(float angle, net.minecraft.util.math.vector.Vector3f axis, Matrix4f dest)
angle
- the angle, in radians.axis
- The vector representing the rotation axis. Must be normalized.dest
- The matrix to put the result, or null if a new matrix is to be createdpublic static Matrix4f rotate(float angle, net.minecraft.util.math.vector.Vector3f axis, Matrix4f src, Matrix4f dest)
angle
- the angle, in radians.axis
- The vector representing the rotation axis. Must be normalized.src
- The matrix to rotatedest
- The matrix to put the result, or null if a new matrix is to be createdpublic Matrix4f translate(net.minecraft.util.math.vector.Vector3f vec, Matrix4f dest)
vec
- The vector to translate bydest
- The destination matrix or null if a new matrix is to be createdpublic static Matrix4f translate(net.minecraft.util.math.vector.Vector3f vec, Matrix4f src, Matrix4f dest)
vec
- The vector to translate bysrc
- The source matrixdest
- The destination matrix or null if a new matrix is to be createdpublic Matrix4f translate(net.minecraft.util.math.vector.Vector2f vec, Matrix4f dest)
vec
- The vector to translate bydest
- The destination matrix or null if a new matrix is to be createdpublic static Matrix4f translate(net.minecraft.util.math.vector.Vector2f vec, Matrix4f src, Matrix4f dest)
vec
- The vector to translate bysrc
- The source matrixdest
- The destination matrix or null if a new matrix is to be createdpublic Matrix4f transpose(Matrix4f dest)
dest
- The destination matrix or null if a new matrix is to be createdpublic static Matrix4f transpose(Matrix4f src, Matrix4f dest)
src
- The source matrixdest
- The destination matrix or null if a new matrix is to be createdpublic float determinant()
public Matrix4f invert()
public static Matrix4f invert(Matrix4f src, Matrix4f dest)
src
- The source matrixdest
- The destination matrix, or null if a new matrix is to be createdpublic Matrix4f negate()
public Matrix4f negate(Matrix4f dest)
dest
- The destination matrix, or null if a new matrix is to be createdpublic static Matrix4f negate(Matrix4f src, Matrix4f dest)
src
- The source matrixdest
- The destination matrix, or null if a new matrix is to be createdpublic static Matrix4f fromVanilla(net.minecraft.util.math.vector.Matrix4f mat)
public net.minecraft.util.math.vector.Matrix4f toVanilla()
public Matrix4f copy()