Rotate model using toolkit
Hello
We would like to rotate model by 90 degree with respect to Y axis. I am using below code :
ProError status = PRO_TK_GENERAL_ERROR;
//Get assembly
ProMdl objTopAssembly;
status = ProMdlCurrentGet(&objTopAssembly);
//get current assembly's window
int intWindowID;
status = ProMdlWindowGet(objTopAssembly, &intWindowID);
//Matrix to rotate 90 degree about Y axis
ProMatrix objMatrixAboutY;
objMatrixAboutY[0][0] = cos(1.5707);
objMatrixAboutY[0][1] = 0;
objMatrixAboutY[0][2] = -sin(1.5707);
objMatrixAboutY[0][3] = 0;
objMatrixAboutY[1][0] = 0;
objMatrixAboutY[1][1] = 1;
objMatrixAboutY[1][2] = 0;
objMatrixAboutY[1][3] = 0;
objMatrixAboutY[2][0] = sin(1.5707);
objMatrixAboutY[2][1] = 0;
objMatrixAboutY[2][2] = cos(1.5707);
objMatrixAboutY[2][3] = 0;
objMatrixAboutY[3][0] = 0;
objMatrixAboutY[3][1] = 0;
objMatrixAboutY[3][2] = 0;
objMatrixAboutY[3][3] = 1;
// set new matrix
status = ProWindowPanZoomMatrixSet(intWindowID, objMatrixAboutY);
//Repaint the window
status = ProWindowRepaint(intWindowID);
This code just rotate the default csys orientation in to creo window. Model is not rotated at all. Am i missing some information? What should be done to rotate model as well?
Thanks and Regards
Ketan
