convert coordinate of the cursor to the local coordinate systeme

i want to the coordinate of the mouse to draw,but the coordinate are not compatible with the the coordinate of the viewer
thanks for all

Hugues's picture

To convert mouse coordinates into a coordinates of a view, use function V3d_View::Convert :

Convert( me ; Xp,Yp : Integer ; X,Y,Z : out Coordinate)
---Purpose : Converts the projected point into a point
-- in the reference frame of the view corresponding
-- to the intersection with the projection plane
-- of the eye/view point vector.
raises UnMapped from V3d;
-- If the view is not mapped on the window.

Give to it the (x, y) coordinates as the first two actual arguments.