**THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED**

*On 05/11/2003 at 15:51, xxxxxxxx wrote:*

Hi,

how can I convert rotation of object (obtained using GetRot(), i.e. HPB vector) to rotations around x,y,z axis? I've been trying to do it this way:

Matrix mrz = Matrix::rotateZ(rz);

Matrix mry = Matrix::rotateY(ry);

Matrix mrx = Matrix::rotateX(rx);

return mrz * mry * mrx;

where the matrices are 4x4 OpenGL matrices and rotate{X,Y,Z} are rotations around axis X, Y and Z respectively and the argument is in radians. It's same as this sequence of OpenGL calls:

glRotatef(rad2deg(rz),0,0,1);

glRotatef(rad2deg(ry),0,1,0);

glRotatef(rad2deg(rx),1,0,0);

Is this correct or does Cinema4D use different semantics? I can't make it work...

Thanks!