mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 17:50:38 +02:00
PrioVR tweaks.
This commit is contained in:
parent
c99f3edbd8
commit
cf230d1cc3
4 changed files with 14 additions and 5 deletions
|
@ -239,7 +239,9 @@ void MyAvatar::updateFromTrackers(float deltaTime) {
|
||||||
|
|
||||||
if (Application::getInstance()->getPrioVR()->isActive()) {
|
if (Application::getInstance()->getPrioVR()->isActive()) {
|
||||||
estimatedRotation = glm::degrees(safeEulerAngles(Application::getInstance()->getPrioVR()->getHeadRotation()));
|
estimatedRotation = glm::degrees(safeEulerAngles(Application::getInstance()->getPrioVR()->getHeadRotation()));
|
||||||
|
estimatedRotation.x *= -1.0f;
|
||||||
|
estimatedRotation.z *= -1.0f;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
FaceTracker* tracker = Application::getInstance()->getActiveFaceTracker();
|
FaceTracker* tracker = Application::getInstance()->getActiveFaceTracker();
|
||||||
if (tracker) {
|
if (tracker) {
|
||||||
|
|
|
@ -200,7 +200,7 @@ void SkeletonModel::updateJointState(int index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkeletonModel::maybeUpdateLeanRotation(const JointState& parentState, const FBXJoint& joint, JointState& state) {
|
void SkeletonModel::maybeUpdateLeanRotation(const JointState& parentState, const FBXJoint& joint, JointState& state) {
|
||||||
if (!_owningAvatar->isMyAvatar()) {
|
if (!_owningAvatar->isMyAvatar() || Application::getInstance()->getPrioVR()->isActive()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// get the rotation axes in joint space and use them to adjust the rotation
|
// get the rotation axes in joint space and use them to adjust the rotation
|
||||||
|
|
|
@ -22,8 +22,8 @@ const unsigned int SERIAL_LIST[] = { 0x00000001, 0x00000000, 0x00000008, 0x00000
|
||||||
const unsigned char AXIS_LIST[] = { 9, 43, 37, 37, 37, 13, 13, 13, 52, 52, 28, 28 };
|
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]);
|
const int LIST_LENGTH = sizeof(SERIAL_LIST) / sizeof(SERIAL_LIST[0]);
|
||||||
|
|
||||||
const char* JOINT_NAMES[] = { "Head", "Spine", "LeftArm", "LeftForeArm", "LeftHand", "RightArm",
|
const char* JOINT_NAMES[] = { "Neck", "Spine", "LeftArm", "LeftForeArm", "LeftHand", "RightArm",
|
||||||
"RightForeArm", "RightHand", "LeftUpLeg", "LeftLeg", "RightUpLeft", "RightLeg" };
|
"RightForeArm", "RightHand", "LeftUpLeg", "LeftLeg", "RightUpLeg", "RightLeg" };
|
||||||
|
|
||||||
#ifdef HAVE_PRIOVR
|
#ifdef HAVE_PRIOVR
|
||||||
static int indexOfHumanIKJoint(const char* jointName) {
|
static int indexOfHumanIKJoint(const char* jointName) {
|
||||||
|
@ -80,6 +80,12 @@ void PrioVR::update() {
|
||||||
unsigned int timestamp;
|
unsigned int timestamp;
|
||||||
yei_getLastStreamDataAll(_skeletalDevice, (char*)_jointRotations.data(),
|
yei_getLastStreamDataAll(_skeletalDevice, (char*)_jointRotations.data(),
|
||||||
_jointRotations.size() * sizeof(glm::quat), ×tamp);
|
_jointRotations.size() * sizeof(glm::quat), ×tamp);
|
||||||
|
|
||||||
|
// convert to our expected coordinate system
|
||||||
|
for (int i = 0; i < _jointRotations.size(); i++) {
|
||||||
|
_jointRotations[i].y *= -1.0f;
|
||||||
|
_jointRotations[i].z *= -1.0f;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,8 @@ Visage::Visage() :
|
||||||
Visage::~Visage() {
|
Visage::~Visage() {
|
||||||
#ifdef HAVE_VISAGE
|
#ifdef HAVE_VISAGE
|
||||||
_tracker->stop();
|
_tracker->stop();
|
||||||
delete _tracker;
|
// deleting the tracker crashes windows; disable for now
|
||||||
|
//delete _tracker;
|
||||||
delete _data;
|
delete _data;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue