MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / IsNewDataAvailable

Method IsNewDataAvailable

Source/Modules/nimMockNodes/MockGenerator.cpp:222–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222XnBool MockGenerator::IsNewDataAvailable(XnUInt64& nTimestamp)
223{
224 if (m_bNewDataAvailable)
225 {
226 // the timestamp is used for frame sync algorithm. If frameID is zero, this means
227 // there is no actual frame, so we don't want the timestamp to be checked for sync.
228 // instead, return an "invalid" timestamp. This is allowed, as FrameID 0 is a non-valid
229 // frame.
230 if (m_data[m_nNextDataIdx].nFrameID == 0)
231 {
232 nTimestamp = XN_MAX_UINT64;
233 }
234 else
235 {
236 nTimestamp = m_data[m_nNextDataIdx].nTimeStamp;
237 }
238 }
239
240 return m_bNewDataAvailable;
241}
242
243XnStatus MockGenerator::UpdateData()
244{

Callers 1

xnIsNewDataAvailableImplFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected