Updates the entire graph (if pSubGraph is NULL), or just the sub graph starting from the pSubGraph node
| 2404 | |
| 2405 | // Updates the entire graph (if pSubGraph is NULL), or just the sub graph starting from the pSubGraph node |
| 2406 | static XnStatus xnUpdateGraph(XnContext* pContext, const XnNodeInfo* pSubGraph) |
| 2407 | { |
| 2408 | XnStatus nRetVal = XN_STATUS_OK; |
| 2409 | |
| 2410 | // mark all current nodes' data as "old" |
| 2411 | xnResetNewDataFlag(pContext); |
| 2412 | |
| 2413 | // mark all nodes as not-visited |
| 2414 | xnResetVisitState(pContext); |
| 2415 | |
| 2416 | // now start the update (each updated node will be marked as visited) |
| 2417 | if (pSubGraph != NULL) |
| 2418 | { |
| 2419 | nRetVal = xnUpdateTreeImpl(pSubGraph); |
| 2420 | XN_IS_STATUS_OK(nRetVal); |
| 2421 | } |
| 2422 | else |
| 2423 | { |
| 2424 | for (XnNodesMap::Iterator it = pContext->nodesMap.Begin(); it != pContext->nodesMap.End(); ++it) |
| 2425 | { |
| 2426 | XnNodeInfo* pNodeInfo = it->Value()->pNodeInfo; |
| 2427 | nRetVal = xnUpdateTreeImpl(pNodeInfo); |
| 2428 | XN_IS_STATUS_OK(nRetVal); |
| 2429 | } |
| 2430 | } |
| 2431 | |
| 2432 | return (XN_STATUS_OK); |
| 2433 | } |
| 2434 | |
| 2435 | XnBool xnDidNodeAdvanced(XnNodeHandle hNode) |
| 2436 | { |
no test coverage detected