source: flair-src/branches/sanscv/lib/FlairSensorActuator/src/VrpnObject.cpp@ 469

Last change on this file since 469 was 324, checked in by Sanahuja Guillaume, 5 years ago

removing opencv dependency

File size: 2.1 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5// created: 2013/04/03
6// filename: VrpnObject.cpp
7//
8// author: César Richard, Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: Class for VRPN object
14//
15//
16/*********************************************************************/
17
18#include "VrpnObject.h"
19#include "VrpnObject_impl.h"
20#include <string.h>
21#include <Matrix.h>
22
23using std::string;
24using namespace flair::core;
25using namespace flair::gui;
26
27namespace flair {
28namespace sensor {
29
30VrpnObject::VrpnObject(string name,
31 const TabWidget *tab,VrpnClient *client)
32 : IODevice(client, name) {
33 pimpl_ = new VrpnObject_impl(this, name, -1, tab,client);
34 AddDataToLog(pimpl_->output);
35
36 SetIsReady(true);
37}
38
39VrpnObject::VrpnObject(string name, uint8_t id,
40 const TabWidget *tab,VrpnClient *client)
41 : IODevice(client, name) {
42 Warn("Creation of object %s with id %i\n", name.c_str(), id);
43 pimpl_ = new VrpnObject_impl(this, name, id, tab,client);
44 AddDataToLog(pimpl_->output);
45
46 SetIsReady(true);
47}
48
49VrpnObject::~VrpnObject(void) {
50 delete pimpl_;
51}
52
53Matrix *VrpnObject::Output(void) const { return pimpl_->output; }
54
55Matrix *VrpnObject::State(void) const { return pimpl_->state; }
56
57Tab *VrpnObject::GetPlotTab(void) const { return pimpl_->plot_tab; }
58
59DataPlot1D *VrpnObject::xPlot(void) const { return pimpl_->x_plot; }
60
61DataPlot1D *VrpnObject::yPlot(void) const { return pimpl_->y_plot; }
62
63DataPlot1D *VrpnObject::zPlot(void) const { return pimpl_->z_plot; }
64
65Time VrpnObject::GetLastPacketTime(void) const {
66 return pimpl_->output->DataTime();
67}
68
69bool VrpnObject::IsTracked(unsigned int timeout_ms) const {
70 return pimpl_->IsTracked(timeout_ms);
71}
72
73void VrpnObject::GetQuaternion(Quaternion &quaternion) const {
74 pimpl_->GetQuaternion(quaternion);
75}
76
77void VrpnObject::GetPosition(Vector3Df &point) const {
78 pimpl_->GetPosition(point);
79}
80
81} // end namespace sensor
82} // end namespace flair
Note: See TracBrowser for help on using the repository browser.