org.xith3d.picking
Class PickAdapter

java.lang.Object
  extended by org.xith3d.picking.PickAdapter
All Implemented Interfaces:
AllPickListener, NearestPickListener, PickListener, PickListenerBase

public abstract class PickAdapter
extends java.lang.Object
implements PickListener

This class is a simple implementation of the PickListener to ease the anonymous instanciation of PickListeners.

Since:
1.0

Constructor Summary
PickAdapter()
           
 
Method Summary
 void onObjectPicked(PickResult nearest, java.lang.Object userObject, long pickTime)
          This event is fired when a picking was successful
It is very important to be aware of the fact, that the PickResult is not guaranteed to be valid after this method has been left.
 void onObjectsPicked(java.util.List<PickResult> pickResults, java.lang.Object userObject, long pickTime)
          This event is fired when a picking was successful.
 void onPickingMissed(java.lang.Object userObject, long pickTime)
          this Event is fired when a pickray didn't hit any node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xith3d.picking.PickListenerBase
testIntersectionsInWorldSpaceForPicking
 

Constructor Detail

PickAdapter

public PickAdapter()
Method Detail

onObjectPicked

public void onObjectPicked(PickResult nearest,
                           java.lang.Object userObject,
                           long pickTime)
This event is fired when a picking was successful
It is very important to be aware of the fact, that the PickResult is not guaranteed to be valid after this method has been left.

Specified by:
onObjectPicked in interface NearestPickListener
Parameters:
nearest - the neares result.
userObject - this userObject is passed to the Picker and back to this method
pickTime - the needed time to do this picking

onPickingMissed

public void onPickingMissed(java.lang.Object userObject,
                            long pickTime)
this Event is fired when a pickray didn't hit any node

Specified by:
onPickingMissed in interface PickListenerBase
Parameters:
userObject - this userObject is passed to the Picker and back to this method
pickTime - the needed time to do this picking

onObjectsPicked

public void onObjectsPicked(java.util.List<PickResult> pickResults,
                            java.lang.Object userObject,
                            long pickTime)
This event is fired when a picking was successful.
It is very important to be aware of the fact, that the List of PickResults is not guaranteed to be valid after this method has been left.

Specified by:
onObjectsPicked in interface AllPickListener
Parameters:
pickResults - all PickResults from this picking operation
userObject - this userObject is passed to the Picker and back to this method
pickTime - the needed time to do this picking