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
-
public class SoFieldSensor extends SoDataSensor
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:
SoNodeSensor
,SoPathSensor
,SoDataSensor
-
-
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
Constructors Constructor Description SoFieldSensor()
Constructor.SoFieldSensor(java.lang.Runnable task)
Builds a new field sensor with the task to be executed when the sensor is triggered.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attach(SoField field)
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.SoField
getAttachedField()
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
-
-
-
-
Method Detail
-
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
public SoField 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
public void attach(SoField field)
Theattach()
method makes this sensor detect changes to the given field. See alsodetach()
,getAttachedField()
-
-