How can I position (translate) a viz 3d object (wmesh) on a specific x,y screen coordinates?
The function may look like : GetTheTransformationVectors = (Input viz 3d object,input x,y, input hight,input width,output tvec,output rvec)
I have tried to use converto3dray,but I could not make it. There is no example about converto3dray on Google, may be I should use OpenGL instead of VIZ ?
Thank you very much.
VIZ is a VTK wrapper which is an opengl wrapper.
Thanks a lot for the reply. Do you have any comment on the question ?
I think you can use affine transform in showWidget
For instance I want to position 3d object on 150, 250 uv ,
Below code does not work that way ,I may be missing something :
viz::WMesh batman(viz::Mesh::load("C:/data/AE1400245-scaled.ply"));
Affine3d pose = Affine3d().translate(Vec3d(150, 250, 1.0));
myWindow.showWidget("img2", batman, pose);
I think what you want it is example transformation. A camera is set and object is moved in front of camera