This command returns the line passing through the given screen coordinates
| <window>.screenToWorld( | |
| [x,y] | |
| eye = viz.BOTH_EYE | # keyword argument |
| mode = viz.WINDOW_NORMALIZED | # keyword argument |
)
[x,y]
Screen coordinates in either normalized or pixel units, depending on the mode parameter.
eye = viz.BOTH_EYE
The eye to perform the operation on. Can be viz.BOTH_EYE, viz.LEFT_EYE, viz.RIGHT_EYE. If stereo mode is enabled, the command will automatically adjust the mouse coordinates for the specified eye.
mode = viz.WINDOW_NORMALIZED
One of the following modes:
Unit mode |
|
viz.WINDOW_NORMALIZED |
The coordinates passed to the function will be in normalized units, [0,1]. |
viz.WINDOW_PIXELS |
The coordinates passed to the function will be in pixel units. |
This command will take normalized display coordinates and convert them into 3D coordinates of the sub-window.
A Line object that contains the following attributes:
Attribute |
|
begin |
The begin point of the line. |
end |
The end point of the line. |
length |
The length of the line. |
dir |
The direction vector of the line. |
matrix |
The rotation matrix of the line. |