Class SoSensor
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.sensors.SoSensor
- Direct Known Subclasses:
SoDelayQueueSensor
,SoTimerQueueSensor
Abstract base class for Open Inventor sensors.
Sensors detect changes either to time or to Open Inventor objects in a scene graph, and call a user-defined callback function. Sensors are scheduled when the thing they are attached to changes, and sometime after they are scheduled they are triggered , calling the user's callback function.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this sensor has been scheduled and is waiting in a sensor queue to be triggered.void
schedule()
void
Sets the task to be executed when the sensor is triggered.void
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Method Details
-
setTask
Sets the task to be executed when the sensor is triggered. Execute the task means simply call its run method. -
schedule
public void schedule() -
unschedule
public void unschedule() -
isScheduled
public boolean isScheduled()Returns true if this sensor has been scheduled and is waiting in a sensor queue to be triggered. Sensors are removed from the queue before their callback function is triggered.
-