From c1abeac4ceb4626afa91348b99c79d4b4cc024fb Mon Sep 17 00:00:00 2001 From: Christian Mattes <christian.mattes@rwth-aachen.de> Date: Fri, 25 Jan 2019 17:05:29 +0100 Subject: [PATCH] Renamed FootElevation to FeetElevation to be more consistent with FeetPlacer --- src/lava-vr/{FootElevation.cc => FeetElevation.cc} | 12 ++++++------ src/lava-vr/{FootElevation.hh => FeetElevation.hh} | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) rename src/lava-vr/{FootElevation.cc => FeetElevation.cc} (91%) rename src/lava-vr/{FootElevation.hh => FeetElevation.hh} (96%) diff --git a/src/lava-vr/FootElevation.cc b/src/lava-vr/FeetElevation.cc similarity index 91% rename from src/lava-vr/FootElevation.cc rename to src/lava-vr/FeetElevation.cc index 2172a64..9ce9739 100644 --- a/src/lava-vr/FootElevation.cc +++ b/src/lava-vr/FeetElevation.cc @@ -1,4 +1,4 @@ -#include "FootElevation.hh" +#include "FeetElevation.hh" #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> #include <lava/common/log.hh> @@ -7,22 +7,22 @@ namespace lava { namespace vr { -FootElevation::Tri::Tri(glm::vec3 _a, glm::vec3 _b, glm::vec3 _c) +FeetElevation::Tri::Tri(glm::vec3 _a, glm::vec3 _b, glm::vec3 _c) : a(_a), b(_b), c(_c) { // bbmin = glm::min(a, glm::min(b, c)); // bbmax = glm::max(a, glm::min(b, c)); } -FootElevation::Tri transform(FootElevation::Tri const &orig, +FeetElevation::Tri transform(FeetElevation::Tri const &orig, glm::mat4 const &xf) { const auto nt = glm::mat3x4(xf); const auto t = xf[3]; - return FootElevation::Tri(nt * orig.a + t, // + return FeetElevation::Tri(nt * orig.a + t, // nt * orig.b + t, // nt * orig.c + t); } -FootElevation::FootElevation( +FeetElevation::FeetElevation( const VRMesh &mesh, std::array<lava::openvr::OpenVRController *, 2> feet) : mFeet(feet) { @@ -60,7 +60,7 @@ glm::vec3 bary(glm::vec2 p, glm::vec2 a, glm::vec2 b, glm::vec2 c) { glm::vec2 projy(glm::vec3 const &x) { return {x.x, x.z}; } -glm::mat4 FootElevation::apply(glm::mat4 oldMatrix) { +glm::mat4 FeetElevation::apply(glm::mat4 oldMatrix) { std::array<glm::vec3, 2> feet = {{{mFeet[0]->pose()[3]}, // {mFeet[1]->pose()[3]}}}; diff --git a/src/lava-vr/FootElevation.hh b/src/lava-vr/FeetElevation.hh similarity index 96% rename from src/lava-vr/FootElevation.hh rename to src/lava-vr/FeetElevation.hh index 756465e..73d4c6b 100644 --- a/src/lava-vr/FootElevation.hh +++ b/src/lava-vr/FeetElevation.hh @@ -5,9 +5,9 @@ namespace lava { namespace vr { -class FootElevation { +class FeetElevation { public: - FootElevation(VRMesh const &mesh, + FeetElevation(VRMesh const &mesh, std::array<openvr::OpenVRController *, 2> feet); /// set the distance of the tracker from the floor when it's attached to a -- GitLab