Class Matrix2f

java.lang.Object
eu.webtoolkit.jwt.Matrix2f

public class Matrix2f
extends java.lang.Object
A single precision floating point 2 by 2 matrix. Primarily to support 3D rotations.
  • Constructor Summary

    Constructors
    Constructor Description
    Matrix2f()
    Constructs and initializes a Matrix2f to all zeros.
  • Method Summary

    Modifier and Type Method Description
    float getElement​(int row, int column)
    Retrieves the value at the specified row and column of this matrix.
    void setElement​(int row, int column, float value)
    Sets the specified element of this matrix4f to the value provided.
    java.lang.String toString()  
    void transpose​(Matrix2f m1)
    Sets the value of this matrix to the transpose of the argument matrix.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Matrix2f

      public Matrix2f()
      Constructs and initializes a Matrix2f to all zeros.
  • Method Details

    • getElement

      public float getElement​(int row, int column)
      Retrieves the value at the specified row and column of this matrix.
      Parameters:
      row - the row number to be retrieved (zero indexed)
      column - the column number to be retrieved (zero indexed)
      Returns:
      the value at the indexed element
    • setElement

      public void setElement​(int row, int column, float value)
      Sets the specified element of this matrix4f to the value provided.
      Parameters:
      row - the row number to be modified (zero indexed)
      column - the column number to be modified (zero indexed)
      value - the new value
    • transpose

      public void transpose​(Matrix2f m1)
      Sets the value of this matrix to the transpose of the argument matrix.
      Parameters:
      m1 - the matrix to be transposed
    • toString

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