Class SoFieldSensor
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.sensors.SoSensor
com.openinventor.inventor.sensors.SoDelayQueueSensor
com.openinventor.inventor.sensors.SoDataSensor
com.openinventor.inventor.sensors.SoFieldSensor
Sensor class that can be attached to Open Inventor fields.
Field sensors detect changes to fields, calling a callback function whenever the field changes. The field may be part of a node, an input of an engine, or a global field.
See SoDataSensor
for general information and code example.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.sensors.SoDataSensor
SoDataSensor.ChangeTypes
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
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.SoFieldSensor
(Runnable task) Builds a new field sensor with the task to be executed when the sensor is triggered. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Theattach()
method makes this sensor detect changes to the given field.void
detach()
Thedetach()
method unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph.ThegetAttachedField()
method returns the field that this sensor is sensing, or NULL if it is not attached to any field.Methods inherited from class com.openinventor.inventor.sensors.SoDataSensor
getTriggerChild, getTriggerChildIndex, getTriggerFastEditInfo, getTriggerFastEditInfoFlag, getTriggerField, getTriggerMFieldNumValues, getTriggerMFieldStartIndex, getTriggerNode, getTriggerPath, getTriggerPathFlag, getTriggerType, setFinalTask, setTriggerFastEditInfoFlag, setTriggerPathFlag
Methods inherited from class com.openinventor.inventor.sensors.SoDelayQueueSensor
getDefaultPriority, getPriority, isIdleOnly, setPriority
Methods inherited from class com.openinventor.inventor.sensors.SoSensor
isScheduled, schedule, setTask, unschedule
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoFieldSensor
Builds a new field sensor with the task to be executed when the sensor is triggered. -
SoFieldSensor
public SoFieldSensor()Constructor.
-
-
Method Details
-
detach
public void detach()Thedetach()
method unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph. See alsoattach()
,getAttachedField()
-
getAttachedField
ThegetAttachedField()
method returns the field that this sensor is sensing, or NULL if it is not attached to any field. See alsoattach()
,detach()
-
attach
Theattach()
method makes this sensor detect changes to the given field. See alsodetach()
,getAttachedField()
-