Class Matrix44


  • public class Matrix44
    extends java.lang.Object

    4x4 matrix used by SkCanvas and other parts of Skia.

    Skia assumes a right-handed coordinate system: +X goes to the right +Y goes down +Z goes into the screen (away from the viewer)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      float[] _mat
      Matrix elements are in row-major order.
      static Matrix44 IDENTITY  
    • Constructor Summary

      Constructors 
      Constructor Description
      Matrix44​(float... mat)
      The constructor parameters are in row-major order.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Matrix33 asMatrix33()
      When converting from Matrix44 to Matrix33, the third row and column is dropped.
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      float[] getMat()
      Matrix elements are in row-major order.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • _mat

        @Internal
        public final float[] _mat
        Matrix elements are in row-major order.
      • IDENTITY

        public static final Matrix44 IDENTITY
    • Constructor Detail

      • Matrix44

        public Matrix44​(float... mat)
        The constructor parameters are in row-major order.
    • Method Detail

      • asMatrix33

        public Matrix33 asMatrix33()

        When converting from Matrix44 to Matrix33, the third row and column is dropped.

        
         [ a b _ c ]      [ a b c ]
         [ d e _ f ]  ->  [ d e f ]
         [ _ _ _ _ ]      [ g h i ]
         [ g h _ i ]                 
         
      • getMat

        public float[] getMat()
        Matrix elements are in row-major order.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object