Interface Matrix3x2fc
 All Known Implementing Classes:
Matrix3x2f
,Matrix3x2fStack
 Author:
 Kai Burjack

Method Summary
Modifier and TypeMethodDescriptionfloat
Return the determinant of this matrix.boolean
equals(Matrix3x2fc m, float delta)
Compare the matrix elements ofthis
matrix with the given matrix using the givendelta
and return whether all of them are equal within a maximum difference ofdelta
.float[]
get(float[] arr)
Store this matrix into the supplied float array in columnmajor order.float[]
get(float[] arr, int offset)
Store this matrix into the supplied float array in columnmajor order at the given offset.get(int index, ByteBuffer buffer)
Store this matrix in columnmajor order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.get(int index, FloatBuffer buffer)
Store this matrix in columnmajor order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.get(ByteBuffer buffer)
Store this matrix in columnmajor order into the suppliedByteBuffer
at the current bufferposition
.get(FloatBuffer buffer)
Store this matrix in columnmajor order into the suppliedFloatBuffer
at the current bufferposition
.get(Matrix3x2f dest)
Get the current values ofthis
matrix and store them intodest
.float[]
get3x3(float[] arr)
Store this matrix as an equivalent 3x3 matrix into the supplied float array in columnmajor order.float[]
get3x3(float[] arr, int offset)
Store this matrix as an equivalent 3x3 matrix into the supplied float array in columnmajor order at the given offset.get3x3(int index, ByteBuffer buffer)
Store this matrix as an equivalent 3x3 matrix in columnmajor order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.get3x3(int index, FloatBuffer buffer)
Store this matrix as an equivalent 3x3 matrix in columnmajor order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.get3x3(ByteBuffer buffer)
Store this matrix as an equivalent 3x3 matrix in columnmajor order into the suppliedByteBuffer
at the current bufferposition
.get3x3(FloatBuffer buffer)
Store this matrix as an equivalent 3x3 matrix in columnmajor order into the suppliedFloatBuffer
at the current bufferposition
.float[]
get4x4(float[] arr)
Store this matrix as an equivalent 4x4 matrix into the supplied float array in columnmajor order.float[]
get4x4(float[] arr, int offset)
Store this matrix as an equivalent 4x4 matrix into the supplied float array in columnmajor order at the given offset.get4x4(int index, ByteBuffer buffer)
Store this matrix as an equivalent 4x4 matrix in columnmajor order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.get4x4(int index, FloatBuffer buffer)
Store this matrix as an equivalent 4x4 matrix in columnmajor order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.get4x4(ByteBuffer buffer)
Store this matrix as an equivalent 4x4 matrix in columnmajor order into the suppliedByteBuffer
at the current bufferposition
.get4x4(FloatBuffer buffer)
Store this matrix as an equivalent 4x4 matrix in columnmajor order into the suppliedFloatBuffer
at the current bufferposition
.getToAddress(long address)
Store this matrix in columnmajor order at the given offheap address.invert(Matrix3x2f dest)
Invert thethis
matrix by assuming a third row in this matrix of(0, 0, 1)
and store the result indest
.boolean
isFinite()
float
m00()
Return the value of the matrix element at column 0 and row 0.float
m01()
Return the value of the matrix element at column 0 and row 1.float
m10()
Return the value of the matrix element at column 1 and row 0.float
m11()
Return the value of the matrix element at column 1 and row 1.float
m20()
Return the value of the matrix element at column 2 and row 0.float
m21()
Return the value of the matrix element at column 2 and row 1.mul(Matrix3x2fc right, Matrix3x2f dest)
Multiply this matrix by the suppliedright
matrix by assuming a third row in both matrices of(0, 0, 1)
and store the result indest
.mulLocal(Matrix3x2fc left, Matrix3x2f dest)
Premultiply this matrix by the suppliedleft
matrix and store the result indest
.normalizedPositiveX(Vector2f dir)
Obtain the direction of+X
before the transformation represented bythis
orthogonal matrix is applied.normalizedPositiveY(Vector2f dir)
Obtain the direction of+Y
before the transformation represented bythis
orthogonal matrix is applied.Obtain the position that gets transformed to the origin bythis
matrix.Obtain the direction of+X
before the transformation represented bythis
matrix is applied.Obtain the direction of+Y
before the transformation represented bythis
matrix is applied.rotate(float ang, Matrix3x2f dest)
Apply a rotation transformation to this matrix by rotating the given amount of radians and store the result indest
.rotateAbout(float ang, float x, float y, Matrix3x2f dest)
Apply a rotation transformation to this matrix by rotating the given amount of radians about the specified rotation center(x, y)
and store the result indest
.rotateLocal(float ang, Matrix3x2f dest)
Premultiply a rotation to this matrix by rotating the given amount of radians and store the result indest
.rotateTo(Vector2fc fromDir, Vector2fc toDir, Matrix3x2f dest)
Apply a rotation transformation to this matrix that rotates the given normalizedfromDir
direction vector to point along the normalizedtoDir
, and store the result indest
.scale(float x, float y, Matrix3x2f dest)
Apply scaling to this matrix by scaling the unit axes by the given x and y and store the result indest
.scale(float xy, Matrix3x2f dest)
Apply scaling to this matrix by uniformly scaling the two base axes by the givenxy
factor and store the result indest
.scale(Vector2fc xy, Matrix3x2f dest)
Apply scaling to this matrix by scaling the base axes by the givenxy
factors and store the result indest
.scaleAround(float sx, float sy, float ox, float oy, Matrix3x2f dest)
Apply scaling tothis
matrix by scaling the base axes by the given sx and sy factors while using(ox, oy)
as the scaling origin, and store the result indest
.scaleAround(float factor, float ox, float oy, Matrix3x2f dest)
Apply scaling to this matrix by scaling the base axes by the givenfactor
while using(ox, oy)
as the scaling origin, and store the result indest
.scaleAroundLocal(float sx, float sy, float ox, float oy, Matrix3x2f dest)
Premultiply scaling tothis
matrix by scaling the base axes by the given sx and sy factors while using the given(ox, oy)
as the scaling origin, and store the result indest
.scaleAroundLocal(float factor, float ox, float oy, Matrix3x2f dest)
Premultiply scaling to this matrix by scaling the base axes by the givenfactor
while using(ox, oy)
as the scaling origin, and store the result indest
.scaleLocal(float x, float y, Matrix3x2f dest)
Premultiply scaling tothis
matrix by scaling the base axes by the given x and y factors and store the result indest
.scaleLocal(float xy, Matrix3x2f dest)
Premultiply scaling tothis
matrix by scaling the two base axes by the givenxy
factor, and store the result indest
.boolean
testAar(float minX, float minY, float maxX, float maxY)
Test whether the given axisaligned rectangle is partly or completely within or outside of the frustum defined bythis
matrix.boolean
testCircle(float x, float y, float r)
Test whether the given circle is partly or completely within or outside of the frustum defined bythis
matrix.boolean
testPoint(float x, float y)
Test whether the given point(x, y)
is within the frustum defined bythis
matrix.Transform/multiply the given vector(x, y, z)
by this matrix and store the result indest
.Transform/multiply the given vector by this matrix by assuming a third row in this matrix of(0, 0, 1)
and store the result in that vector.Transform/multiply the given vector by this matrix and store the result indest
.transformDirection(float x, float y, Vector2f dest)
Transform/multiply the given 2Dvector(x, y)
, as if it was a 3Dvector with z=0, by this matrix and store the result indest
.Transform/multiply the given 2Dvector, as if it was a 3Dvector with z=0, by this matrix and store the result in that vector.transformDirection(Vector2fc v, Vector2f dest)
Transform/multiply the given 2Dvector, as if it was a 3Dvector with z=0, by this matrix and store the result indest
.transformPosition(float x, float y, Vector2f dest)
Transform/multiply the given 2Dvector(x, y)
, as if it was a 3Dvector with z=1, by this matrix and store the result indest
.Transform/multiply the given 2Dvector, as if it was a 3Dvector with z=1, by this matrix and store the result in that vector.transformPosition(Vector2fc v, Vector2f dest)
Transform/multiply the given 2Dvector, as if it was a 3Dvector with z=1, by this matrix and store the result indest
.translate(float x, float y, Matrix3x2f dest)
Apply a translation to this matrix by translating by the given number of units in x and y and store the result indest
.translate(Vector2fc offset, Matrix3x2f dest)
Apply a translation to this matrix by translating by the given number of units in x and y, and store the result indest
.translateLocal(float x, float y, Matrix3x2f dest)
Premultiply a translation to this matrix by translating by the given number of units in x and y and store the result indest
.translateLocal(Vector2fc offset, Matrix3x2f dest)
Premultiply a translation to this matrix by translating by the given number of units in x and y and store the result indest
.Unproject the given window coordinates(winX, winY)
bythis
matrix using the specified viewport.unprojectInv(float winX, float winY, int[] viewport, Vector2f dest)
Unproject the given window coordinates(winX, winY)
bythis
matrix using the specified viewport.view(float left, float right, float bottom, float top, Matrix3x2f dest)
Apply a "view" transformation to this matrix that maps the given(left, bottom)
and(right, top)
corners to(1, 1)
and(1, 1)
respectively and store the result indest
.float[]
viewArea(float[] area)
Obtain the extents of the view transformation ofthis
matrix and store it inarea
.

Method Details

m00
float m00()Return the value of the matrix element at column 0 and row 0. Returns:
 the value of the matrix element

m01
float m01()Return the value of the matrix element at column 0 and row 1. Returns:
 the value of the matrix element

m10
float m10()Return the value of the matrix element at column 1 and row 0. Returns:
 the value of the matrix element

m11
float m11()Return the value of the matrix element at column 1 and row 1. Returns:
 the value of the matrix element

m20
float m20()Return the value of the matrix element at column 2 and row 0. Returns:
 the value of the matrix element

m21
float m21()Return the value of the matrix element at column 2 and row 1. Returns:
 the value of the matrix element

mul
Multiply this matrix by the suppliedright
matrix by assuming a third row in both matrices of(0, 0, 1)
and store the result indest
.If
M
isthis
matrix andR
theright
matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the transformation of the right matrix will be applied first! Parameters:
right
 the right operand of the matrix multiplicationdest
 will hold the result Returns:
 dest

mulLocal
Premultiply this matrix by the suppliedleft
matrix and store the result indest
.If
M
isthis
matrix andL
theleft
matrix, then the new matrix will beL * M
. So when transforming a vectorv
with the new matrix by usingL * M * v
, the transformation ofthis
matrix will be applied first! Parameters:
left
 the left operand of the matrix multiplicationdest
 the destination matrix, which will hold the result Returns:
 dest

determinant
float determinant()Return the determinant of this matrix. Returns:
 the determinant

invert
Invert thethis
matrix by assuming a third row in this matrix of(0, 0, 1)
and store the result indest
. Parameters:
dest
 will hold the result Returns:
 dest

translate
Apply a translation to this matrix by translating by the given number of units in x and y and store the result indest
.If
M
isthis
matrix andT
the translation matrix, then the new matrix will beM * T
. So when transforming a vectorv
with the new matrix by usingM * T * v
, the translation will be applied first! Parameters:
x
 the offset to translate in xy
 the offset to translate in ydest
 will hold the result Returns:
 dest

translate
Apply a translation to this matrix by translating by the given number of units in x and y, and store the result indest
.If
M
isthis
matrix andT
the translation matrix, then the new matrix will beM * T
. So when transforming a vectorv
with the new matrix by usingM * T * v
, the translation will be applied first! Parameters:
offset
 the offset to translatedest
 will hold the result Returns:
 dest

translateLocal
Premultiply a translation to this matrix by translating by the given number of units in x and y and store the result indest
.If
M
isthis
matrix andT
the translation matrix, then the new matrix will beT * M
. So when transforming a vectorv
with the new matrix by usingT * M * v
, the translation will be applied last! Parameters:
offset
 the number of units in x and y by which to translatedest
 will hold the result Returns:
 dest

translateLocal
Premultiply a translation to this matrix by translating by the given number of units in x and y and store the result indest
.If
M
isthis
matrix andT
the translation matrix, then the new matrix will beT * M
. So when transforming a vectorv
with the new matrix by usingT * M * v
, the translation will be applied last! Parameters:
x
 the offset to translate in xy
 the offset to translate in ydest
 will hold the result Returns:
 dest

get
Get the current values ofthis
matrix and store them intodest
. Parameters:
dest
 the destination matrix Returns:
 dest

get
Store this matrix in columnmajor order into the suppliedFloatBuffer
at the current bufferposition
.This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which the matrix is stored, use
get(int, FloatBuffer)
, taking the absolute position as parameter. Parameters:
buffer
 will receive the values of this matrix in columnmajor order at its current position Returns:
 the passed in buffer
 See Also:
get(int, FloatBuffer)

get
Store this matrix in columnmajor order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given FloatBuffer.
 Parameters:
index
 the absolute position into the FloatBufferbuffer
 will receive the values of this matrix in columnmajor order Returns:
 the passed in buffer

get
Store this matrix in columnmajor order into the suppliedByteBuffer
at the current bufferposition
.This method will not increment the position of the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
get(int, ByteBuffer)
, taking the absolute position as parameter. Parameters:
buffer
 will receive the values of this matrix in columnmajor order at its current position Returns:
 the passed in buffer
 See Also:
get(int, ByteBuffer)

get
Store this matrix in columnmajor order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given ByteBuffer.
 Parameters:
index
 the absolute position into the ByteBufferbuffer
 will receive the values of this matrix in columnmajor order Returns:
 the passed in buffer

get3x3
Store this matrix as an equivalent 3x3 matrix in columnmajor order into the suppliedFloatBuffer
at the current bufferposition
.This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which the matrix is stored, use
get3x3(int, FloatBuffer)
, taking the absolute position as parameter. Parameters:
buffer
 will receive the values of this matrix in columnmajor order at its current position Returns:
 the passed in buffer
 See Also:
get3x3(int, FloatBuffer)

get3x3
Store this matrix as an equivalent 3x3 matrix in columnmajor order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given FloatBuffer.
 Parameters:
index
 the absolute position into the FloatBufferbuffer
 will receive the values of this matrix in columnmajor order Returns:
 the passed in buffer

get3x3
Store this matrix as an equivalent 3x3 matrix in columnmajor order into the suppliedByteBuffer
at the current bufferposition
.This method will not increment the position of the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
get3x3(int, ByteBuffer)
, taking the absolute position as parameter. Parameters:
buffer
 will receive the values of this matrix in columnmajor order at its current position Returns:
 the passed in buffer
 See Also:
get3x3(int, ByteBuffer)

get3x3
Store this matrix as an equivalent 3x3 matrix in columnmajor order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given ByteBuffer.
 Parameters:
index
 the absolute position into the ByteBufferbuffer
 will receive the values of this matrix in columnmajor order Returns:
 the passed in buffer

get4x4
Store this matrix as an equivalent 4x4 matrix in columnmajor order into the suppliedFloatBuffer
at the current bufferposition
.This method will not increment the position of the given FloatBuffer.
In order to specify the offset into the FloatBuffer at which the matrix is stored, use
get4x4(int, FloatBuffer)
, taking the absolute position as parameter. Parameters:
buffer
 will receive the values of this matrix in columnmajor order at its current position Returns:
 the passed in buffer
 See Also:
get4x4(int, FloatBuffer)

get4x4
Store this matrix as an equivalent 4x4 matrix in columnmajor order into the suppliedFloatBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given FloatBuffer.
 Parameters:
index
 the absolute position into the FloatBufferbuffer
 will receive the values of this matrix in columnmajor order Returns:
 the passed in buffer

get4x4
Store this matrix as an equivalent 4x4 matrix in columnmajor order into the suppliedByteBuffer
at the current bufferposition
.This method will not increment the position of the given ByteBuffer.
In order to specify the offset into the ByteBuffer at which the matrix is stored, use
get4x4(int, ByteBuffer)
, taking the absolute position as parameter. Parameters:
buffer
 will receive the values of this matrix in columnmajor order at its current position Returns:
 the passed in buffer
 See Also:
get4x4(int, ByteBuffer)

get4x4
Store this matrix as an equivalent 4x4 matrix in columnmajor order into the suppliedByteBuffer
starting at the specified absolute buffer position/index.This method will not increment the position of the given ByteBuffer.
 Parameters:
index
 the absolute position into the ByteBufferbuffer
 will receive the values of this matrix in columnmajor order Returns:
 the passed in buffer

getToAddress
Store this matrix in columnmajor order at the given offheap address.This method will throw an
UnsupportedOperationException
when JOML is used with `Djoml.nounsafe`.This method is unsafe as it can result in a crash of the JVM process when the specified address range does not belong to this process.
 Parameters:
address
 the offheap address where to store this matrix Returns:
 this

get
float[] get(float[] arr, int offset)Store this matrix into the supplied float array in columnmajor order at the given offset. Parameters:
arr
 the array to write the matrix values intooffset
 the offset into the array Returns:
 the passed in array

get
float[] get(float[] arr)Store this matrix into the supplied float array in columnmajor order.In order to specify an explicit offset into the array, use the method
get(float[], int)
. Parameters:
arr
 the array to write the matrix values into Returns:
 the passed in array
 See Also:
get(float[], int)

get3x3
float[] get3x3(float[] arr, int offset)Store this matrix as an equivalent 3x3 matrix into the supplied float array in columnmajor order at the given offset. Parameters:
arr
 the array to write the matrix values intooffset
 the offset into the array Returns:
 the passed in array

get3x3
float[] get3x3(float[] arr)Store this matrix as an equivalent 3x3 matrix into the supplied float array in columnmajor order.In order to specify an explicit offset into the array, use the method
get3x3(float[], int)
. Parameters:
arr
 the array to write the matrix values into Returns:
 the passed in array
 See Also:
get3x3(float[], int)

get4x4
float[] get4x4(float[] arr, int offset)Store this matrix as an equivalent 4x4 matrix into the supplied float array in columnmajor order at the given offset. Parameters:
arr
 the array to write the matrix values intooffset
 the offset into the array Returns:
 the passed in array

get4x4
float[] get4x4(float[] arr)Store this matrix as an equivalent 4x4 matrix into the supplied float array in columnmajor order.In order to specify an explicit offset into the array, use the method
get4x4(float[], int)
. Parameters:
arr
 the array to write the matrix values into Returns:
 the passed in array
 See Also:
get4x4(float[], int)

scale
Apply scaling to this matrix by scaling the unit axes by the given x and y and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first! Parameters:
x
 the factor of the x componenty
 the factor of the y componentdest
 will hold the result Returns:
 dest

scale
Apply scaling to this matrix by scaling the base axes by the givenxy
factors and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first! Parameters:
xy
 the factors of the x and y component, respectivelydest
 will hold the result Returns:
 dest

scaleAroundLocal
Premultiply scaling tothis
matrix by scaling the base axes by the given sx and sy factors while using the given(ox, oy)
as the scaling origin, and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beS * M
. So when transforming a vectorv
with the new matrix by usingS * M * v
, the scaling will be applied last!This method is equivalent to calling:
new Matrix3x2f().translate(ox, oy).scale(sx, sy).translate(ox, oy).mul(this, dest)
 Parameters:
sx
 the scaling factor of the x componentsy
 the scaling factor of the y componentox
 the x coordinate of the scaling originoy
 the y coordinate of the scaling origindest
 will hold the result Returns:
 dest

scaleAroundLocal
Premultiply scaling to this matrix by scaling the base axes by the givenfactor
while using(ox, oy)
as the scaling origin, and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beS * M
. So when transforming a vectorv
with the new matrix by usingS * M * v
, the scaling will be applied last!This method is equivalent to calling:
new Matrix3x2f().translate(ox, oy).scale(factor).translate(ox, oy).mul(this, dest)
 Parameters:
factor
 the scaling factor for all three axesox
 the x coordinate of the scaling originoy
 the y coordinate of the scaling origindest
 will hold the result Returns:
 this

scale
Apply scaling to this matrix by uniformly scaling the two base axes by the givenxy
factor and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first! Parameters:
xy
 the factor for the two componentsdest
 will hold the result Returns:
 dest
 See Also:
scale(float, float, Matrix3x2f)

scaleLocal
Premultiply scaling tothis
matrix by scaling the two base axes by the givenxy
factor, and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beS * M
. So when transforming a vectorv
with the new matrix by usingS * M * v
, the scaling will be applied last! Parameters:
xy
 the factor to scale all two base axes bydest
 will hold the result Returns:
 dest

scaleLocal
Premultiply scaling tothis
matrix by scaling the base axes by the given x and y factors and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beS * M
. So when transforming a vectorv
with the new matrix by usingS * M * v
, the scaling will be applied last! Parameters:
x
 the factor of the x componenty
 the factor of the y componentdest
 will hold the result Returns:
 dest

scaleAround
Apply scaling tothis
matrix by scaling the base axes by the given sx and sy factors while using(ox, oy)
as the scaling origin, and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first!This method is equivalent to calling:
translate(ox, oy, dest).scale(sx, sy).translate(ox, oy)
 Parameters:
sx
 the scaling factor of the x componentsy
 the scaling factor of the y componentox
 the x coordinate of the scaling originoy
 the y coordinate of the scaling origindest
 will hold the result Returns:
 dest

scaleAround
Apply scaling to this matrix by scaling the base axes by the givenfactor
while using(ox, oy)
as the scaling origin, and store the result indest
.If
M
isthis
matrix andS
the scaling matrix, then the new matrix will beM * S
. So when transforming a vectorv
with the new matrix by usingM * S * v
, the scaling will be applied first!This method is equivalent to calling:
translate(ox, oy, dest).scale(factor).translate(ox, oy)
 Parameters:
factor
 the scaling factor for all three axesox
 the x coordinate of the scaling originoy
 the y coordinate of the scaling origindest
 will hold the result Returns:
 this

transform
Transform/multiply the given vector by this matrix by assuming a third row in this matrix of(0, 0, 1)
and store the result in that vector. Parameters:
v
 the vector to transform and to hold the final result Returns:
 v
 See Also:
Vector3f.mul(Matrix3x2fc)

transform
Transform/multiply the given vector by this matrix and store the result indest
. Parameters:
v
 the vector to transformdest
 will contain the result Returns:
 dest
 See Also:
Vector3f.mul(Matrix3x2fc, Vector3f)

transform
Transform/multiply the given vector(x, y, z)
by this matrix and store the result indest
. Parameters:
x
 the x component of the vector to transformy
 the y component of the vector to transformz
 the z component of the vector to transformdest
 will contain the result Returns:
 dest

transformPosition
Transform/multiply the given 2Dvector, as if it was a 3Dvector with z=1, by this matrix and store the result in that vector.The given 2Dvector is treated as a 3Dvector with its zcomponent being 1.0, so it will represent a position/location in 2Dspace rather than a direction.
In order to store the result in another vector, use
transformPosition(Vector2fc, Vector2f)
. Parameters:
v
 the vector to transform and to hold the final result Returns:
 v
 See Also:
transformPosition(Vector2fc, Vector2f)
,transform(Vector3f)

transformPosition
Transform/multiply the given 2Dvector, as if it was a 3Dvector with z=1, by this matrix and store the result indest
.The given 2Dvector is treated as a 3Dvector with its zcomponent being 1.0, so it will represent a position/location in 2Dspace rather than a direction.
In order to store the result in the same vector, use
transformPosition(Vector2f)
. Parameters:
v
 the vector to transformdest
 will hold the result Returns:
 dest
 See Also:
transformPosition(Vector2f)
,transform(Vector3f, Vector3f)

transformPosition
Transform/multiply the given 2Dvector(x, y)
, as if it was a 3Dvector with z=1, by this matrix and store the result indest
.The given 2Dvector is treated as a 3Dvector with its zcomponent being 1.0, so it will represent a position/location in 2Dspace rather than a direction.
In order to store the result in the same vector, use
transformPosition(Vector2f)
. Parameters:
x
 the x component of the vector to transformy
 the y component of the vector to transformdest
 will hold the result Returns:
 dest
 See Also:
transformPosition(Vector2f)
,transform(Vector3f, Vector3f)

transformDirection
Transform/multiply the given 2Dvector, as if it was a 3Dvector with z=0, by this matrix and store the result in that vector.The given 2Dvector is treated as a 3Dvector with its zcomponent being
0.0
, so it will represent a direction in 2Dspace rather than a position. This method will therefore not take the translation part of the matrix into account.In order to store the result in another vector, use
transformDirection(Vector2fc, Vector2f)
. Parameters:
v
 the vector to transform and to hold the final result Returns:
 v
 See Also:
transformDirection(Vector2fc, Vector2f)

transformDirection
Transform/multiply the given 2Dvector, as if it was a 3Dvector with z=0, by this matrix and store the result indest
.The given 2Dvector is treated as a 3Dvector with its zcomponent being
0.0
, so it will represent a direction in 2Dspace rather than a position. This method will therefore not take the translation part of the matrix into account.In order to store the result in the same vector, use
transformDirection(Vector2f)
. Parameters:
v
 the vector to transformdest
 will hold the result Returns:
 dest
 See Also:
transformDirection(Vector2f)

transformDirection
Transform/multiply the given 2Dvector(x, y)
, as if it was a 3Dvector with z=0, by this matrix and store the result indest
.The given 2Dvector is treated as a 3Dvector with its zcomponent being
0.0
, so it will represent a direction in 2Dspace rather than a position. This method will therefore not take the translation part of the matrix into account.In order to store the result in the same vector, use
transformDirection(Vector2f)
. Parameters:
x
 the x component of the vector to transformy
 the y component of the vector to transformdest
 will hold the result Returns:
 dest
 See Also:
transformDirection(Vector2f)

rotate
Apply a rotation transformation to this matrix by rotating the given amount of radians and store the result indest
.If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first! Parameters:
ang
 the angle in radiansdest
 will hold the result Returns:
 dest

rotateLocal
Premultiply a rotation to this matrix by rotating the given amount of radians and store the result indest
.If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beR * M
. So when transforming a vectorv
with the new matrix by usingR * M * v
, the rotation will be applied last!Reference: http://en.wikipedia.org
 Parameters:
ang
 the angle in radiansdest
 will hold the result Returns:
 dest

rotateAbout
Apply a rotation transformation to this matrix by rotating the given amount of radians about the specified rotation center(x, y)
and store the result indest
.This method is equivalent to calling:
translate(x, y, dest).rotate(ang).translate(x, y)
If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first! Parameters:
ang
 the angle in radiansx
 the x component of the rotation centery
 the y component of the rotation centerdest
 will hold the result Returns:
 dest
 See Also:
translate(float, float, Matrix3x2f)
,rotate(float, Matrix3x2f)

rotateTo
Apply a rotation transformation to this matrix that rotates the given normalizedfromDir
direction vector to point along the normalizedtoDir
, and store the result indest
.If
M
isthis
matrix andR
the rotation matrix, then the new matrix will beM * R
. So when transforming a vectorv
with the new matrix by usingM * R * v
, the rotation will be applied first! Parameters:
fromDir
 the normalized direction which should be rotate to point alongtoDir
toDir
 the normalized destination directiondest
 will hold the result Returns:
 dest

view
Apply a "view" transformation to this matrix that maps the given(left, bottom)
and(right, top)
corners to(1, 1)
and(1, 1)
respectively and store the result indest
.If
M
isthis
matrix andO
the orthographic projection matrix, then the new matrix will beM * O
. So when transforming a vectorv
with the new matrix by usingM * O * v
, the orthographic projection transformation will be applied first! Parameters:
left
 the distance from the center to the left view edgeright
 the distance from the center to the right view edgebottom
 the distance from the center to the bottom view edgetop
 the distance from the center to the top view edgedest
 will hold the result Returns:
 dest

origin
Obtain the position that gets transformed to the origin bythis
matrix. This can be used to get the position of the "camera" from a given view transformation matrix.This method is equivalent to the following code:
Matrix3x2f inv = new Matrix3x2f(this).invertAffine(); inv.transform(origin.set(0, 0));
 Parameters:
origin
 will hold the position transformed to the origin Returns:
 origin

viewArea
float[] viewArea(float[] area)Obtain the extents of the view transformation ofthis
matrix and store it inarea
. This can be used to determine which region of the screen (i.e. the NDC space) is covered by the view. Parameters:
area
 will hold the view area as[minX, minY, maxX, maxY]
 Returns:
 area

positiveX
Obtain the direction of+X
before the transformation represented bythis
matrix is applied.This method uses the rotation component of the left 2x2 submatrix to obtain the direction that is transformed to
+X
bythis
matrix.This method is equivalent to the following code:
Matrix3x2f inv = new Matrix3x2f(this).invert(); inv.transformDirection(dir.set(1, 0)).normalize();
Ifthis
is already an orthogonal matrix, then consider usingnormalizedPositiveX(Vector2f)
instead.Reference: http://www.euclideanspace.com
 Parameters:
dir
 will hold the direction of+X
 Returns:
 dir

normalizedPositiveX
Obtain the direction of+X
before the transformation represented bythis
orthogonal matrix is applied. This method only produces correct results ifthis
is an orthogonal matrix.This method uses the rotation component of the left 2x2 submatrix to obtain the direction that is transformed to
+X
bythis
matrix.This method is equivalent to the following code:
Matrix3x2f inv = new Matrix3x2f(this).transpose(); inv.transformDirection(dir.set(1, 0));
Reference: http://www.euclideanspace.com
 Parameters:
dir
 will hold the direction of+X
 Returns:
 dir

positiveY
Obtain the direction of+Y
before the transformation represented bythis
matrix is applied.This method uses the rotation component of the left 2x2 submatrix to obtain the direction that is transformed to
+Y
bythis
matrix.This method is equivalent to the following code:
Matrix3x2f inv = new Matrix3x2f(this).invert(); inv.transformDirection(dir.set(0, 1)).normalize();
Ifthis
is already an orthogonal matrix, then consider usingnormalizedPositiveY(Vector2f)
instead.Reference: http://www.euclideanspace.com
 Parameters:
dir
 will hold the direction of+Y
 Returns:
 dir

normalizedPositiveY
Obtain the direction of+Y
before the transformation represented bythis
orthogonal matrix is applied. This method only produces correct results ifthis
is an orthogonal matrix.This method uses the rotation component of the left 2x2 submatrix to obtain the direction that is transformed to
+Y
bythis
matrix.This method is equivalent to the following code:
Matrix3x2f inv = new Matrix3x2f(this).transpose(); inv.transformDirection(dir.set(0, 1));
Reference: http://www.euclideanspace.com
 Parameters:
dir
 will hold the direction of+Y
 Returns:
 dir

unproject
Unproject the given window coordinates(winX, winY)
bythis
matrix using the specified viewport.This method first converts the given window coordinates to normalized device coordinates in the range
[1..1]
and then transforms those NDC coordinates by the inverse ofthis
matrix.As a necessary computation step for unprojecting, this method computes the inverse of
this
matrix. In order to avoid computing the matrix inverse with every invocation, the inverse ofthis
matrix can be built once outside usinginvert(Matrix3x2f)
and then the methodunprojectInv()
can be invoked on it. Parameters:
winX
 the xcoordinate in window coordinates (pixels)winY
 the ycoordinate in window coordinates (pixels)viewport
 the viewport described by[x, y, width, height]
dest
 will hold the unprojected position Returns:
 dest
 See Also:
unprojectInv(float, float, int[], Vector2f)
,invert(Matrix3x2f)

unprojectInv
Unproject the given window coordinates(winX, winY)
bythis
matrix using the specified viewport.This method differs from
unproject()
in that it assumes thatthis
is already the inverse matrix of the original projection matrix. It exists to avoid recomputing the matrix inverse with every invocation. Parameters:
winX
 the xcoordinate in window coordinates (pixels)winY
 the ycoordinate in window coordinates (pixels)viewport
 the viewport described by[x, y, width, height]
dest
 will hold the unprojected position Returns:
 dest
 See Also:
unproject(float, float, int[], Vector2f)

testPoint
boolean testPoint(float x, float y)Test whether the given point(x, y)
is within the frustum defined bythis
matrix.This method assumes
this
matrix to be a transformation from any arbitrary coordinate system/spaceM
into standard OpenGL clip space and tests whether the given point with the coordinates(x, y, z)
given in spaceM
is within the clip space.Reference: Fast Extraction of Viewing Frustum Planes from the WorldViewProjection Matrix
 Parameters:
x
 the xcoordinate of the pointy
 the ycoordinate of the point Returns:
true
if the given point is inside the frustum;false
otherwise

testCircle
boolean testCircle(float x, float y, float r)Test whether the given circle is partly or completely within or outside of the frustum defined bythis
matrix.This method assumes
this
matrix to be a transformation from any arbitrary coordinate system/spaceM
into standard OpenGL clip space and tests whether the given sphere with the coordinates(x, y, z)
given in spaceM
is within the clip space.Reference: Fast Extraction of Viewing Frustum Planes from the WorldViewProjection Matrix
 Parameters:
x
 the xcoordinate of the circle's centery
 the ycoordinate of the circle's centerr
 the circle's radius Returns:
true
if the given circle is partly or completely inside the frustum;false
otherwise

testAar
boolean testAar(float minX, float minY, float maxX, float maxY)Test whether the given axisaligned rectangle is partly or completely within or outside of the frustum defined bythis
matrix. The rectangle is specified via its min and max corner coordinates.This method assumes
this
matrix to be a transformation from any arbitrary coordinate system/spaceM
into standard OpenGL clip space and tests whether the given axisaligned rectangle with its minimum corner coordinates(minX, minY, minZ)
and maximum corner coordinates(maxX, maxY, maxZ)
given in spaceM
is within the clip space.Reference: Efficient View Frustum Culling
Reference: Fast Extraction of Viewing Frustum Planes from the WorldViewProjection Matrix Parameters:
minX
 the xcoordinate of the minimum cornerminY
 the ycoordinate of the minimum cornermaxX
 the xcoordinate of the maximum cornermaxY
 the ycoordinate of the maximum corner Returns:
true
if the axisaligned box is completely or partly inside of the frustum;false
otherwise

equals
Compare the matrix elements ofthis
matrix with the given matrix using the givendelta
and return whether all of them are equal within a maximum difference ofdelta
.Please note that this method is not used by any data structure such as
ArrayList
HashSet
orHashMap
and their operations, such asArrayList.contains(Object)
orHashSet.remove(Object)
, since those data structures only use theObject.equals(Object)
andObject.hashCode()
methods. Parameters:
m
 the other matrixdelta
 the allowed maximum difference Returns:
true
whether all of the matrix elements are equal;false
otherwise

isFinite
boolean isFinite()Determine whether all matrix elements are finite floatingpoint values, that is, they are notNaN
and notinfinity
. Returns:
true
if all components are finite floatingpoint values;false
otherwise
