Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
openni.cpp
1
2
/***************************************************************************
3
* openni.cpp - OpenNI aspect for Fawkes
4
*
5
* Created: Sat Feb 26 15:36:58 2011
6
* Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#include <plugins/openni/aspect/openni.h>
25
#include <XnCppWrapper.h>
26
27
namespace
fawkes {
28
#if 0
/* just to make Emacs auto-indent happy */
29
}
30
#endif
31
32
/** @class OpenNiAspect <plugins/openni/aspect/openni.h>
33
* Thread aspect to get access to the OpenNI context.
34
* Give this aspect to your thread to interact with the central OpenNI
35
* context. Use this as a last resort, first check if the desired information
36
* is available via the blackboard (e.g. user skeleton data) or via
37
* FireVision (camera images).
38
*
39
* @ingroup Aspects
40
* @author Tim Niemueller
41
*/
42
43
/** @var fawkes:LockPtr<xn::Context> OpenNiAspect::openni
44
* Central OpenNI context. Make sure you use proper locking in your application
45
* when using the class, or chaos and havoc will come upon you.
46
*/
47
48
/** Constructor. */
49
OpenNiAspect::OpenNiAspect()
50
{
51
add_aspect(
"OpenNiAspect"
);
52
}
53
54
55
/** Virtual empty destructor. */
56
OpenNiAspect::~OpenNiAspect()
57
{
58
}
59
60
61
/** Init OpenNI aspect.
62
* This set the OpenNI context.
63
* It is guaranteed that this is called for an OpenNI Thread before start
64
* is called (when running regularly inside Fawkes).
65
* @param openni_context OpenNI context to use
66
*/
67
void
68
OpenNiAspect::init_OpenNiAspect(
LockPtr<xn::Context>
openni_context)
69
{
70
this->openni = openni_context;
71
}
72
73
}
// end namespace fawkes
src
plugins
openni
aspect
openni.cpp
Generated by
1.8.1.1