diff --git a/src/java/org/lwjgl/vector/Matrix.java b/src/java/org/lwjgl/vector/Matrix.java index 5ca40e26..66fac610 100644 --- a/src/java/org/lwjgl/vector/Matrix.java +++ b/src/java/org/lwjgl/vector/Matrix.java @@ -54,7 +54,7 @@ public abstract class Matrix { * Set this matrix to be the identity matrix. * @return this */ - public abstract Matrix identity(); + public abstract Matrix setIdentity(); /** @@ -120,7 +120,7 @@ public abstract class Matrix { * Set this matrix to 0. * @return this */ - public abstract Matrix zero(); + public abstract Matrix setZero(); /** diff --git a/src/java/org/lwjgl/vector/Matrix2f.java b/src/java/org/lwjgl/vector/Matrix2f.java index f77756e3..03a44cd0 100644 --- a/src/java/org/lwjgl/vector/Matrix2f.java +++ b/src/java/org/lwjgl/vector/Matrix2f.java @@ -332,7 +332,7 @@ public class Matrix2f extends Matrix { * Set this matrix to be the identity matrix. * @return this */ - public Matrix identity() { + public Matrix setIdentity() { m00 = 1.0f; m01 = 0.0f; m10 = 0.0f; @@ -344,7 +344,7 @@ public class Matrix2f extends Matrix { * Set this matrix to 0. * @return this */ - public Matrix zero() { + public Matrix setZero() { m00 = 0.0f; m01 = 0.0f; m10 = 0.0f; diff --git a/src/java/org/lwjgl/vector/Matrix3f.java b/src/java/org/lwjgl/vector/Matrix3f.java index 129d8f50..d18fa6c1 100644 --- a/src/java/org/lwjgl/vector/Matrix3f.java +++ b/src/java/org/lwjgl/vector/Matrix3f.java @@ -411,7 +411,7 @@ public class Matrix3f extends Matrix { * Set this matrix to be the identity matrix. * @return this */ - public Matrix3f setIdentity() { + public Matrix setIdentity() { m00 = 1.0f; m01 = 0.0f; m02 = 0.0f; @@ -428,7 +428,7 @@ public class Matrix3f extends Matrix { * Set this matrix to 0. * @return this */ - public Matrix3f setZero() { + public Matrix setZero() { m00 = 0.0f; m01 = 0.0f; m02 = 0.0f; diff --git a/src/java/org/lwjgl/vector/Matrix4f.java b/src/java/org/lwjgl/vector/Matrix4f.java index 79c96698..9ecf47fb 100644 --- a/src/java/org/lwjgl/vector/Matrix4f.java +++ b/src/java/org/lwjgl/vector/Matrix4f.java @@ -43,7 +43,7 @@ public class Matrix4f extends Matrix { * Set this matrix to be the identity matrix. * @return this */ - public Matrix4f setIdentity() { + public Matrix setIdentity() { m00 = 1.0f; m01 = 0.0f; m02 = 0.0f; @@ -69,7 +69,7 @@ public class Matrix4f extends Matrix { * Set this matrix to 0. * @return this */ - public Matrix4f setZero() { + public Matrix setZero() { m00 = 0.0f; m01 = 0.0f; m02 = 0.0f; @@ -134,7 +134,7 @@ public class Matrix4f extends Matrix { * @param buf A float buffer to read from * @return this */ - public Matrix4f load(FloatBuffer buf) { + public Matrix load(FloatBuffer buf) { m00 = buf.get(); m10 = buf.get(); @@ -163,7 +163,7 @@ public class Matrix4f extends Matrix { * @param buf A float buffer to read from * @return this */ - public Matrix4f loadTranspose(FloatBuffer buf) { + public Matrix loadTranspose(FloatBuffer buf) { m00 = buf.get(); m01 = buf.get(); @@ -190,7 +190,7 @@ public class Matrix4f extends Matrix { * major (openGL) order. * @param buf The buffer to store this matrix in */ - public void store(FloatBuffer buf) { + public Matrix store(FloatBuffer buf) { buf.put(m00); buf.put(m10); buf.put(m20); @@ -207,6 +207,7 @@ public class Matrix4f extends Matrix { buf.put(m13); buf.put(m23); buf.put(m33); + return this; } /** @@ -214,7 +215,7 @@ public class Matrix4f extends Matrix { * major (maths) order. * @param buf The buffer to store this matrix in */ - public void storeTranspose(FloatBuffer buf) { + public Matrix storeTranspose(FloatBuffer buf) { buf.put(m00); buf.put(m01); buf.put(m02); @@ -231,6 +232,7 @@ public class Matrix4f extends Matrix { buf.put(m31); buf.put(m32); buf.put(m33); + return this; } @@ -398,7 +400,7 @@ public class Matrix4f extends Matrix { * Transpose this matrix * @return this */ - public Matrix4f transpose() { + public Matrix transpose() { float f = m10; m10 = m01; @@ -485,7 +487,7 @@ public class Matrix4f extends Matrix { * Invert this matrix * @return this */ - public Matrix4f invert() { + public Matrix invert() { return this; } @@ -493,7 +495,7 @@ public class Matrix4f extends Matrix { * Negate this matrix * @return this */ - public Matrix4f negate() { + public Matrix negate() { m00 = -m00; m01 = -m01; m02 = -m02;