de.javagl.swogl
Interface PickingRayComputer
- All Known Implementing Classes:
- DefaultPickingRayComputer
public interface PickingRayComputer
Interface for all classes that may compute a picking Ray
that
may be sent into a scene, based on a point in screen coordinates.
Instances of classes implementing this interface may be passed
to the SwoglContainer.create(java.awt.Component,
SwoglComponentHandler, PickingRayComputer)
method, and will
be used by the SwoglContainer to compute the picking rays for
the interaction with the SwoglComponents.
computePickingRay
Ray computePickingRay(int x,
int y)
- Returns the picking
Ray
for the given position. The position
is given in local screen coordinates. The direction of the returned
ray is normalized.
- Parameters:
x
- The x-coordinatey
- The y-coordinate
- Returns:
- The picking ray