Forum archiveIssue archiveVisualization and 3D Viewer

Archived discussion

3D Points From Mouse Click

Visualization and 3D ViewerFri, 05/27/2011 - 14:413 replies

Browse this forum
QuestionAuthor

Hi, Can anybody tell me how to get the X Y Z points(gp_Pnt) when i click some where on the screen. I understand we get only two values from the screen. can we identify the plane in which we are clicking. I see the code of taking xMin and yMin in the "OnLButtonDown" function. but i need the "Z" value also Thanks in advance, Author

Discussion

3 archived replies

Posts are displayed in their archived order.

01Commenter-1

Hi Author,

You can use the method V3d_View.Convert(...) with the mouse x and y as input parameter and x,y,z as return parameter.

Hope that helps.
Commenter-1

02Author

Thanks for the Help Peter let me work on that

03Commenter-2

Did it work?