Commits

Roi Atalla  committed e6398f9

Added a constructor to Matrix4 that takes another Matrix4 to copy.

  • Participants
  • Parent commits f40d99a

Comments (0)

Files changed (1)

File src/main/java/com/ra4king/opengl/util/math/Matrix4.java

 		put(m);
 	}
 	
+	public Matrix4(Matrix4 m) {
+		this();
+		put(m);
+	}
+	
 	public Matrix4 clear() {
 		matrix.clear();
 		return this;
 		return this;
 	}
 	
+	public Matrix4 put(Matrix4 m) {
+		FloatBuffer b = m.getBuffer();
+		while(b.hasRemaining())
+			matrix.put(b.get());
+		
+		return this;
+	}
+	
 	public Matrix4 mult(float[] m) {
 		float[] newm = new float[16];
 		for(int a = 0; a < 16; a += 4) {