Package org.xj3d.core.eventmodel
Interface PickingManager
- All Known Implementing Classes:
DefaultPickingManager
public interface PickingManager
An abstract representation of a class that would be responsible for
performing all the picking component by the class.
It is expected that the manager will be implemented by each renderer as working out when sensors intersect and interact will require in-depth knowledge of the rendering API.
- Version:
- $Revision: 1.1 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSensor
(VRMLPickingSensorNodeType sensor) Add a new sensor instance to the system for processing.void
clear()
Force clearing all state from this manager now.void
loadScene
(BasicScene scene) Load the contents of this scene into the sensor manager.void
processPickSensors
(double time) Process the list of picking sensors now.void
Cleanup the given sensor and remove them from the list of processing to be done each frame.void
setErrorReporter
(org.j3d.util.ErrorReporter reporter) Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion.void
unloadScene
(BasicScene scene) Unload the contents of this scene into the sensor manager.
-
Method Details
-
setErrorReporter
void setErrorReporter(org.j3d.util.ErrorReporter reporter) Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.- Parameters:
reporter
- The instance to use or null
-
removeSensor
Cleanup the given sensor and remove them from the list of processing to be done each frame. The list will be created elsewhere (typically the per-frame behaviour as a result of the event model processing) and passed to this manager. The given list will contain instances of VRMLSensorNodeType. There will be no protos as this is just the raw sensor nodes internally.- Parameters:
sensor
- The sensor to remove
-
addSensor
Add a new sensor instance to the system for processing.- Parameters:
sensor
- The list of sensor to add
-
processPickSensors
void processPickSensors(double time) Process the list of picking sensors now.- Parameters:
time
- The timestamp for "now"
-
loadScene
Load the contents of this scene into the sensor manager. The call does not need to be recursive as it is expected the external caller will work with this.- Parameters:
scene
- The scene to source data from
-
unloadScene
Unload the contents of this scene into the sensor manager. The call does not need to be recursive as it is expected the external caller will work with this.- Parameters:
scene
- The scene to source data from
-
clear
void clear()Force clearing all state from this manager now. This is used to indicate that a new world is about to be loaded and everything should be cleaned out now.
-