Class CloserVisibleCameraPickerBehavior

java.lang.Object
org.ngengine.picker.CloserVisibleCameraPickerBehavior
All Implemented Interfaces:
CameraPickerBehavior

public class CloserVisibleCameraPickerBehavior extends Object implements CameraPickerBehavior
A picker behavior that selects the closest visible object.
  • Constructor Details

    • CloserVisibleCameraPickerBehavior

      public CloserVisibleCameraPickerBehavior()
  • Method Details

    • select

      public CollisionResult select(Collidable rootNode, Camera cam, CollisionResults results)
      Description copied from interface: CameraPickerBehavior
      Selects one of the collision results.
      Specified by:
      select in interface CameraPickerBehavior
      Parameters:
      rootNode - the root node that was picked against
      cam - the camera that was used for picking
      results - the collision results
      Returns:
      the selected collision result, or null if none is suitable
    • tweakRay

      public Ray tweakRay(Collidable rootNode, Camera cam, Ray ray)
      Description copied from interface: CameraPickerBehavior
      Tweaks the ray before it is used for picking.
      Specified by:
      tweakRay in interface CameraPickerBehavior
      Parameters:
      rootNode - the root node that will be picked against
      cam - the camera that is used for picking
      ray - the ray to tweak
      Returns:
      the tweaked ray (usually the same instance as the input ray)