466

Picking shapes
Picking example code

  • Create a pick ray aimed using mouse screen data
    PickRay myRay = new PickRay( rayOrigin, rayDirection );

  • Initiate a pick starting at a Locale
    SceneGraphPath[ ] results = myLocale.pickAllSorted( myRay );

  • Get the first (closest) shape off the results
    Node pickedObject = results[0].getObject( );