I have a question about this class...
I'm trying to recreate this method to figure out what exactly Flash is doing here when scaling is applied to a Matrix3D...
With scaling set to 1,1,1 for both matrices everything works fine with my method...
but if the scaling e.g. For example, if it is set to 2,2,2 for one or both matrix objects, the results will be strange...
i've a little example here
import flash.geom.Matrix3D;
import flash.geom.Vector3D;
import flash.geom.Orientation3D;
// define two Matrix3D transforms
var matrix1:Matrix3D = new Matrix3D();
matrix1.appendTranslation(300, 200, 200);
matrix1.appendScale(2, 2, 2);
matrix1.appendRotation(30, Vector3D.Z_AXIS);
matrix1.appendRotation(-45, Vector3D.Y_AXIS);
var matrix2:Matrix3D = new Matrix3D();
matrix2.appendTranslation(100, 100, 100);
matrix2.appendScale(1, 1, 1);
matrix2.appendRotation(90, Vector3D.Y_AXIS);
matrix2.prependRotation(45, Vector3D.X_AXIS);
var interpolatedMatrix:Matrix3D;
// interpolate between the two matrices
interpolatedMatrix = Matrix3D.interpolate(matrix1, matrix2, 0);
trace('original', matrix1.rawData);
trace('\n');
var vec;
trace('QUATERNION original');
vec = matrix1.decompose(Orientation3D.QUATERNION);
trace(vec[1], vec[1].w); // rotation part
trace('\n');
trace('result', interpolatedMatrix.rawData);
trace('\n');
trace('QUATERNION interpolated');
vec = interpolatedMatrix.decompose(Orientation3D.QUATERNION);
trace(vec[1], vec[1].w); // rotation part
trace('\n');
trace('QUATERNION are different, why ?');
the last jigsaw... can someone give me a hint ?