Browse Source

minor hmd fixes

ncannasse 11 years ago
parent
commit
4f59af4be0
3 changed files with 10 additions and 10 deletions
  1. 7 7
      h3d/Quat.hx
  2. 2 2
      h3d/anim/Skin.hx
  3. 1 1
      hxd/fmt/hmd/Dump.hx

+ 7 - 7
h3d/Quat.hx

@@ -236,19 +236,19 @@ class Quat {
 	}
 
 	public inline function conjugate() {
-		x *= -1;
-		y *= -1;
-		z *= -1;
+		x = -x;
+		y = -y;
+		z = -z;
 	}
 
 	/**
 		Negate the quaternion: this will not change the actual angle, use `conjugate` for that.
 	**/
 	public inline function negate() {
-		x *= -1;
-		y *= -1;
-		z *= -1;
-		w *= -1;
+		x = -x;
+		y = -y;
+		z = -z;
+		w = -w;
 	}
 
 	public inline function dot( q : Quat ) {

+ 2 - 2
h3d/anim/Skin.hx

@@ -89,7 +89,7 @@ class Skin {
 		for( i in 0...vertexCount ) {
 			var il = envelop[i];
 			if( il == null ) il = [];
-			il.sort(sortInfluences);
+			haxe.ds.ArraySort.sort(il,sortInfluences);
 			if( il.length > bonesPerVertex )
 				il = il.slice(0, bonesPerVertex);
 			var tw = 0.;
@@ -163,7 +163,7 @@ class Skin {
 		for( g in groups )
 			for( j in g.joints )
 				joints[j.bindIndex].groups.push(g);
-		joints.sort(function(j1, j2) return j2.groups.length - j1.groups.length);
+		haxe.ds.ArraySort.sort(joints, function(j1, j2) return j2.groups.length - j1.groups.length);
 		for( j in joints ) {
 			for( i in 0...maxBones ) {
 				var ok = true;

+ 1 - 1
hxd/fmt/hmd/Dump.hx

@@ -157,7 +157,7 @@ class Dump {
 				if( o.flags.has(HasRotation) )
 					stride += 3;
 				if( o.flags.has(HasScale) )
-					stride += 2;
+					stride += 3;
 				if( o.flags.has(SinglePosition) )
 					frames = 1;
 				if( stride > 0 )