Class Matrix

java.lang.Object
com.raylib.Matrix

public class Matrix extends Object
Matrix, 4x4 components, column major, OpenGL style, right handed
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The native FFI MemorySegment that holds the data this object wraps.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct with auto memory allocator and fields initialized to zero.
    Matrix(float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15)
    Construct with auto memory allocator and fields initialized as specified
    Matrix(MemorySegment memorySegment)
    Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    Construct with your owm memory allocator and fields not initialized
    Matrix(SegmentAllocator arena, float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15)
    Construct with your own memory allocator and fields initialized as specified
  • Method Summary

    Modifier and Type
    Method
    Description
    static Matrix
    allocateArray(long elementCount)
    Allocate an array of Matrix
    static Matrix
    allocateArray(long elementCount, SegmentAllocator allocator)
    Allocate an array of Matrix
    boolean
    Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
    getArrayElement(int index)
     
    float
    Matrix first row (4 components)
    float
    Matrix second row (4 components)
    float
    Matrix third row (4 components)
    float
    Matrix fourth row (4 components)
    float
    Matrix first row (4 components)
    float
    Matrix second row (4 components)
    float
    Matrix third row (4 components)
    float
    Matrix fourth row (4 components)
    float
    Matrix third row (4 components)
    float
    Matrix fourth row (4 components)
    float
    Matrix first row (4 components)
    float
    Matrix second row (4 components)
    float
    Matrix third row (4 components)
    float
    Matrix fourth row (4 components)
    float
    Matrix first row (4 components)
    float
    Matrix second row (4 components)
    int
     
    float
    m0()
    Matrix first row (4 components)
    m0(float value)
    Matrix first row (4 components)
    float
    m1()
    Matrix second row (4 components)
    m1(float value)
    Matrix second row (4 components)
    float
    m10()
    Matrix third row (4 components)
    m10(float value)
    Matrix third row (4 components)
    float
    m11()
    Matrix fourth row (4 components)
    m11(float value)
    Matrix fourth row (4 components)
    float
    m12()
    Matrix first row (4 components)
    m12(float value)
    Matrix first row (4 components)
    float
    m13()
    Matrix second row (4 components)
    m13(float value)
    Matrix second row (4 components)
    float
    m14()
    Matrix third row (4 components)
    m14(float value)
    Matrix third row (4 components)
    float
    m15()
    Matrix fourth row (4 components)
    m15(float value)
    Matrix fourth row (4 components)
    float
    m2()
    Matrix third row (4 components)
    m2(float value)
    Matrix third row (4 components)
    float
    m3()
    Matrix fourth row (4 components)
    m3(float value)
    Matrix fourth row (4 components)
    float
    m4()
    Matrix first row (4 components)
    m4(float value)
    Matrix first row (4 components)
    float
    m5()
    Matrix second row (4 components)
    m5(float value)
    Matrix second row (4 components)
    float
    m6()
    Matrix third row (4 components)
    m6(float value)
    Matrix third row (4 components)
    float
    m7()
    Matrix fourth row (4 components)
    m7(float value)
    Matrix fourth row (4 components)
    float
    m8()
    Matrix first row (4 components)
    m8(float value)
    Matrix first row (4 components)
    float
    m9()
    Matrix second row (4 components)
    m9(float value)
    Matrix second row (4 components)
    void
    setM0(float value)
    Matrix first row (4 components)
    void
    setM1(float value)
    Matrix second row (4 components)
    void
    setM10(float value)
    Matrix third row (4 components)
    void
    setM11(float value)
    Matrix fourth row (4 components)
    void
    setM12(float value)
    Matrix first row (4 components)
    void
    setM13(float value)
    Matrix second row (4 components)
    void
    setM14(float value)
    Matrix third row (4 components)
    void
    setM15(float value)
    Matrix fourth row (4 components)
    void
    setM2(float value)
    Matrix third row (4 components)
    void
    setM3(float value)
    Matrix fourth row (4 components)
    void
    setM4(float value)
    Matrix first row (4 components)
    void
    setM5(float value)
    Matrix second row (4 components)
    void
    setM6(float value)
    Matrix third row (4 components)
    void
    setM7(float value)
    Matrix fourth row (4 components)
    void
    setM8(float value)
    Matrix first row (4 components)
    void
    setM9(float value)
    Matrix second row (4 components)

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • memorySegment

      public final MemorySegment memorySegment
      The native FFI MemorySegment that holds the data this object wraps.
  • Constructor Details

    • Matrix

      public Matrix()
      Construct with auto memory allocator and fields initialized to zero.
    • Matrix

      public Matrix(SegmentAllocator arena)
      Construct with your owm memory allocator and fields not initialized
    • Matrix

      public Matrix(MemorySegment memorySegment)
      Construct by wrapping around an already allocated MemorySegment, perhaps from another object
    • Matrix

      public Matrix(float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15)
      Construct with auto memory allocator and fields initialized as specified
      Parameters:
      m0 - Matrix first row (4 components)
      m4 - Matrix first row (4 components)
      m8 - Matrix first row (4 components)
      m12 - Matrix first row (4 components)
      m1 - Matrix second row (4 components)
      m5 - Matrix second row (4 components)
      m9 - Matrix second row (4 components)
      m13 - Matrix second row (4 components)
      m2 - Matrix third row (4 components)
      m6 - Matrix third row (4 components)
      m10 - Matrix third row (4 components)
      m14 - Matrix third row (4 components)
      m3 - Matrix fourth row (4 components)
      m7 - Matrix fourth row (4 components)
      m11 - Matrix fourth row (4 components)
      m15 - Matrix fourth row (4 components)
    • Matrix

      public Matrix(SegmentAllocator arena, float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15)
      Construct with your own memory allocator and fields initialized as specified
      Parameters:
      m0 - Matrix first row (4 components)
      m4 - Matrix first row (4 components)
      m8 - Matrix first row (4 components)
      m12 - Matrix first row (4 components)
      m1 - Matrix second row (4 components)
      m5 - Matrix second row (4 components)
      m9 - Matrix second row (4 components)
      m13 - Matrix second row (4 components)
      m2 - Matrix third row (4 components)
      m6 - Matrix third row (4 components)
      m10 - Matrix third row (4 components)
      m14 - Matrix third row (4 components)
      m3 - Matrix fourth row (4 components)
      m7 - Matrix fourth row (4 components)
      m11 - Matrix fourth row (4 components)
      m15 - Matrix fourth row (4 components)
  • Method Details

    • equals

      public boolean equals(Object o)
      Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equal
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getArrayElement

      public Matrix getArrayElement(int index)
    • allocateArray

      public static Matrix allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of Matrix
    • allocateArray

      public static Matrix allocateArray(long elementCount)
      Allocate an array of Matrix
    • getM0

      public float getM0()
      Matrix first row (4 components)
    • setM0

      public void setM0(float value)
      Matrix first row (4 components)
    • m0

      public float m0()
      Matrix first row (4 components)
    • m0

      public Matrix m0(float value)
      Matrix first row (4 components)
    • getM4

      public float getM4()
      Matrix first row (4 components)
    • setM4

      public void setM4(float value)
      Matrix first row (4 components)
    • m4

      public float m4()
      Matrix first row (4 components)
    • m4

      public Matrix m4(float value)
      Matrix first row (4 components)
    • getM8

      public float getM8()
      Matrix first row (4 components)
    • setM8

      public void setM8(float value)
      Matrix first row (4 components)
    • m8

      public float m8()
      Matrix first row (4 components)
    • m8

      public Matrix m8(float value)
      Matrix first row (4 components)
    • getM12

      public float getM12()
      Matrix first row (4 components)
    • setM12

      public void setM12(float value)
      Matrix first row (4 components)
    • m12

      public float m12()
      Matrix first row (4 components)
    • m12

      public Matrix m12(float value)
      Matrix first row (4 components)
    • getM1

      public float getM1()
      Matrix second row (4 components)
    • setM1

      public void setM1(float value)
      Matrix second row (4 components)
    • m1

      public float m1()
      Matrix second row (4 components)
    • m1

      public Matrix m1(float value)
      Matrix second row (4 components)
    • getM5

      public float getM5()
      Matrix second row (4 components)
    • setM5

      public void setM5(float value)
      Matrix second row (4 components)
    • m5

      public float m5()
      Matrix second row (4 components)
    • m5

      public Matrix m5(float value)
      Matrix second row (4 components)
    • getM9

      public float getM9()
      Matrix second row (4 components)
    • setM9

      public void setM9(float value)
      Matrix second row (4 components)
    • m9

      public float m9()
      Matrix second row (4 components)
    • m9

      public Matrix m9(float value)
      Matrix second row (4 components)
    • getM13

      public float getM13()
      Matrix second row (4 components)
    • setM13

      public void setM13(float value)
      Matrix second row (4 components)
    • m13

      public float m13()
      Matrix second row (4 components)
    • m13

      public Matrix m13(float value)
      Matrix second row (4 components)
    • getM2

      public float getM2()
      Matrix third row (4 components)
    • setM2

      public void setM2(float value)
      Matrix third row (4 components)
    • m2

      public float m2()
      Matrix third row (4 components)
    • m2

      public Matrix m2(float value)
      Matrix third row (4 components)
    • getM6

      public float getM6()
      Matrix third row (4 components)
    • setM6

      public void setM6(float value)
      Matrix third row (4 components)
    • m6

      public float m6()
      Matrix third row (4 components)
    • m6

      public Matrix m6(float value)
      Matrix third row (4 components)
    • getM10

      public float getM10()
      Matrix third row (4 components)
    • setM10

      public void setM10(float value)
      Matrix third row (4 components)
    • m10

      public float m10()
      Matrix third row (4 components)
    • m10

      public Matrix m10(float value)
      Matrix third row (4 components)
    • getM14

      public float getM14()
      Matrix third row (4 components)
    • setM14

      public void setM14(float value)
      Matrix third row (4 components)
    • m14

      public float m14()
      Matrix third row (4 components)
    • m14

      public Matrix m14(float value)
      Matrix third row (4 components)
    • getM3

      public float getM3()
      Matrix fourth row (4 components)
    • setM3

      public void setM3(float value)
      Matrix fourth row (4 components)
    • m3

      public float m3()
      Matrix fourth row (4 components)
    • m3

      public Matrix m3(float value)
      Matrix fourth row (4 components)
    • getM7

      public float getM7()
      Matrix fourth row (4 components)
    • setM7

      public void setM7(float value)
      Matrix fourth row (4 components)
    • m7

      public float m7()
      Matrix fourth row (4 components)
    • m7

      public Matrix m7(float value)
      Matrix fourth row (4 components)
    • getM11

      public float getM11()
      Matrix fourth row (4 components)
    • setM11

      public void setM11(float value)
      Matrix fourth row (4 components)
    • m11

      public float m11()
      Matrix fourth row (4 components)
    • m11

      public Matrix m11(float value)
      Matrix fourth row (4 components)
    • getM15

      public float getM15()
      Matrix fourth row (4 components)
    • setM15

      public void setM15(float value)
      Matrix fourth row (4 components)
    • m15

      public float m15()
      Matrix fourth row (4 components)
    • m15

      public Matrix m15(float value)
      Matrix fourth row (4 components)