Click or drag to resize
SoNodeSensor Class

Sensor class that can be attached to Open Inventor nodes.

Inheritance Hierarchy

Namespace: OIV.Inventor.Sensors
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.1.1.0 (2024.1.1)
Syntax
public class SoNodeSensor : SoDataSensor

The SoNodeSensor type exposes the following members.

Constructors
  NameDescription
Public methodSoNodeSensor

Default constructor.

Top
Methods
  NameDescription
Public methodAttach

Makes this sensor detect changes to the given node.

Public methodDetach

Unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetAttachedNode

Returns the node that this sensor is sensing, or NULL if it is not attached to any node.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetPriority

Gets the priority of the sensor.

(Inherited from SoDelayQueueSensor.)
Public methodGetTriggerChild

If this is a priority 0 data sensor, and a change to a group node's children caused this sensor to be triggered (getTriggerType returns GROUP_ADD_CHILD, GROUP_INSERT_CHILD, or GROUP_REPLACE_CHILD), returns the node that was added to the group, and NULL in all other cases.

(Inherited from SoDataSensor.)
Public methodGetTriggerChildIndex

If this is a priority 0 data sensor, and a change to a group node's children caused this sensor to be triggered (getTriggerType returns GROUP_ADD_CHILD, GROUP_INSERT_CHILD, or GROUP_REPLACE_CHILD), returns the index of the node that was added or removed, and -1 in all other cases.

(Inherited from SoDataSensor.)
Public methodGetTriggerFastEditInfo

Returns true if the triggered changes come from a field or node that was below a Separator with a fastEditPolicy field with a value different than OFF.

(Inherited from SoDataSensor.)
Public methodGetTriggerFastEditInfoFlag

Queries the flag that indicates whether the trigger path fastEdit info (see OIV.Inventor.Sensors.SoDataSensor.GetTriggerFastEditInfo()) is available to delegates.

(Inherited from SoDataSensor.)
Public methodGetTriggerField

If this is a priority 0 data sensor, returns the field that was modified that caused this sensor to trigger.

(Inherited from SoDataSensor.)
Public methodGetTriggerMFieldNumValues

If this is a priority 0 data sensor, and a change in the data values of a multiple field (e.g., OIV.Inventor.Fields.SoMFVec3f) caused this sensor to be triggered, returns the size of the range of the potentially changed values.

(Inherited from SoDataSensor.)
Public methodGetTriggerMFieldStartIndex

If this is a priority 0 data sensor, and a change in the data values of a multiple field (e.g., OIV.Inventor.Fields.SoMFVec3f) caused this sensor to be triggered, returns the first index of the range of the potentially changed values.

(Inherited from SoDataSensor.)
Public methodGetTriggerNode

If this is a priority 0 data sensor, returns the node that was modified that caused this sensor to trigger.

(Inherited from SoDataSensor.)
Public methodGetTriggerPath

If this is a priority 0 data sensor, returns a path to the node that caused this sensor to trigger.

(Inherited from SoDataSensor.)
Public methodGetTriggerPathFlag

Queries the flag that indicates whether the trigger path (see OIV.Inventor.Sensors.SoDataSensor.GetTriggerPath()) is available to delegates.

(Inherited from SoDataSensor.)
Public methodGetTriggerType

If this is a priority 0 data sensor, returns the type of change that occurred.

(Inherited from SoDataSensor.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsIdleOnly
(Inherited from SoDelayQueueSensor.)
Public methodIsScheduled

Returns true if this sensor has been scheduled and is waiting in a sensor queue to be triggered.

(Inherited from SoSensor.)
Public methodSchedule
(Inherited from SoSensor.)
Public methodSetPriority

Sets the priority of the sensor.

(Inherited from SoDelayQueueSensor.)
Public methodSetTriggerFastEditInfoFlag

Sets the flag that indicates whether the trigger path fastEdit info (see OIV.Inventor.Sensors.SoDataSensor.GetTriggerFastEditInfo()) is available to delegatemethods.

(Inherited from SoDataSensor.)
Public methodSetTriggerPathFlag

Sets the flag that indicates whether the trigger path (see OIV.Inventor.Sensors.SoDataSensor.GetTriggerPath()) is available to delegatemethods.

(Inherited from SoDataSensor.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnschedule
(Inherited from SoSensor.)
Top
Properties
  NameDescription
Public propertyAction

(Inherited from SoSensor.)
Public propertyDeleteCallback

Sets a callback that will be called when the object the sensor is sensing is deleted.

(Inherited from SoDataSensor.)
Top
Remarks

Node sensors detect changes to nodes, calling a delegatewhenever any field of the node or, if the node is a group node, any children of the node change. The Open Inventor viewer classes, for example, attach a node sensor to the root of the application's scene graph in order to know when any part of the scene graph has been modified and a redraw is needed.

Node sensors provide methods that can be called in the delegateto determine exactly which node or field caused the sensor to be triggered. However these methods only return valid information if the sensor priority was explicitly set to zero (default is 100). Depending on the type of attached node, there are multiple possible triggers and only some of the get trigger info methods will return useful information.

Priority zero sensors are triggered immediately after the change. Normal priority sensors are not triggered until the next time the "delay queue" is processed. Normally this happens when the viewer / renderArea is not rendering and there are no input events to be processed.

The node sensor will be triggered if its Schedule()method is called. But the trigger node, trigger field, etc. queries will return null. Generally this method is only useful for "at some future time" sensors like OIV.Inventor.Sensors.SoIdleSensor or OIV.Inventor.Sensors.SoAlarmSensor.

Node sensors provide a delete delegatethat is called just before the object the data sensor is attached to is deleted. The delegateshould not attempt to modify the object in any way.

See OIV.Inventor.Sensors.SoDataSensor for general information and code example.

See Also