Package org.joml
Class Matrix3x2fStack
- java.lang.Object
-
- org.joml.Matrix3x2f
-
- org.joml.Matrix3x2fStack
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,java.lang.Cloneable
,Matrix3x2fc
public class Matrix3x2fStack extends Matrix3x2f
A stack of manyMatrix3x2f
instances. This resembles the matrix stack known from legacy OpenGL.This
Matrix3x2fStack
class inherits fromMatrix3x2f
, so the current/top matrix is always theMatrix3x2fStack
/Matrix3x2f
itself. This affects all operations inMatrix3x2f
that take anotherMatrix3x2f
as parameter. If aMatrix3x2fStack
is used as argument to those methods, the effective argument will always be the current matrix of the matrix stack.- Author:
- Kai Burjack
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Matrix3x2fStack()
Do not invoke manually! Only meant for serialization.Matrix3x2fStack(int stackSize)
Create a newMatrix3x2fStack
of the given size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Matrix3x2fStack
clear()
Set the stack pointer to zero and set the current/bottom matrix toidentity
.java.lang.Object
clone()
boolean
equals(java.lang.Object obj)
int
hashCode()
Matrix3x2fStack
popMatrix()
Decrement the stack pointer by one.Matrix3x2fStack
pushMatrix()
Increment the stack pointer by one and set the values of the new current matrix to the one directly below it.void
readExternal(java.io.ObjectInput in)
void
writeExternal(java.io.ObjectOutput out)
-
Methods inherited from class org.joml.Matrix3x2f
determinant, equals, get, get, get, get, get, get, get, get3x3, get3x3, get3x3, get3x3, get3x3, get3x3, get4x4, get4x4, get4x4, get4x4, get4x4, get4x4, getToAddress, identity, invert, invert, isFinite, m00, m01, m10, m11, m20, m21, mul, mul, mulLocal, mulLocal, normalizedPositiveX, normalizedPositiveY, origin, positiveX, positiveY, rotate, rotate, rotateAbout, rotateAbout, rotateLocal, rotateLocal, rotateTo, rotateTo, rotation, scale, scale, scale, scale, scale, scale, scaleAround, scaleAround, scaleAround, scaleAround, scaleAroundLocal, scaleAroundLocal, scaleAroundLocal, scaleAroundLocal, scaleLocal, scaleLocal, scaleLocal, scaleLocal, scaling, scaling, set, set, set, set, set, set, set, set, setFromAddress, setTranslation, setTranslation, setView, shearX, shearX, shearY, shearY, span, testAar, testCircle, testPoint, toString, toString, transform, transform, transform, transformDirection, transformDirection, transformDirection, transformPosition, transformPosition, transformPosition, translate, translate, translate, translate, translateLocal, translateLocal, translateLocal, translateLocal, translation, translation, unproject, unprojectInv, view, view, viewArea, zero
-
-
-
-
Constructor Detail
-
Matrix3x2fStack
public Matrix3x2fStack(int stackSize)
Create a newMatrix3x2fStack
of the given size.Initially the stack pointer is at zero and the current matrix is set to identity.
- Parameters:
stackSize
- the size of the stack. This must be at least 1, in which case theMatrix3x2fStack
simply only consists ofthis
Matrix3x2f
-
Matrix3x2fStack
public Matrix3x2fStack()
Do not invoke manually! Only meant for serialization.Invoking this constructor from client code will result in an inconsistent state of the created
Matrix3x2fStack
instance.
-
-
Method Detail
-
clear
public Matrix3x2fStack clear()
Set the stack pointer to zero and set the current/bottom matrix toidentity
.- Returns:
- this
-
pushMatrix
public Matrix3x2fStack pushMatrix()
Increment the stack pointer by one and set the values of the new current matrix to the one directly below it.- Returns:
- this
-
popMatrix
public Matrix3x2fStack popMatrix()
Decrement the stack pointer by one.This will effectively dispose of the current matrix.
- Returns:
- this
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classMatrix3x2f
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classMatrix3x2f
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Overrides:
writeExternal
in classMatrix3x2f
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Overrides:
readExternal
in classMatrix3x2f
- Throws:
java.io.IOException
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Overrides:
clone
in classMatrix3x2f
- Throws:
java.lang.CloneNotSupportedException
-
-