Package icyllis.modernui.graphics
Class Matrix
java.lang.Object
icyllis.arc3d.core.Matrix
icyllis.modernui.graphics.Matrix
This class represents a 3x3 matrix and a 2D transformation, its components
correspond to x, y, and w of a 4x4 matrix, where z is discarded.
-
Field Summary
Fields inherited from interface icyllis.arc3d.core.Matrixc
kAffine_Mask, kIdentity_Mask, kPerspective_Mask, kScale_Mask, kTranslate_Mask
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Map a point in the X-Y plane.void
Map a rectangle points in the X-Y plane to get the maximum bounds.void
Map a rectangle points in the X-Y plane to get the maximum bounds.void
Map a rectangle points in the X-Y plane to get the maximum bounds.void
Map a rectangle points in the X-Y plane to get the maximum bounds.void
mapRectOut
(float left, float top, float right, float bottom, Rect out) Map a rectangle points in the X-Y plane to get the maximum bounds.void
mapRectOut
(RectF r, Rect out) Map a rectangle points in the X-Y plane to get the maximum bounds.void
mapRectOut
(Rect r, Rect out) Map a rectangle points in the X-Y plane to get the maximum bounds.void
Copy the given matrix into this matrix.Methods inherited from class icyllis.arc3d.core.Matrix
clone, determinant, differentialAreaScale, equals, equals, getMaxScale, getMaxScale, getMinScale, getMinScale, getPerspX, getPerspY, getScaleX, getScaleY, getShearX, getShearY, getTranslateX, getTranslateY, getType, hashCode, hasPerspective, identity, invert, invert, isApproxEqual, isAxisAligned, isFinite, isIdentity, isScaleTranslate, isSimilarity, isTranslate, localAARadius, localAARadius, m11, m11, m12, m12, m14, m14, m21, m21, m22, m22, m24, m24, m41, m41, m42, m42, m44, m44, makeScale, makeTranslate, mapPoints, mapRect, mapRect, mapRectOut, normalizePerspective, postConcat, postRotate, postScale, postShear, postTranslate, preConcat, preRotate, preScale, preservesRightAngles, preShear, preTranslate, set, set, set, set, set, set, set, setIdentity, setPerspX, setPerspY, setRectToRect, setRotate, setRotate, setScale, setScale, setScaleTranslate, setScaleX, setScaleY, setShear, setShear, setShearX, setShearY, setSinCos, setSinCos, setTranslate, setTranslateX, setTranslateY, store, store, store, store, store, store, storeAligned, storeAligned, storeAligned, toMatrix4, toMatrix4, toString, trace
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface icyllis.arc3d.core.Matrixc
mapPoint, mapPoints, mapPoints, mapPoints, mapPoints, mapRect, mapRect, mapRect, mapRect, mapRectOut, mapRectOut, mapRectOut
-
Constructor Details
-
Matrix
public Matrix()Create a new identity matrix. -
Matrix
Create a new matrix copied from the given matrix. -
Matrix
public Matrix(float scaleX, float shearY, float persp0, float shearX, float scaleY, float persp1, float transX, float transY, float persp2) Create a new matrix from the given elements. The order matches GLSL's column major.- Parameters:
scaleX
- the value of m11shearY
- the value of m12persp0
- the value of m14shearX
- the value of m21scaleY
- the value of m22persp1
- the value of m24transX
- the value of m41transY
- the value of m42persp2
- the value of m44
-
-
Method Details
-
set
Copy the given matrix into this matrix. If m is null, reset this matrix to the identity matrix. -
mapRect
Map a rectangle points in the X-Y plane to get the maximum bounds.- Parameters:
r
- the rectangle to transform
-
mapRect
Map a rectangle points in the X-Y plane to get the maximum bounds.- Parameters:
out
- the round values
-
mapRect
Map a rectangle points in the X-Y plane to get the maximum bounds.- Parameters:
out
- the round values
-
mapRect
Map a rectangle points in the X-Y plane to get the maximum bounds.- Parameters:
out
- the round values
-
mapRectOut
Map a rectangle points in the X-Y plane to get the maximum bounds.- Parameters:
out
- the round out values
-
mapRectOut
Map a rectangle points in the X-Y plane to get the maximum bounds.- Parameters:
out
- the round out values
-
mapRectOut
Map a rectangle points in the X-Y plane to get the maximum bounds.- Parameters:
out
- the round out values
-
mapPoint
Map a point in the X-Y plane.- Parameters:
p
- the point to transform
-