Home Products Download Order Contacts

comp.graphics.algorithms

Subject: Re: 4x4 matrix inversion




> the above is a identity matrix. If you inverse it, you get an identity
> matrix. I guess you want to inverse any matrix, right?


I would be applying scale/rotation/translation to that matrix. I guess I
wanted to show how it was set up initially. Specifically I need to invert it
to use for a 3D camera. Additional code from my existing class below.

--------------------

public function rotate(angleX:Number, angleY:Number, angleZ:Number) {
rotateX(angleX);
rotateY(angleY);
rotateZ(angleZ);
}


public function rotateX(angleX:Number):Void {

if (angleX == 0) {
return;
}

var cosAngle:Number = Math.cos(angleX);
var sinAngle:Number = Math.sin(angleX);

temp[0][0] = 1;
temp[0][1] = 0;
temp[0][2] = 0;
temp[0][3] = 0;

temp[1][0] = 0;
temp[1][1] = cosAngle;
temp[1][2] = sinAngle;
temp[1][3] = 0;

temp[2][0] = 0;
temp[2][1] = -sinAngle;
temp[2][2] = cosAngle;
temp[2][3] = 0;

temp[3][0] = 0;
temp[3][1] = 0;
temp[3][2] = 0;
temp[3][3] = 1;

multiply();
}


Reply


View All Messages in comp.graphics.algorithms

path:
4x4 matrix inversion =>Re: 4x4 matrix inversion =>

Replies:
Re: 4x4 matrix inversion

Copyright 2006 WatermarkFactory.com. All Rights Reserved.