Perform a pick test on the canvas
<node3d:canvas>.pick( | |
info = False | |
pos = None | # [x,y] |
mode = viz.CANVAS_CURSOR_NORMALIZED | |
all = False | |
ignoreBackFace = False | |
computePath = False | |
ignoreClipped = False | |
) |
Mode | Description |
viz.CANVAS_CURSOR_NORMALIZED | The position is specified in normalized (0-1) canvas coordinates. |
viz.CANVAS_CURSOR_PIXELS | The position is specified in canvas pixel resolution coordinates. |
info | all | Return Value |
False | False | <node3d> object |
True | False | viz.Intersect object |
False | True | List of <node3d> objects |
True | True | List of viz.Intersect objects |
Attribute | |
valid | True if an intersection occurred, False if it didn't. |
point | The point of intersection with the object. |
normal | The normal vector of the intersect point. |
object | The node3d object that was intersected. This will be the lowest level node3d object within the scene hierarchy. You can prevent specific nodes from appearing as the intersect object by disabling viz.INTERSECT_INFO_OBJECT on them. In this case, the first parent node with this attribute enabled will be reported as the intersect object. |
name | The name of the sub-node that was intersected. |
object_path | A list of node3d objects representing the full path to the intersected object within the scene hierarchy. This value is only computed if the computePath option is True. |
name_path | A list of sub-node names representing the full path to the intersected object within the scene hierarchy. This value is only computed if the computePath option is True. |