spak

01-23-2001, 06:41 PM

Anyone out there have a quick way to invert a 4x4 matrix ?

I am trying to solve the following problem:

1. There's a globe that's been translated/scaled/rotated not only using gl's translate,scale,rotate routines, but also by multiplying my own 4x4 matrix, and it's displayed in a window.

2. I pick a point on the globe. To identify the "world coordinate" of the picked point on the surface of the globe, I have to find the inverse of the matrix used to transform the globe. I would like to use the inverse matrix to multiply to x,y,z coordinate of the picked point on the surface. The result is the world coordinate x,y,z.

I guess I am too lazy to go through my old linear algebra books to find the matrix inversion routines.

I would appreciate any help.

Thanks.

I am trying to solve the following problem:

1. There's a globe that's been translated/scaled/rotated not only using gl's translate,scale,rotate routines, but also by multiplying my own 4x4 matrix, and it's displayed in a window.

2. I pick a point on the globe. To identify the "world coordinate" of the picked point on the surface of the globe, I have to find the inverse of the matrix used to transform the globe. I would like to use the inverse matrix to multiply to x,y,z coordinate of the picked point on the surface. The result is the world coordinate x,y,z.

I guess I am too lazy to go through my old linear algebra books to find the matrix inversion routines.

I would appreciate any help.

Thanks.