Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatrix3, Poolable { public Matrix3 fromArray(final double[] source) { return fromArray(source, true); } Matrix3();  Matrix3(final double m00, final double m01, final double m02, final double m10, final double m11,
    final double m12, final double m20, final double m21, final double m22);  Matrix3(final ReadOnlyMatrix3 source); @Override double getValue(final int row, final int column); @Override float getValuef(final int row, final int column); @Override double getM00(); @Override double getM01(); @Override double getM02(); @Override double getM10(); @Override double getM11(); @Override double getM12(); @Override double getM20(); @Override double getM21(); @Override double getM22(); void setM00(final double m00); void setM01(final double m01); void setM02(final double m02); void setM10(final double m10); void setM11(final double m11); void setM12(final double m12); void setM20(final double m20); void setM21(final double m21); void setM22(final double m22); Matrix3 setIdentity(); @Override boolean isIdentity(); Matrix3 setValue(final int row, final int column, final double value); Matrix3 set(final double m00, final double m01, final double m02, final double m10, final double m11,
      final double m12, final double m20, final double m21, final double m22); Matrix3 set(final ReadOnlyMatrix3 source); Matrix3 set(final ReadOnlyQuaternion quaternion); Matrix3 fromDoubleBuffer(final DoubleBuffer source); Matrix3 fromDoubleBuffer(final DoubleBuffer source, final boolean rowMajor); Matrix3 fromFloatBuffer(final FloatBuffer source); Matrix3 fromFloatBuffer(final FloatBuffer source, final boolean rowMajor); Matrix3 fromArray(final double[] source); Matrix3 fromArray(final double[] source, final boolean rowMajor); Matrix3 setColumn(final int columnIndex, final ReadOnlyVector3 columnData); Matrix3 setRow(final int rowIndex, final ReadOnlyVector3 rowData); Matrix3 fromAxes(final ReadOnlyVector3 uAxis, final ReadOnlyVector3 vAxis, final ReadOnlyVector3 wAxis); Matrix3 fromAngleAxis(final double angle, final ReadOnlyVector3 axis); Matrix3 fromAngleNormalAxis(final double angle, final ReadOnlyVector3 axis); Matrix3 fromAngles(final double yaw, final double roll, final double pitch); Matrix3 applyRotation(final double angle, final double x, final double y, final double z); Matrix3 applyRotationX(final double angle); Matrix3 applyRotationY(final double angle); Matrix3 applyRotationZ(final double angle); @Override Vector3 getColumn(final int index, final Vector3 store); @Override Vector3 getRow(final int index, final Vector3 store); @Override DoubleBuffer toDoubleBuffer(final DoubleBuffer store); @Override DoubleBuffer toDoubleBuffer(final DoubleBuffer store, final boolean rowMajor); @Override FloatBuffer toFloatBuffer(final FloatBuffer store); @Override FloatBuffer toFloatBuffer(final FloatBuffer store, final boolean rowMajor); @Override double[] toArray(final double[] store); @Override double[] toArray(final double[] store, final boolean rowMajor); @Override double[] toAngles(final double[] store); Matrix3 multiplyLocal(final ReadOnlyMatrix3 matrix); @Override Matrix3 multiply(final ReadOnlyMatrix3 matrix, final Matrix3 store); @Override Matrix3 multiplyDiagonalPre(final ReadOnlyVector3 vec, final Matrix3 store); @Override Matrix3 multiplyDiagonalPost(final ReadOnlyVector3 vec, final Matrix3 store); Matrix3 multiplyLocal(final double scalar); @Override Matrix3 add(final ReadOnlyMatrix3 matrix, final Matrix3 store); Matrix3 addLocal(final ReadOnlyMatrix3 matrix); @Override Matrix3 subtract(final ReadOnlyMatrix3 matrix, final Matrix3 store); Matrix3 subtractLocal(final ReadOnlyMatrix3 matrix); @Override Matrix3 scale(final ReadOnlyVector3 scale, final Matrix3 store); Matrix3 scaleLocal(final ReadOnlyVector3 scale); @Override Matrix3 transpose(final Matrix3 store); Matrix3 transposeLocal(); @Override Matrix3 invert(final Matrix3 store); Matrix3 invertLocal(); @Override Matrix3 adjugate(final Matrix3 store); Matrix3 adjugateLocal(); @Override double determinant(); Matrix3 fromStartEndLocal(final ReadOnlyVector3 start, final ReadOnlyVector3 end); @Override Vector3 applyPre(final ReadOnlyVector3 vec, final Vector3 store); @Override Vector3 applyPost(final ReadOnlyVector3 vec, final Vector3 store); Matrix3 lookAt(final ReadOnlyVector3 direction, final ReadOnlyVector3 up); static boolean isValid(final ReadOnlyMatrix3 matrix); @Override boolean isOrthonormal(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object o); boolean strictEquals(final Object o); @Override Matrix3 clone(); @Override Class<? extends Matrix3> getClassTag(); @Override void write(final OutputCapsule capsule); @Override void read(final InputCapsule capsule); @Override void readExternal(final ObjectInput in); @Override void writeExternal(final ObjectOutput out); final static Matrix3 fetchTempInstance(); final static void releaseTempInstance(final Matrix3 mat); static final double ALLOWED_DEVIANCE; final static ReadOnlyMatrix3 IDENTITY; }
@Test public void testFromArray() { final double[] values = {0, 1, 2, 3, 4, 5, 6, 7, 8}; final Matrix3 mat3A = new Matrix3(); mat3A.fromArray(values); assertTrue(0 == mat3A.getM00()); assertTrue(1 == mat3A.getM01()); assertTrue(2 == mat3A.getM02()); assertTrue(3 == mat3A.getM10()); assertTrue(4 == mat3A.getM11()); assertTrue(5 == mat3A.getM12()); assertTrue(6 == mat3A.getM20()); assertTrue(7 == mat3A.getM21()); assertTrue(8 == mat3A.getM22()); mat3A.setIdentity(); mat3A.fromArray(values, false); assertTrue(0 == mat3A.getM00()); assertTrue(3 == mat3A.getM01()); assertTrue(6 == mat3A.getM02()); assertTrue(1 == mat3A.getM10()); assertTrue(4 == mat3A.getM11()); assertTrue(7 == mat3A.getM12()); assertTrue(2 == mat3A.getM20()); assertTrue(5 == mat3A.getM21()); assertTrue(8 == mat3A.getM22()); }