InventorRayPicker¶
-
MLModule
¶ genre Interaction
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLMiscModulesInv
definition MLMiscModulesInv.def see also SoSelection2
keywords Interaction
Purpose¶
The module InventorRayPicker
sends a SoRayPickAction through an Open Inventor scene and retrieves the first point where an object was hit.
Usage¶
Connect an Open Inventor scene to the input node, set the Width
and Height
of the (virtual) viewer region and the viewer coordinates of the point to be used to create the ray.
Press Pick
to apply the pick action to the scene graph and retrieve the result.
Details¶
In order to be able to generate a 3D ray from the viewport dimensions and the click position, the connected sceneGraph has to contain the camera that is used to render the scene.
Parameter Fields¶
Field Index¶
Define Ray Using : Enum |
Start : Vector3 |
Direction : Vector3 |
Width : Integer |
Height : Integer |
World Position : Vector3 |
Object Position : Vector3 |
X-Pos. (viewportPositionX) : Integer |
Object Type : String |
X-Pos. (relativeViewportPositionX) : Float |
Pick : Trigger |
Y-Pos. (viewportPositionY) : Integer |
Pick Successful : Bool |
Y-Pos. (relativeViewportPositionY) : Float |
Radius (for lines and points only) : Integer |
Visible Fields¶
Define Ray Using¶
-
name:
rayDefinitionMode
, type:
Enum
, default:
ViewportCoordinates
¶ Defines how the ray’s coordinates are being interpreted.
Values:
Title | Name |
---|---|
Viewport Coordinates | ViewportCoordinates |
Relative Viewport Coordinates | RelativeViewportCoordinates |
World Coordinates | WorldCoordinates |
Radius (for lines and points only)¶
-
name:
pickRadius
, type:
Integer
, default:
5
, minimum:
0
, maximum:
100
¶ Set a radius around the picking ray to be able to pick lines and points. Does not apply for picking surfaces.
Width¶
-
name:
viewportWidth
, type:
Integer
, default:
100
, minimum:
0
¶ Sets the width of the viewport.
Height¶
-
name:
viewportHeight
, type:
Integer
, default:
100
, minimum:
0
¶ Sets the height of the viewport.
X-Pos. (viewportPositionX)¶
-
name:
viewportPositionX
, type:
Integer
, default:
0
, minimum:
0
¶ Sets the X-position of the ray in the defined viewport.
Y-Pos. (viewportPositionY)¶
-
name:
viewportPositionY
, type:
Integer
, default:
0
, minimum:
0
¶ Sets the Y-position of the ray in the defined viewport.
X-Pos. (relativeViewportPositionX)¶
-
name:
relativeViewportPositionX
, type:
Float
, default:
0.5
, minimum:
0
, maximum:
1
¶ Sets the relative X-position of the ray.
Y-Pos. (relativeViewportPositionY)¶
-
name:
relativeViewportPositionY
, type:
Float
, default:
0.5
, minimum:
0
, maximum:
1
¶ Sets the Y-position of the ray in the defined viewport.
Start¶
-
name:
worldStartPosition
, type:
Vector3
, default:
0 0 0
¶ Sets the start position of the ray in world coordinates.
Direction¶
-
name:
worldDirectionVector
, type:
Vector3
, default:
0 0 0
¶ Sets the direction vector of the ray in world coordinates.
Pick¶
-
name:
pick
, type:
Trigger
¶ If pressed, the SoPickAction is sent through the Open Inventor scene.
Pick Successful¶
-
name:
pickSuccessful
, type:
Bool
, persistent:
no
¶ Shows whether the picking was successful, i.e. it hit an object.
Object Position¶
-
name:
objectPosition
, type:
Vector3
, persistent:
no
¶ Shows the position of the hit object.