mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 08:56:36 +02:00
Untabbed.
This commit is contained in:
parent
52a3c70bf5
commit
6c58bec550
2 changed files with 20 additions and 20 deletions
|
@ -14,20 +14,20 @@
|
|||
#include "PrioVR.h"
|
||||
|
||||
const unsigned int SERIAL_LIST[] = { 0x00000001, 0x00000000, 0x00000008, 0x00000009, 0x0000000A, 0x0000000C, 0x0000000D,
|
||||
0x0000000E, 0x00000004, 0x00000005, 0x00000010, 0x00000011 };
|
||||
0x0000000E, 0x00000004, 0x00000005, 0x00000010, 0x00000011 };
|
||||
const unsigned char AXIS_LIST[] = { 9, 43, 37, 37, 37, 13, 13, 13, 52, 52, 28, 28 };
|
||||
const int LIST_LENGTH = sizeof(SERIAL_LIST) / sizeof(SERIAL_LIST[0]);
|
||||
|
||||
PrioVR::PrioVR() {
|
||||
#ifdef HAVE_PRIOVR
|
||||
_jointsDiscovered.resize(LIST_LENGTH);
|
||||
_jointsDiscovered.resize(LIST_LENGTH);
|
||||
_skeletalDevice = yei_setUpPrioVRSensors(0x00000000, const_cast<unsigned int*>(SERIAL_LIST),
|
||||
const_cast<unsigned char*>(AXIS_LIST), _jointsDiscovered.data(), LIST_LENGTH, YEI_TIMESTAMP_SYSTEM);
|
||||
if (!_skeletalDevice) {
|
||||
return;
|
||||
}
|
||||
_jointRotations.resize(LIST_LENGTH);
|
||||
yei_tareSensors(_skeletalDevice);
|
||||
const_cast<unsigned char*>(AXIS_LIST), _jointsDiscovered.data(), LIST_LENGTH, YEI_TIMESTAMP_SYSTEM);
|
||||
if (!_skeletalDevice) {
|
||||
return;
|
||||
}
|
||||
_jointRotations.resize(LIST_LENGTH);
|
||||
yei_tareSensors(_skeletalDevice);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -42,15 +42,15 @@ PrioVR::~PrioVR() {
|
|||
void PrioVR::update() {
|
||||
#ifdef HAVE_PRIOVR
|
||||
if (!_skeletalDevice) {
|
||||
return;
|
||||
}
|
||||
unsigned int timestamp;
|
||||
yei_getLastStreamDataAll(_skeletalDevice, (char*)_jointRotations.data(),
|
||||
_jointRotations.size() * sizeof(glm::quat), ×tamp);
|
||||
for (int i = 0; i < _jointsDiscovered.size(); i++) {
|
||||
if (_jointsDiscovered.at(i)) {
|
||||
qDebug() << i << _jointRotations.at(i).x << _jointRotations.at(i).y << _jointRotations.at(i).z << _jointRotations.at(i).w;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
unsigned int timestamp;
|
||||
yei_getLastStreamDataAll(_skeletalDevice, (char*)_jointRotations.data(),
|
||||
_jointRotations.size() * sizeof(glm::quat), ×tamp);
|
||||
for (int i = 0; i < _jointsDiscovered.size(); i++) {
|
||||
if (_jointsDiscovered.at(i)) {
|
||||
qDebug() << i << _jointRotations.at(i).x << _jointRotations.at(i).y << _jointRotations.at(i).z << _jointRotations.at(i).w;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -39,8 +39,8 @@ private:
|
|||
YEI_Device_Id _skeletalDevice;
|
||||
#endif
|
||||
|
||||
QVector<char> _jointsDiscovered;
|
||||
QVector<glm::quat> _jointRotations;
|
||||
QVector<char> _jointsDiscovered;
|
||||
QVector<glm::quat> _jointRotations;
|
||||
};
|
||||
|
||||
#endif // hifi_PrioVR_h
|
||||
|
|
Loading…
Reference in a new issue