Package org.ngengine.picker
Class CloserVisibleCameraPickerBehavior
java.lang.Object
org.ngengine.picker.CloserVisibleCameraPickerBehavior
- All Implemented Interfaces:
CameraPickerBehavior
A picker behavior that selects the closest visible object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionselect(Collidable rootNode, Camera cam, CollisionResults results) Selects one of the collision results.tweakRay(Collidable rootNode, Camera cam, Ray ray) Tweaks the ray before it is used for picking.
-
Constructor Details
-
CloserVisibleCameraPickerBehavior
public CloserVisibleCameraPickerBehavior()
-
-
Method Details
-
select
Description copied from interface:CameraPickerBehaviorSelects one of the collision results.- Specified by:
selectin interfaceCameraPickerBehavior- Parameters:
rootNode- the root node that was picked againstcam- the camera that was used for pickingresults- the collision results- Returns:
- the selected collision result, or null if none is suitable
-
tweakRay
Description copied from interface:CameraPickerBehaviorTweaks the ray before it is used for picking.- Specified by:
tweakRayin interfaceCameraPickerBehavior- Parameters:
rootNode- the root node that will be picked againstcam- the camera that is used for pickingray- the ray to tweak- Returns:
- the tweaked ray (usually the same instance as the input ray)
-