summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
Diffstat (limited to 'logic')
-rw-r--r--logic/main-settings.cpp1
-rw-r--r--logic/main-settings.hpp1
-rw-r--r--logic/tracker.cpp10
-rw-r--r--logic/tracker.h4
4 files changed, 7 insertions, 9 deletions
diff --git a/logic/main-settings.cpp b/logic/main-settings.cpp
index 987dd250..64bd0010 100644
--- a/logic/main-settings.cpp
+++ b/logic/main-settings.cpp
@@ -21,7 +21,6 @@ main_settings::main_settings() :
camera_yaw(b, "camera-yaw", 0),
camera_pitch(b, "camera-pitch", 0),
camera_roll(b, "camera-roll", 0),
- use_camera_offset_from_centering(b, "use-camera-offset-from-centering", false),
center_at_startup(b, "center-at-startup", true),
center_method(b, "centering-method", 1),
neck_y(b, "neck-height", 0),
diff --git a/logic/main-settings.hpp b/logic/main-settings.hpp
index 51b729e3..6e6f698f 100644
--- a/logic/main-settings.hpp
+++ b/logic/main-settings.hpp
@@ -77,7 +77,6 @@ struct OTR_LOGIC_EXPORT main_settings final
value<bool> tcomp_disable_src_yaw, tcomp_disable_src_pitch, tcomp_disable_src_roll;
value<bool> tray_enabled, tray_start;
value<int> camera_yaw, camera_pitch, camera_roll;
- value<bool> use_camera_offset_from_centering;
value<bool> center_at_startup;
value<int> center_method;
value<int> neck_y, neck_z;
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 2f07304e..3ba81af7 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -42,7 +42,7 @@ Tracker::~Tracker()
wait();
}
-Tracker::rmat Tracker::get_camera_offset_matrix(double c)
+Tracker::rmat Tracker::camera_offset(double c)
{
const double off[] =
{
@@ -174,8 +174,8 @@ void Tracker::logic()
real_rotation.rotation = euler_to_rmat(tmp);
}
- scaled_rotation.camera = get_camera_offset_matrix(c_div);
- real_rotation.camera = get_camera_offset_matrix(1);
+ scaled_rotation.camera = camera_offset(c_div);
+ real_rotation.camera = camera_offset(1);
nanp |= is_nan(value) || is_nan(scaled_rotation.rotation) || is_nan(real_rotation.rotation);
@@ -226,11 +226,11 @@ void Tracker::logic()
{
// inertial
case 0:
- default:
//scaled_rotation.rotation = scaled_rotation
rotation = scaled_rotation.rot_center * scaled_rotation.rotation;
break;
// camera
+ default:
case 1:
rotation = scaled_rotation.rotation * scaled_rotation.rot_center;
break;
@@ -430,7 +430,7 @@ void Tracker::run()
}
}
-void Tracker::get_raw_and_mapped_poses(double* mapped, double* raw) const
+void Tracker::raw_and_mapped_pose(double* mapped, double* raw) const
{
QMutexLocker foo(&const_cast<Tracker&>(*this).mtx);
diff --git a/logic/tracker.h b/logic/tracker.h
index 754a836c..85bd1ed8 100644
--- a/logic/tracker.h
+++ b/logic/tracker.h
@@ -94,6 +94,7 @@ private:
void t_compensate(const rmat& rmat, const euler_t& ypr, euler_t& output,
bool disable_tx, bool disable_ty, bool disable_tz);
void run() override;
+ rmat camera_offset(double c);
static constexpr double r2d = 180. / M_PI;
static constexpr double d2r = M_PI / 180.;
@@ -105,8 +106,7 @@ public:
Tracker(Mappings& m, SelectedLibraries& libs, TrackLogger& logger);
~Tracker();
- rmat get_camera_offset_matrix(double c);
- void get_raw_and_mapped_poses(double* mapped, double* raw) const;
+ void raw_and_mapped_pose(double* mapped, double* raw) const;
void start() { QThread::start(); }
void center() { set(f_center, true); }