Package org.joml
Class Matrix4dStack
- java.lang.Object
-
- org.joml.Matrix4d
-
- org.joml.Matrix4dStack
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,java.lang.Cloneable,Matrix4dc
public class Matrix4dStack extends Matrix4d
A stack of manyMatrix4dinstances. This resembles the matrix stack known from legacy OpenGL.This
Matrix4dStackclass inherits fromMatrix4d, so the current/top matrix is always theMatrix4dStack/Matrix4ditself. This affects all operations inMatrix4dthat take anotherMatrix4das parameter. If aMatrix4dStackis 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
-
-
Field Summary
-
Fields inherited from interface org.joml.Matrix4dc
CORNER_NXNYNZ, CORNER_NXNYPZ, CORNER_NXPYNZ, CORNER_NXPYPZ, CORNER_PXNYNZ, CORNER_PXNYPZ, CORNER_PXPYNZ, CORNER_PXPYPZ, PLANE_NX, PLANE_NY, PLANE_NZ, PLANE_PX, PLANE_PY, PLANE_PZ, PROPERTY_AFFINE, PROPERTY_IDENTITY, PROPERTY_ORTHONORMAL, PROPERTY_PERSPECTIVE, PROPERTY_TRANSLATION
-
-
Constructor Summary
Constructors Constructor Description Matrix4dStack()Do not invoke manually! Only meant for serialization.Matrix4dStack(int stackSize)Create a newMatrix4dStackof the given size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Matrix4dStackclear()Set the stack pointer to zero and set the current/bottom matrix toidentity.java.lang.Objectclone()booleanequals(java.lang.Object obj)inthashCode()Matrix4dStackpopMatrix()Decrement the stack pointer by one.Matrix4dStackpushMatrix()Increment the stack pointer by one and set the values of the new current matrix to the one directly below it.voidreadExternal(java.io.ObjectInput in)voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class org.joml.Matrix4d
add, add, add4x3, add4x3, add4x3, add4x3, affineSpan, arcball, arcball, arcball, arcball, assume, billboardCylindrical, billboardSpherical, billboardSpherical, cofactor3x3, cofactor3x3, cofactor3x3, determinant, determinant3x3, determinantAffine, determineProperties, equals, fma4x3, fma4x3, frustum, frustum, frustum, frustum, frustumAabb, frustumCorner, frustumLH, frustumLH, frustumLH, frustumLH, frustumPlane, frustumRayDir, get, get, get, get, get, get, get, get, get, get, get, get, get3x3, get4x3, get4x3Transposed, get4x3Transposed, get4x3Transposed, get4x3Transposed, getColumn, getColumn, getEulerAnglesXYZ, getEulerAnglesZYX, getFloats, getFloats, getNormalizedRotation, getNormalizedRotation, getRow, getRow, getRowColumn, getScale, getToAddress, getTranslation, getTransposed, getTransposed, getTransposed, getTransposed, getTransposed, getTransposed, getTransposedFloats, getTransposedFloats, getUnnormalizedRotation, getUnnormalizedRotation, identity, invert, invert, invertAffine, invertAffine, invertFrustum, invertFrustum, invertOrtho, invertOrtho, invertPerspective, invertPerspective, invertPerspectiveView, invertPerspectiveView, isAffine, isFinite, lerp, lerp, lookAlong, lookAlong, lookAlong, lookAlong, lookAt, lookAt, lookAt, lookAt, lookAtLH, lookAtLH, lookAtLH, lookAtLH, lookAtPerspective, lookAtPerspectiveLH, m00, m00, m01, m01, m02, m02, m03, m03, m10, m10, m11, m11, m12, m12, m13, m13, m20, m20, m21, m21, m22, m22, m23, m23, m30, m30, m31, m31, m32, m32, m33, m33, mapnXnYnZ, mapnXnYnZ, mapnXnYZ, mapnXnYZ, mapnXnZnY, mapnXnZnY, mapnXnZY, mapnXnZY, mapnXYnZ, mapnXYnZ, mapnXZnY, mapnXZnY, mapnXZY, mapnXZY, mapnYnXnZ, mapnYnXnZ, mapnYnXZ, mapnYnXZ, mapnYnZnX, mapnYnZnX, mapnYnZX, mapnYnZX, mapnYXnZ, mapnYXnZ, mapnYXZ, mapnYXZ, mapnYZnX, mapnYZnX, mapnYZX, mapnYZX, mapnZnXnY, mapnZnXnY, mapnZnXY, mapnZnXY, mapnZnYnX, mapnZnYnX, mapnZnYX, mapnZnYX, mapnZXnY, mapnZXnY, mapnZXY, mapnZXY, mapnZYnX, mapnZYnX, mapnZYX, mapnZYX, mapXnYnZ, mapXnYnZ, mapXnZnY, mapXnZnY, mapXnZY, mapXnZY, mapXZnY, mapXZnY, mapXZY, mapXZY, mapYnXnZ, mapYnXnZ, mapYnXZ, mapYnXZ, mapYnZnX, mapYnZnX, mapYnZX, mapYnZX, mapYXnZ, mapYXnZ, mapYXZ, mapYXZ, mapYZnX, mapYZnX, mapYZX, mapYZX, mapZnXnY, mapZnXnY, mapZnXY, mapZnXY, mapZnYnX, mapZnYnX, mapZnYX, mapZnYX, mapZXnY, mapZXnY, mapZXY, mapZXY, mapZYnX, mapZYnX, mapZYX, mapZYX, mul, mul, mul, mul, mul, mul, mul, mul, mul, mul, mul, mul, mul, mul0, mul0, mul3x3, mul3x3, mul4x3ComponentWise, mul4x3ComponentWise, mulAffine, mulAffine, mulAffineR, mulAffineR, mulComponentWise, mulComponentWise, mulLocal, mulLocal, mulLocalAffine, mulLocalAffine, mulOrthoAffine, mulOrthoAffine, mulPerspectiveAffine, mulPerspectiveAffine, mulPerspectiveAffine, mulTranslationAffine, negateX, negateX, negateY, negateY, negateZ, negateZ, normal, normal, normal, normalize3x3, normalize3x3, normalize3x3, normalizedPositiveX, normalizedPositiveY, normalizedPositiveZ, obliqueZ, obliqueZ, origin, originAffine, ortho, ortho, ortho, ortho, ortho2D, ortho2D, ortho2DLH, ortho2DLH, orthoCrop, orthoLH, orthoLH, orthoLH, orthoLH, orthoSymmetric, orthoSymmetric, orthoSymmetric, orthoSymmetric, orthoSymmetricLH, orthoSymmetricLH, orthoSymmetricLH, orthoSymmetricLH, perspective, perspective, perspective, perspective, perspectiveFar, perspectiveFov, perspectiveFrustumSlice, perspectiveInvOrigin, perspectiveLH, perspectiveLH, perspectiveLH, perspectiveLH, perspectiveNear, perspectiveOffCenter, perspectiveOffCenter, perspectiveOffCenter, perspectiveOffCenter, perspectiveOffCenterFov, perspectiveOffCenterFov, perspectiveOffCenterFov, perspectiveOffCenterFov, perspectiveOffCenterFovLH, perspectiveOffCenterFovLH, perspectiveOffCenterFovLH, perspectiveOffCenterFovLH, perspectiveOffCenterViewFromRectangle, perspectiveOrigin, perspectiveRect, perspectiveRect, perspectiveRect, perspectiveRect, pick, pick, positiveX, positiveY, positiveZ, project, project, project, project, projectedGridRange, properties, reflect, reflect, reflect, reflect, reflect, reflect, reflect, reflect, reflection, reflection, reflection, reflection, rotate, rotate, rotate, rotate, rotate, rotate, rotate, rotate, rotate, rotate, rotate, rotate, rotate, rotate, rotateAffine, rotateAffine, rotateAffine, rotateAffine, rotateAffine, rotateAffine, rotateAffineXYZ, rotateAffineXYZ, rotateAffineYXZ, rotateAffineYXZ, rotateAffineZYX, rotateAffineZYX, rotateAround, rotateAround, rotateAroundAffine, rotateAroundLocal, rotateAroundLocal, rotateLocal, rotateLocal, rotateLocal, rotateLocal, rotateLocal, rotateLocal, rotateLocalX, rotateLocalX, rotateLocalY, rotateLocalY, rotateLocalZ, rotateLocalZ, rotateTowards, rotateTowards, rotateTowards, rotateTowards, rotateTowardsXY, rotateTowardsXY, rotateTranslation, rotateTranslation, rotateTranslation, rotateX, rotateX, rotateXYZ, rotateXYZ, rotateXYZ, rotateY, rotateY, rotateYXZ, rotateYXZ, rotateYXZ, rotateZ, rotateZ, rotateZYX, rotateZYX, rotateZYX, rotation, rotation, rotation, rotation, rotation, rotation, rotation, rotationAround, rotationTowards, rotationTowards, rotationTowardsXY, rotationX, rotationXYZ, rotationY, rotationYXZ, rotationZ, rotationZYX, scale, scale, scale, scale, scale, scale, scaleAround, scaleAround, scaleAround, scaleAround, scaleAroundLocal, scaleAroundLocal, scaleAroundLocal, scaleAroundLocal, scaleLocal, scaleLocal, scaleLocal, scaleLocal, scaleXY, scaleXY, scaling, scaling, scaling, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set3x3, set3x3, set4x3, set4x3, set4x3, setColumn, setFloats, setFloats, setFromAddress, setFromIntrinsic, setFrustum, setFrustum, setFrustumLH, setFrustumLH, setLookAlong, setLookAlong, setLookAt, setLookAt, setLookAtLH, setLookAtLH, setOrtho, setOrtho, setOrtho2D, setOrtho2DLH, setOrthoLH, setOrthoLH, setOrthoSymmetric, setOrthoSymmetric, setOrthoSymmetricLH, setOrthoSymmetricLH, setPerspective, setPerspective, setPerspectiveLH, setPerspectiveLH, setPerspectiveOffCenter, setPerspectiveOffCenter, setPerspectiveOffCenterFov, setPerspectiveOffCenterFov, setPerspectiveOffCenterFovLH, setPerspectiveOffCenterFovLH, setPerspectiveRect, setPerspectiveRect, setRotationXYZ, setRotationYXZ, setRotationZYX, setRow, setRowColumn, setTranslation, setTranslation, setTransposed, shadow, shadow, shadow, shadow, shadow, shadow, shadow, shadow, sub, sub, sub4x3, sub4x3, swap, testAab, testPoint, testSphere, tile, tile, toString, toString, transform, transform, transform, transformAab, transformAab, transformAffine, transformAffine, transformAffine, transformDirection, transformDirection, transformDirection, transformDirection, transformDirection, transformDirection, transformPosition, transformPosition, transformPosition, transformProject, transformProject, transformProject, transformProject, transformProject, transformProject, transformProject, transformProject, transformTranspose, transformTranspose, transformTranspose, translate, translate, translate, translate, translate, translate, translateLocal, translateLocal, translateLocal, translateLocal, translateLocal, translateLocal, translation, translation, translation, translationRotate, translationRotate, translationRotate, translationRotateInvert, translationRotateInvert, translationRotateScale, translationRotateScale, translationRotateScale, translationRotateScale, translationRotateScale, translationRotateScale, translationRotateScaleInvert, translationRotateScaleInvert, translationRotateScaleInvert, translationRotateScaleInvert, translationRotateScaleInvert, translationRotateScaleMulAffine, translationRotateScaleMulAffine, translationRotateTowards, translationRotateTowards, transpose, transpose, transpose3x3, transpose3x3, transpose3x3, trapezoidCrop, unproject, unproject, unproject, unproject, unprojectInv, unprojectInv, unprojectInv, unprojectInv, unprojectInvRay, unprojectInvRay, unprojectRay, unprojectRay, withLookAtUp, withLookAtUp, withLookAtUp, withLookAtUp, zero
-
-
-
-
Constructor Detail
-
Matrix4dStack
public Matrix4dStack(int stackSize)
Create a newMatrix4dStackof 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 theMatrix4dStacksimply only consists ofthisMatrix4d
-
Matrix4dStack
public Matrix4dStack()
Do not invoke manually! Only meant for serialization.Invoking this constructor from client code will result in an inconsistent state of the created
Matrix4dStackinstance.
-
-
Method Detail
-
clear
public Matrix4dStack clear()
Set the stack pointer to zero and set the current/bottom matrix toidentity.- Returns:
- this
-
pushMatrix
public Matrix4dStack 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 Matrix4dStack popMatrix()
Decrement the stack pointer by one.This will effectively dispose of the current matrix.
- Returns:
- this
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classMatrix4d- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classMatrix4d- Throws:
java.io.IOException
-
-