Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/wiimote/src/external/wiicpp/log/gyrosample.cpp @ 9780

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

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

File size: 498 bytes
Line 
1#include "gyrosample.h"
2
3using namespace std;
4
5GyroSample::GyroSample(float r, float p, float y) 
6        : Sample()
7{ 
8        roll_ = r; 
9        pitch_ = p; 
10        yaw_ = y;
11        logType = WIIC_LOG_GYRO; 
12}
13
14GyroSample::GyroSample(const string& line)
15        : Sample()
16{
17        istringstream inLine(line);
18        inLine >> relTimestamp >> roll_ >> pitch_ >> yaw_; 
19        logType = WIIC_LOG_GYRO; 
20}
21
22void GyroSample::save(ofstream& out)
23{
24        out << "GYRO " << getTimestampFromGestureStart() << " " << roll_ << " " << pitch_ << " " << yaw_ << endl;
25}
Note: See TracBrowser for help on using the repository browser.