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 2172a6483f6d70fcf4c1bb824b0a833667ad1dea..9ce973927d888d682f9c8f60f4568ad8f62d8bae 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 756465e433ff23fd6168bf7f813df4634d1e4bf7..73d4c6b480b736b05b4813a7d1619d5168ef1f89 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