Your code does not multiply the entire vectors, should it?Originally Posted by chronozphere
So that's almost like my second suggestion. Maybe something like this?
[pascal]
var i: integer;
...
for i:=0 to 2 do begin
mat[i,0]:=mat[i,0]*Scale_X;
mat[i,1]:=mat[i,1]*Scale_Y;
mat[i,2]:=mat[i,2]*Scale_Z;
// or test flip the other way: mat[0,i]:=mat[0,i]*Scale_X; etc...
end;
// Oh, looked up my matrix functions and this is the exact way to do it.[/pascal]
As far as i know, OpenGL and DirectX use matrices in inverse to each other so that can sometimes cause fuss too.
Bookmarks