Chapter Objectives. After reading this chapter, you'll be able to do the following:
- Describe the different types of sensors that can be used in a scene graph and give possible uses for each type
- Understand how sensors are scheduled in the delay queue and the timer queue and when they are processed
- Write callback functions for use by data and timer sensors
- Set the priority of a delay-queue sensor This chapter describes how to add sensors to the scene graph. A sensor is an Inventor object that watches for various types of events and invokes a user-supplied callback function when these events occur. Sensors fall into two general categories: data sensors, which respond to changes in the data contained in a node's fields, in a node's children, or in a path; and timer sensors, which respond to certain scheduling conditions.