File: Tutorial.XML.txt

package info (click to toggle)
openni 1.5.4.0%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 45,580 kB
  • sloc: cpp: 116,706; ansic: 58,807; sh: 10,287; cs: 7,698; java: 7,402; python: 1,547; makefile: 492; xml: 167
file content (22 lines) | stat: -rw-r--r-- 602 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
@page tut_xml Configuring OpenNI using an XML file

The following code configures OpenNI using an XML file, and then makes sure the nodes it needs exist:
@code
// Initialize OpenNI context using an XML file
xn::Context context;
nRetVal = context.InitFromXmlFile(".\\Config.xml", NULL);
// TODO: check error code

// Look for the depth node
xn::DepthGenerator depth;
nRetVal = context.FindExistingNode(XN_NODE_TYPE_DEPTH, depth);
if (nRetVal != XN_STATUS_OK)
{
	printf("Can't run - no depth generator is present!\n");
	exit(-1);
}

// TODO: mainloop - process data
@endcode
*/