View on GitHub

PyInventor

3D Graphics in Python with Open Inventor

inventor.Sensor

class Sensor(object)

Represents node, field, timer and alarm sensors.

Sensors can be used to observe changes in scene graphs or to trigger actions at given times.

Methods defined here:

attach(...)

Attaches sensor/callback to node or field. The callback is triggered when the attached node or field changes. If only a Node instance is given then the sensor triggers on any change of that node or children. If both a scene object instance and a field or callback name are passed, the sensor triggers on field changes only. For Selection nodes the names 'selection', 'deselection', 'start' 'finish' are also accepted to register the corresponding callbacks.

Args:

detach(...)

Deactivates a sensor.

is_scheduled(...)

Returns scheduled state of the sensor.

Returns:

schedule(...)

Schedules a timer sensor.

set_interval(...)

Sets up a timer sensor with a regular interval.

Args:

set_time(...)

Sets up an alarm sensor that is trigegred at a given time from now.

Args:

unschedule(...)

Unschedules a timer sensor.


Data descriptors defined here:

callback

Sensor callback function.

An object can be assigned to that property which is called when a sensor is triggered.