Fawkes API
Fawkes Development Version
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
26
#include <XnCppWrapper.h>
27
28
namespace
fawkes
{
29
30
/** @class OpenNiAspect <plugins/openni/aspect/openni.h>
31
* Thread aspect to get access to the OpenNI context.
32
* Give this aspect to your thread to interact with the central OpenNI
33
* context. Use this as a last resort, first check if the desired information
34
* is available via the blackboard (e.g. user skeleton data) or via
35
* FireVision (camera images).
36
*
37
* @ingroup Aspects
38
* @author Tim Niemueller
39
*/
40
41
/** @var fawkes:LockPtr<xn::Context> OpenNiAspect::openni
42
* Central OpenNI context. Make sure you use proper locking in your application
43
* when using the class, or chaos and havoc will come upon you.
44
*/
45
46
/** Constructor. */
47
OpenNiAspect::OpenNiAspect
()
48
{
49
add_aspect
(
"OpenNiAspect"
);
50
}
51
52
/** Virtual empty destructor. */
53
OpenNiAspect::~OpenNiAspect
()
54
{
55
}
56
57
/** Init OpenNI aspect.
58
* This set the OpenNI context.
59
* It is guaranteed that this is called for an OpenNI Thread before start
60
* is called (when running regularly inside Fawkes).
61
* @param openni_context OpenNI context to use
62
*/
63
void
64
OpenNiAspect::init_OpenNiAspect(
LockPtr<xn::Context>
openni_context)
65
{
66
this->
openni
= openni_context;
67
}
68
69
}
// end namespace fawkes
fawkes::Aspect::add_aspect
void add_aspect(const char *name)
Add an aspect to a thread.
Definition:
aspect.cpp:55
fawkes::OpenNiAspect::~OpenNiAspect
virtual ~OpenNiAspect()
Virtual empty destructor.
Definition:
openni.cpp:59
fawkes::LockPtr< xn::Context >
fawkes
fawkes::OpenNiAspect::OpenNiAspect
OpenNiAspect()
Constructor.
Definition:
openni.cpp:53
fawkes::OpenNiAspect::openni
LockPtr< xn::Context > openni
Definition:
openni.h:47
src
plugins
openni
aspect
openni.cpp
Generated by
1.8.17