Class SoPathSensor
- 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.SoPathSensor
-
public class SoPathSensor extends SoDataSensor
Sensor class that can be attached to Open Inventor paths. Path sensors detect changes to paths, calling a callback function whenever the path or any node in the path changes.The definition of "in the path" is the same as the definition used when applying an action to the path - any node that can possibly affect the node at the end of the path chain is considered in the path. See the
SoPath
manual page for more information on paths.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 SoPathSensor()
Default constructor.SoPathSensor(java.lang.Runnable task)
Build a new path 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(SoPath path)
Makes this sensor detect changes to the given path.void
detach()
Unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph.SoPath
getAttachedPath()
Returns the path that this sensor is sensing, or NULL if it is not attached to any path.-
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()
Unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph.
-
getAttachedPath
public SoPath getAttachedPath()
Returns the path that this sensor is sensing, or NULL if it is not attached to any path.
-
attach
public void attach(SoPath path)
Makes this sensor detect changes to the given path.
-
-