Hey, I have writen a small 3d engine.

However, I need to rotate a object, as well as keep the object in place and expand it. I have read in the MSDN that the corret way to do this is to multiply the two matrixs. I did this, using the code on question:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=cprog&qid=10294246
However, this does not work. The matrixs are:

matrix Org={10,0,0,10,

0,10,0,10,

0,0,10,10,

0,0,0,0};

matrix roat={1,1,1,1,

1,cosf(movex),sinf(movex),

1,

1,(-sinf(movex)),cosf(movex),1,

1,1,1,1};

could someone show me the correct matrix? Or if this is correct, can someone show me a multiplied matrix that works, so I can debug? Thanks

The first one is shift to orgin

matrix MoveToOrg={1,0,0,0,

0,1,0,0,

0,0,1,0,

-x,-y,-z,1};

For rotation, to represent according to z -axis

matrix

RotatoZ={conf(anglez),sinf

sinf(anglez),conf(anglez),

0,0,1,0,

0,0,0,1};

along x-axis

RotateX={1,0,0,0,

0,conf(anglex),sinf(anglex

0,-sinf(anglex),cosf(angle

0,0,0,1};

along y-axis

RotateY={cosf(angley),0,-s

0,1,0,0,

sinf(angley),0,cosf(angley

0,0,0,1};

And then shift back from orgin

matrix MoveBack={1,0,0,0,

0,1,0,0,

0,0,1,0,

x,y,z,1};

You have to multiply all of them in order to produce a new matrix for 3D object rotation