Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/wiimote/src/external/wiicpp/log/accsample.cpp @ 10255

Last change on this file since 10255 was 9780, checked in by georgr, 11 years ago

WiiCpp library successfully (?) added - won't work without libbluetooth-dev

File size: 461 bytes
RevLine 
[9780]1#include "accsample.h"
2
3using namespace std;
4
5AccSample::AccSample(float x, float y, float z)
6        : Sample() 
7{ 
8        ax = x; 
9        ay = y; 
10        az = z; 
11        logType = WIIC_LOG_ACC;
12}
13
14AccSample::AccSample(const string& line)
15        : Sample()
16{
17        istringstream inLine(line);
18        inLine >> relTimestamp >> ax >> ay >> az; 
19        logType = WIIC_LOG_ACC;
20}
21
22void AccSample::save(ofstream& out)
23{
24        out << "ACC " << getTimestampFromGestureStart() << " " << ax << " " << ay << " " << az << endl;
25}
Note: See TracBrowser for help on using the repository browser.