From: Caspian Rychlik-P. <ci...@us...> - 2002-08-26 15:53:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector In directory usw-pr-cvs1:/tmp/cvs-serv3892/src/java/org/lwjgl/vector Modified Files: Matrix2f.java Matrix4f.java Matrix3f.java Matrix.java Log Message: Fixes Index: Matrix2f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix2f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix2f.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Matrix2f.java 26 Aug 2002 15:46:39 -0000 1.5 +++ Matrix2f.java 26 Aug 2002 15:53:36 -0000 1.6 @@ -332,7 +332,7 @@ * 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 @@ * Set this matrix to 0. * @return this */ - public Matrix zero() { + public Matrix setZero() { m00 = 0.0f; m01 = 0.0f; m10 = 0.0f; Index: Matrix4f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Matrix4f.java 26 Aug 2002 15:46:39 -0000 1.6 +++ Matrix4f.java 26 Aug 2002 15:53:36 -0000 1.7 @@ -43,7 +43,7 @@ * 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 @@ * 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 @@ * @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 @@ * @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 @@ * 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 @@ buf.put(m13); buf.put(m23); buf.put(m33); + return this; } /** @@ -214,7 +215,7 @@ * 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 @@ buf.put(m31); buf.put(m32); buf.put(m33); + return this; } @@ -398,7 +400,7 @@ * Transpose this matrix * @return this */ - public Matrix4f transpose() { + public Matrix transpose() { float f = m10; m10 = m01; @@ -485,7 +487,7 @@ * Invert this matrix * @return this */ - public Matrix4f invert() { + public Matrix invert() { return this; } @@ -493,7 +495,7 @@ * Negate this matrix * @return this */ - public Matrix4f negate() { + public Matrix negate() { m00 = -m00; m01 = -m01; m02 = -m02; Index: Matrix3f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix3f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix3f.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Matrix3f.java 26 Aug 2002 15:46:39 -0000 1.6 +++ Matrix3f.java 26 Aug 2002 15:53:36 -0000 1.7 @@ -411,7 +411,7 @@ * 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 @@ * Set this matrix to 0. * @return this */ - public Matrix3f setZero() { + public Matrix setZero() { m00 = 0.0f; m01 = 0.0f; m02 = 0.0f; Index: Matrix.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Matrix.java 26 Aug 2002 15:46:39 -0000 1.1 +++ Matrix.java 26 Aug 2002 15:53:36 -0000 1.2 @@ -54,7 +54,7 @@ * Set this matrix to be the identity matrix. * @return this */ - public abstract Matrix identity(); + public abstract Matrix setIdentity(); /** @@ -120,7 +120,7 @@ * Set this matrix to 0. * @return this */ - public abstract Matrix zero(); + public abstract Matrix setZero(); /** |