Bläddra i källkod

Changed getColumnFromMatrix signature as suggested by @bhouston.

WestLangley 12 år sedan
förälder
incheckning
fe2792df4a
1 ändrade filer med 6 tillägg och 22 borttagningar
  1. 6 22
      src/math/Vector3.js

+ 6 - 22
src/math/Vector3.js

@@ -791,31 +791,15 @@ THREE.extend( THREE.Vector3.prototype, {
 		return this;
 		return this;
 	},
 	},
 
 
-	getColumnX: function ( m ) {
+	getColumnFromMatrix: function ( index, matrix ) {
 
 
-		this.x = m.elements[0];
-		this.y = m.elements[1];
-		this.z = m.elements[2];
+		var offset = index * 4;
 
 
-		return this;
-
-	},
-
-	getColumnY: function ( m ) {
-
-		this.x = m.elements[4];
-		this.y = m.elements[5];
-		this.z = m.elements[6];
-
-		return this;
-
-	},
-
-	getColumnZ: function ( m ) {
+		var me = matrix.elements;
 
 
-		this.x = m.elements[8];
-		this.y = m.elements[9];
-		this.z = m.elements[10];
+		this.x = me[ offset ];
+		this.y = me[ offset + 1 ];
+		this.z = me[ offset + 2 ];
 
 
 		return this;
 		return this;