From 9edc4683ecd75d4705aca13217779e3c1a721913 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 27 Jun 2013 16:06:34 +0200 Subject: Rename R[XYZ] to Yaw, Pitch, Roll to avoid confusion Requested-by: mm0zct --- facetracknoir/facetracknoir.cpp | 18 +++++++++--------- facetracknoir/facetracknoir.h | 6 +++--- facetracknoir/tracker.h | 6 +++--- facetracknoir/tracker_types.cpp | 24 ++++++++++++------------ 4 files changed, 27 insertions(+), 27 deletions(-) (limited to 'facetracknoir') diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index 94a5257d..fafef908 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -681,9 +681,9 @@ void FaceTrackNoIR::startTracker( ) { // Setup the Tracker and send the settings. // This is necessary, because the events are only triggered 'on change' // - tracker->setInvertAxis(RX, ui.chkInvertYaw->isChecked() ); + tracker->setInvertAxis(Yaw, ui.chkInvertYaw->isChecked() ); tracker->setInvertAxis(TY, ui.chkInvertPitch->isChecked() ); - tracker->setInvertAxis(RZ, ui.chkInvertRoll->isChecked() ); + tracker->setInvertAxis(Roll, ui.chkInvertRoll->isChecked() ); tracker->setInvertAxis(TX, ui.chkInvertX->isChecked() ); tracker->setInvertAxis(TY, ui.chkInvertY->isChecked() ); tracker->setInvertAxis(TZ, ui.chkInvertZ->isChecked() ); @@ -849,9 +849,9 @@ void FaceTrackNoIR::showHeadPose() { ui.lcdNumY->display(QString("%1").arg(newdata[TY], 0, 'f', 1)); ui.lcdNumZ->display(QString("%1").arg(newdata[TZ], 0, 'f', 1)); - ui.lcdNumRotX->display(QString("%1").arg(newdata[RX], 0, 'f', 1)); - ui.lcdNumRotY->display(QString("%1").arg(newdata[RY], 0, 'f', 1)); - ui.lcdNumRotZ->display(QString("%1").arg(newdata[RZ], 0, 'f', 1)); + ui.lcdNumRotX->display(QString("%1").arg(newdata[Yaw], 0, 'f', 1)); + ui.lcdNumRotY->display(QString("%1").arg(newdata[Pitch], 0, 'f', 1)); + ui.lcdNumRotZ->display(QString("%1").arg(newdata[Roll], 0, 'f', 1)); ui.txtTracking->setVisible(tracker->getTrackingActive()); @@ -859,15 +859,15 @@ void FaceTrackNoIR::showHeadPose() { // Get the output-pose and also display it. // tracker->getOutputHeadPose(newdata); - ui.pose_display->rotateBy(newdata[RX], newdata[RZ], newdata[RY]); + ui.pose_display->rotateBy(newdata[Yaw], newdata[Roll], newdata[Pitch]); ui.lcdNumOutputPosX->display(QString("%1").arg(newdata[TX], 0, 'f', 1)); ui.lcdNumOutputPosY->display(QString("%1").arg(newdata[TY], 0, 'f', 1)); ui.lcdNumOutputPosZ->display(QString("%1").arg(newdata[TZ], 0, 'f', 1)); - ui.lcdNumOutputRotX->display(QString("%1").arg(newdata[RX], 0, 'f', 1)); - ui.lcdNumOutputRotY->display(QString("%1").arg(newdata[RY], 0, 'f', 1)); - ui.lcdNumOutputRotZ->display(QString("%1").arg(newdata[RZ], 0, 'f', 1)); + ui.lcdNumOutputRotX->display(QString("%1").arg(newdata[Yaw], 0, 'f', 1)); + ui.lcdNumOutputRotY->display(QString("%1").arg(newdata[Pitch], 0, 'f', 1)); + ui.lcdNumOutputRotZ->display(QString("%1").arg(newdata[Roll], 0, 'f', 1)); // // Update the curves in the curve-configurator. This shows the ball with the red lines. diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h index ece1d9b9..fd9c06a7 100644 --- a/facetracknoir/facetracknoir.h +++ b/facetracknoir/facetracknoir.h @@ -186,13 +186,13 @@ private: void setInvertAxis( Axis axis, int invert ); void setInvertYaw(int invert) { - setInvertAxis(RX, invert); + setInvertAxis(Yaw, invert); } void setInvertPitch(int invert) { - setInvertAxis(RY, invert); + setInvertAxis(Pitch, invert); } void setInvertRoll(int invert) { - setInvertAxis(RZ, invert); + setInvertAxis(Roll, invert); } void setInvertX(int invert) { setInvertAxis(TX, invert); diff --git a/facetracknoir/tracker.h b/facetracknoir/tracker.h index 89fb2650..5500993c 100644 --- a/facetracknoir/tracker.h +++ b/facetracknoir/tracker.h @@ -142,9 +142,9 @@ public: axes[TX] = new THeadPoseDOF("tx","tx_alt", 100, 100, 100, 100); axes[TY] = new THeadPoseDOF("ty","ty_alt", 100, 100, 100, 100); axes[TZ] = new THeadPoseDOF("tz","tz_alt", 100, 100, 100, 100); - axes[RX] = new THeadPoseDOF("rx", "rx_alt", 180, 180, 180, 180); - axes[RY] = new THeadPoseDOF("ry", "ry_alt", 90, 90, 90, 90); - axes[RZ] = new THeadPoseDOF("rz", "rz_alt", 180, 180, 180, 180); + axes[Yaw] = new THeadPoseDOF("rx", "rx_alt", 180, 180, 180, 180); + axes[Pitch] = new THeadPoseDOF("ry", "ry_alt", 90, 90, 90, 90); + axes[Roll] = new THeadPoseDOF("rz", "rz_alt", 180, 180, 180, 180); } }; diff --git a/facetracknoir/tracker_types.cpp b/facetracknoir/tracker_types.cpp index eedd94f9..11adc985 100644 --- a/facetracknoir/tracker_types.cpp +++ b/facetracknoir/tracker_types.cpp @@ -7,15 +7,15 @@ T6DOF operator-(const T6DOF& A, const T6DOF& B) { - Rotation R_A(A.axes[RX]*D2R, A.axes[RY]*D2R, A.axes[RZ]*D2R); - Rotation R_B(B.axes[RX]*D2R, B.axes[RY]*D2R, B.axes[RZ]*D2R); + Rotation R_A(A.axes[Yaw]*D2R, A.axes[Pitch]*D2R, A.axes[Roll]*D2R); + Rotation R_B(B.axes[Yaw]*D2R, B.axes[Pitch]*D2R, B.axes[Roll]*D2R); Rotation R_C = R_A * R_B.inv(); T6DOF C; - R_C.toEuler(C.axes[RX], C.axes[RY], C.axes[RZ]); - C.axes[RX] *= R2D; - C.axes[RY] *= R2D; - C.axes[RZ] *= R2D; + R_C.toEuler(C.axes[Yaw], C.axes[Pitch], C.axes[Roll]); + C.axes[Yaw] *= R2D; + C.axes[Pitch] *= R2D; + C.axes[Roll] *= R2D; C.axes[TX] = A.axes[TX] - B.axes[TX]; C.axes[TY] = A.axes[TY] - B.axes[TY]; @@ -26,15 +26,15 @@ T6DOF operator-(const T6DOF& A, const T6DOF& B) T6DOF operator+(const T6DOF& A, const T6DOF& B) { - Rotation R_A(A.axes[RX]*D2R, A.axes[RY]*D2R, A.axes[RZ]*D2R); - Rotation R_B(B.axes[RX]*D2R, B.axes[RY]*D2R, B.axes[RZ]*D2R); + Rotation R_A(A.axes[Yaw]*D2R, A.axes[Pitch]*D2R, A.axes[Roll]*D2R); + Rotation R_B(B.axes[Yaw]*D2R, B.axes[Pitch]*D2R, B.axes[Roll]*D2R); Rotation R_C = R_A * R_B; T6DOF C; - R_C.toEuler(C.axes[RX], C.axes[RY], C.axes[RZ]); - C.axes[RX] *= R2D; - C.axes[RY] *= R2D; - C.axes[RZ] *= R2D; + R_C.toEuler(C.axes[Yaw], C.axes[Pitch], C.axes[Roll]); + C.axes[Yaw] *= R2D; + C.axes[Pitch] *= R2D; + C.axes[Roll] *= R2D; C.axes[TX] = A.axes[TX] + B.axes[TX]; C.axes[TY] = A.axes[TY] + B.axes[TY]; -- cgit v1.2.3