OpenNI 1.3.2

Reading Data

Generators usually constantly receive new data. However, the application might still use the old (previous) data. For this reason, any generator should keep the new data internally until explicitly asked to update its data to the new one. This request is called Update Data. OpenNI gives the application the option to wait for new data to be available, and then update it using xnWaitAndUpdateData() (xn::Generator::WaitAndUpdateData()).

In some cases, the application holds more than one node, and it usually wants all the nodes to be updated. OpenNI supplies several functions to do so, depending on what the application wants to wait for before updating takes place:

Unless needing to update only a specific node, it is highly advised to use one of the UpdateAll functions. In addition for updating all the nodes they have some more benefits:

  • If nodes are dependend in one another, it promises the needed node will be updated before the needing node.
  • If playing a recording, it reads data from the recording until the condition is met.
  • If a recorder exists, it records the data from all nodes added to it (without the need to call xnRecord()).