Translate

Hi,
I am trying to fix the problem in my project when the object is moving. The Cube should locate in the center, but from the figures below are not.
I think it should be the translate problem. The part code is as following:
-----------------------------
//Before rotating, translating or scaling, reset the cube to its original position to prevent rounding errors
cube.Reset();
cube.Translate(patt_trans[0][3],-patt_trans[1][3],-patt_trans[2][3]);
cube.Rotate((4096/(2*3.14))*rot[0],(4096/(2*3.14))*rot[1],(4096/(2*3.14))*rot[2]);
//Set 3D perspective and move the camera backwards (scale for the Edge internal renderer)
display->Perspective3D(display->GetWidth(), display->GetHeight());
// #if !defined(EGL_USEGL)
display->WorldScale(65536 * 2, 65536 * 2, 65536 * 2);
// #endif
display->WorldScale(65536*patt_width/2, 65536*patt_width/2,65536*patt_width/2);
display->Render(&cube);
return(E_OK);
display->WorldReset();
------------------------------------
Thanks.
I am trying to fix the problem in my project when the object is moving. The Cube should locate in the center, but from the figures below are not.


I think it should be the translate problem. The part code is as following:
-----------------------------
//Before rotating, translating or scaling, reset the cube to its original position to prevent rounding errors
cube.Reset();
cube.Translate(patt_trans[0][3],-patt_trans[1][3],-patt_trans[2][3]);
cube.Rotate((4096/(2*3.14))*rot[0],(4096/(2*3.14))*rot[1],(4096/(2*3.14))*rot[2]);
//Set 3D perspective and move the camera backwards (scale for the Edge internal renderer)
display->Perspective3D(display->GetWidth(), display->GetHeight());
// #if !defined(EGL_USEGL)
display->WorldScale(65536 * 2, 65536 * 2, 65536 * 2);
// #endif
display->WorldScale(65536*patt_width/2, 65536*patt_width/2,65536*patt_width/2);
display->Render(&cube);
return(E_OK);
display->WorldReset();
------------------------------------
Thanks.