how to convert the Screen coordinates to World coordinates?



  • QMatrix4x4 m;
    m.setToIdentity();
    QMatrix4x4 pro = objmgr.m_camera->projectionMatrix();
    QMatrix4x4 vi = objmgr.m_camera->viewMatrix();
    QRectF rc;
    vi.viewport(rc);
    QMatrix4x4 vp = provim;
    QVector3D PT = QVector3D(200, 2330,500);
    QVector3D SRCP = PT*vp;
    but the SRCP is too small just z=0.003,x and y always keep 0


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.