|
Last change
on this file since 10031 was
9780,
checked in by georgr, 12 years ago
|
|
WiiCpp library successfully added - won't work without libbluetooth-dev
|
|
File size:
461 bytes
|
| Line | |
|---|
| 1 | #include "accsample.h" |
|---|
| 2 | |
|---|
| 3 | using namespace std; |
|---|
| 4 | |
|---|
| 5 | AccSample::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 | |
|---|
| 14 | AccSample::AccSample(const string& line) |
|---|
| 15 | : Sample() |
|---|
| 16 | { |
|---|
| 17 | istringstream inLine(line); |
|---|
| 18 | inLine >> relTimestamp >> ax >> ay >> az; |
|---|
| 19 | logType = WIIC_LOG_ACC; |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | void AccSample::save(ofstream& out) |
|---|
| 23 | { |
|---|
| 24 | out << "ACC " << getTimestampFromGestureStart() << " " << ax << " " << ay << " " << az << endl; |
|---|
| 25 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.