From 774bd4c9e1fed539b7bccf21600624f4a7fce565 Mon Sep 17 00:00:00 2001 From: Jan Herling Date: Tue, 15 Oct 2024 11:01:18 -0700 Subject: [PATCH] Adding Quest 3S as device Summary: Quest 3S has been released today. Moving the definition of the device from metaonly to public. Reviewed By: enpe Differential Revision: D64405580 fbshipit-source-id: 32afa03d879107e6bc2b6ad3c4569e7f38eef1ab --- impl/ocean/platform/meta/quest/Device.cpp | 8 ++++++++ impl/ocean/platform/meta/quest/Device.h | 2 ++ .../meta/quest/application/VRControllerVisualizer.cpp | 9 +++++---- .../quest/openxr/application/VRControllerVisualizer.cpp | 1 + 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/impl/ocean/platform/meta/quest/Device.cpp b/impl/ocean/platform/meta/quest/Device.cpp index 541f2f154..15c084805 100644 --- a/impl/ocean/platform/meta/quest/Device.cpp +++ b/impl/ocean/platform/meta/quest/Device.cpp @@ -50,6 +50,11 @@ Device::DeviceType Device::deviceType() return DT_QUEST_3; } + if (productModel == "quest 3s") + { + return DT_QUEST_3S; + } + if (productModel == "quest pro") { return DT_QUEST_PRO; @@ -100,6 +105,9 @@ std::string Device::deviceName(const DeviceType deviceType) case DT_QUEST_3: return std::string("Quest 3"); + case DT_QUEST_3S: + return std::string("Quest 3S"); + case DT_QUEST_PRO: return std::string("Quest Pro"); diff --git a/impl/ocean/platform/meta/quest/Device.h b/impl/ocean/platform/meta/quest/Device.h index 32232c2fb..849cda862 100644 --- a/impl/ocean/platform/meta/quest/Device.h +++ b/impl/ocean/platform/meta/quest/Device.h @@ -43,6 +43,8 @@ class Device DT_QUEST_2, /// Quest device, version 3. DT_QUEST_3, + // Quest device, version 3S. + DT_QUEST_3S, /// Quest Pro device. DT_QUEST_PRO, diff --git a/impl/ocean/platform/meta/quest/application/VRControllerVisualizer.cpp b/impl/ocean/platform/meta/quest/application/VRControllerVisualizer.cpp index c38d9114f..f6b153980 100644 --- a/impl/ocean/platform/meta/quest/application/VRControllerVisualizer.cpp +++ b/impl/ocean/platform/meta/quest/application/VRControllerVisualizer.cpp @@ -10,10 +10,10 @@ #include "ocean/io/Directory.h" #include "ocean/io/File.h" -#include "ocean/rendering/AbsoluteTransform.h" +#include "ocean/rendering/AttributeSet.h" #include "ocean/rendering/Cylinder.h" -#include "ocean/rendering/Manager.h" -#include "ocean/rendering/Utilities.h" +#include "ocean/rendering/Geometry.h" +#include "ocean/rendering/Material.h" #include "ocean/scenedescription/Manager.h" #include "ocean/scenedescription/Scene.h" @@ -321,8 +321,9 @@ bool VRControllerVisualizer::loadModels(const Device::DeviceType deviceType, con rightRenderModelFile = renderModelDirectory + IO::File("quest2_controller_right.obj"); break; - case Device::DT_QUEST_PRO: case Device::DT_QUEST_3: + case Device::DT_QUEST_3S: + case Device::DT_QUEST_PRO: leftRenderModelFile = renderModelDirectory + IO::File("quest3_controller_left.obj"); rightRenderModelFile = renderModelDirectory + IO::File("quest3_controller_right.obj"); break; diff --git a/impl/ocean/platform/meta/quest/openxr/application/VRControllerVisualizer.cpp b/impl/ocean/platform/meta/quest/openxr/application/VRControllerVisualizer.cpp index 4ebb006fc..947a8c821 100644 --- a/impl/ocean/platform/meta/quest/openxr/application/VRControllerVisualizer.cpp +++ b/impl/ocean/platform/meta/quest/openxr/application/VRControllerVisualizer.cpp @@ -40,6 +40,7 @@ VRControllerVisualizer::VRControllerVisualizer(const Rendering::EngineRef& engin case Device::DT_QUEST_2: case Device::DT_QUEST_3: + case Device::DT_QUEST_3S: case Device::DT_QUEST_PRO: controllerAim_t_controllerModel_ = Vector3(0, 0, Scalar(0.055)); break;