Click or drag to resize
SoOneShotSensor Class

Sensor for one-time only callbacks.

Inheritance Hierarchy

Namespace: OIV.Inventor.Sensors
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 10.3.0.0 (10.3.0.0)
Syntax
public class SoOneShotSensor : SoDelayQueueSensor

The SoOneShotSensor type exposes the following members.

Constructors
  NameDescription
Public methodSoOneShotSensor

Default constructor.

Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetPriority

Gets the priority of the sensor.

(Inherited from SoDelayQueueSensor.)
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 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.)
Top
Remarks

A one-shot sensor is triggered once after it is scheduled, when the delay queue is processed. Like all delay queue sensors, one-shot sensors with a non-zero priority are just added to the delay queue when scheduled; if they are scheduled again before the delay queue is processed nothing happens, and they are guaranteed to be called only once when the delay queue is processed. For example, a one-shot sensor whose delegateredraws the scene might be scheduled whenever the scene graph changes and whenever a window-system event reporting that the window changed size occurs. By using a one-shot, the scene will only be redrawn once even if a window-changed-size event occurs just after the scene graph is modified (or if several window-changed-size events occur in a row).

Calling () in the delegateis a useful way of getting something to happen repeatedly as often as possible, while still handling events and timeouts.

A priority 0 one-shot sensor isn't very useful, since scheduling it is exactly the same as directly calling its delegate.

See Also