pyux.identify_coordinate_on_plane - pytha-3d-cad/pytha-lua-api GitHub Wiki

Identifies the corresponding coordinate on an arbitrary plane for the given cursor position.

pyui.identify_coordinate_on_plane(coos_vp, coos_on_plane, normal)

Parameters

Type Description
coos_vp {u, v} Normalized viewport coordinates of the mouse cursor.
coos_on_plane {x,y,z} The origin coordinate on the plane.
normal {x,y,z} The normal vector of the plane.

Return value

Type Description
{x,y,z} Result coordinate on the given plane.

Notes:

The coos_vp coordinates are solely to be received from one of the mous picking and dragging handler function calls such as set_on_left_click_handler or set_on_left_dragstart_handler.

This function is especially useful for mouse dragging to determine an interactive movement in a given plane. In on_dragstart the initial coordinates can be received, while the displacement (or rotation) is calculated in on_dragmove.

See also

pyux, identify_part, identify_coordinate, identify_distance_along_direction, set_on_left_dragstart_handler, set_on_left_dragmove_handler, set_on_left_dragend_handler