![]() |
Agile ALM Free SaaS for open source projects on Amazon EC2 cloud This server hosts 24000 users ! |
|
|
生成和读取数据读取数据原文:Data Generators constantly receive new data. However, the application may still be using older data (for example, the previous frame of the depth map). As a result of this, any generator should internally store new data, until explicitly requested to update to the newest available data. This means that Data Generators "hide" new data internally, until explicitly requested to expose the most updated data to the application, using the UpdateData request function. OpenNI enables the application to wait for new data to be available, and then update it using the xn::Generator::WaitAndUpdateData() function. In certain cases, the application holds more than one node, and wants all the nodes to be updated. OpenNI provides several functions to do this, according to the specifications of what should occur before the UpdateData occurs:
The above four functions exit after a timeout of two seconds. It is strongly advised that you use one of the xn::Context::Wait*…+UpdateAll() functions, unless you only need to update a specific node. In addition to updating all the nodes, these functions have the following additional benefits:
译文: |