Package org.joml
Class Matrix3x2dStack
java.lang.Object
org.joml.Matrix3x2d
org.joml.Matrix3x2dStack
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable,Matrix3x2dc
A stack of many
Matrix3x2d instances. This resembles the matrix stack known from legacy OpenGL.
This Matrix3x2dStack class inherits from Matrix3x2d, so the current/top matrix is always the
Matrix3x2dStack/Matrix3x2d itself. This affects all operations in Matrix3x2d that take
another Matrix3x2d as parameter. If a Matrix3x2dStack 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:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDo not invoke manually! Only meant for serialization.Matrix3x2dStack(int stackSize) Create a newMatrix3x2dStackof the given size. -
Method Summary
Modifier and TypeMethodDescriptionclear()Set the stack pointer to zero and set the current/bottom matrix toidentity.clone()booleaninthashCode()Decrement the stack pointer by one.Increment the stack pointer by one and set the values of the new current matrix to the one directly below it.voidvoidMethods inherited from class org.joml.Matrix3x2d
determinant, equals, get, get, get, get, get, get, get, get, get, get3x3, get3x3, get3x3, get3x3, get3x3, get3x3, get4x4, get4x4, get4x4, get4x4, get4x4, get4x4, getToAddress, getTransposed, getTransposed, getTransposed, getTransposed, getTransposed, getTransposed, getTransposedFloats, getTransposedFloats, 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, scale, scale, scaleAround, scaleAround, scaleAround, scaleAround, scaleAroundLocal, scaleAroundLocal, scaleAroundLocal, scaleAroundLocal, scaleLocal, scaleLocal, scaleLocal, scaleLocal, scaling, scaling, set, set, set, set, set, set, set, set, set, setFromAddress, setTranslation, setTranslation, setView, 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 Details
-
Matrix3x2dStack
public Matrix3x2dStack(int stackSize) Create a newMatrix3x2dStackof 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 theMatrix3x2dStacksimply only consists ofthisMatrix3x2d
-
Matrix3x2dStack
public Matrix3x2dStack()Do not invoke manually! Only meant for serialization.Invoking this constructor from client code will result in an inconsistent state of the created
Matrix3x2dStackinstance.
-
-
Method Details
-
clear
Set the stack pointer to zero and set the current/bottom matrix toidentity.- Returns:
- this
-
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
Decrement the stack pointer by one.This will effectively dispose of the current matrix.
- Returns:
- this
-
hashCode
public int hashCode()- Overrides:
hashCodein classMatrix3x2d
-
equals
- Overrides:
equalsin classMatrix3x2d
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classMatrix3x2d- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classMatrix3x2d- Throws:
IOException
-
clone
- Overrides:
clonein classMatrix3x2d- Throws:
CloneNotSupportedException
-