Windows Coordinate to 3D coordinate

I'm trying to convert an OCC Point to a QT widget coordinate system. Can anyone help me out?
I already tried with convert method of V3d_View class, but it was unsuccessful.

ojunco

Mikael Aronsson's picture

In what way was it unsuccessful ? how did you use it ?

ojunco's picture

I tried this, but it did not work.

void convertOCCPointtoPointQt(gp_Pnt2d pointOCC, Standard_Real& x,
Standard_Real& y, Standard_Real& z)
{
V3d_Coordinate xPoint, yPoint, zPoint;
Standard_Real xOcc, yOcc;

xOcc = pointOCC.X();
yOcc = pointOCC.Y();

view->Convert(xOcc, yOcc, xPoint, yPoint, zPoint);

x = xPoint;
y = yPoint;
z = zPoint;

}

Thanks in advance.