| genre | Interaction |
| status | work-in-progress |
| author | Michael Schmidt |
| package | MeVisLab/Standard |
| dll | MLMiscModulesInv |
| definition | MLMiscModulesInv.def |
| see also | SoSelection2 |
| keywords | Inventor, Ray, Pick, Interaction |
The module InventorRayPicker sends a SoRayPickAction through an OpenInventor scene and retrieves the first point where an object was hit.
Connect an OpenInventor 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.
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.
| 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 |
Defines how the ray's coordinates are being interpreted.
Values:
| Title | Name |
|---|---|
| Viewport Coordinates | ViewportCoordinates |
| Relative Viewport Coordinates | RelativeViewportCoordinates |
| World Coordinates | WorldCoordinates |
Set a radius around the picking ray to be able to pick lines and points. Does not apply for picking surfaces.
Sets the X-position of the ray in the defined viewport.
Sets the Y-position of the ray in the defined viewport.
Sets the relative X-position of the ray.
Sets the Y-position of the ray in the defined viewport.
Sets the start position of the ray in world coordinates.
Sets the direction vector of the ray in world coordinates.
If pressed, the SoPickAction is sent through the OpenInventor scene.
Shows whether the picking was successful, i.e. it hit an object.
Shows the position of the hit object.