Add interaction profile and glTF models for HTC Vive Focus 3
This commit is contained in:
+13
-1
@@ -38,6 +38,9 @@
|
|||||||
<uses-feature android:name="com.oculus.feature.RENDER_MODEL" android:required="false" />
|
<uses-feature android:name="com.oculus.feature.RENDER_MODEL" android:required="false" />
|
||||||
<uses-permission android:name="com.oculus.permission.RENDER_MODEL" />
|
<uses-permission android:name="com.oculus.permission.RENDER_MODEL" />
|
||||||
|
|
||||||
|
<!-- See https://hub.vive.com/storage/docs/en-us/ConfigureAppCapabilities.html -->
|
||||||
|
<uses-feature android:name="wave.feature.handtracking" android:required="false" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:hasCode="false"
|
android:hasCode="false"
|
||||||
@@ -45,10 +48,18 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_wivrn_launcher">
|
android:roundIcon="@mipmap/ic_wivrn_launcher">
|
||||||
|
|
||||||
<profileable android:shell="true" />
|
<profileable android:shell="true" />
|
||||||
|
|
||||||
<meta-data android:name="pvr.app.type" android:value="vr" />
|
<meta-data android:name="pvr.app.type" android:value="vr" />
|
||||||
<meta-data android:name="com.oculus.intent.category.VR" android:value="vr_only"/>
|
<meta-data android:name="com.oculus.intent.category.VR" android:value="vr_only"/>
|
||||||
<meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2|cambria"/>
|
<meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2|cambria"/>
|
||||||
|
<meta-data android:name="com.oculus.vr.focusaware" android:value="true"/>
|
||||||
|
|
||||||
|
<!-- See https://hub.vive.com/storage/docs/en-us/ConfigureAppCapabilities.html -->
|
||||||
|
<meta-data android:name="com.htc.vr.content.NumDoFHmd" android:value="3,6DoF"/>
|
||||||
|
<meta-data android:name="com.htc.vr.content.NumDoFController" android:value="3,6DoF"/>
|
||||||
|
<meta-data android:name="com.htc.vr.content.NumController" android:value="1,2"/>
|
||||||
|
|
||||||
<meta-data android:name="handtracking" android:value="1" />
|
<meta-data android:name="handtracking" android:value="1" />
|
||||||
|
|
||||||
<!-- The activity is the built-in NativeActivity framework class. -->
|
<!-- The activity is the built-in NativeActivity framework class. -->
|
||||||
@@ -75,6 +86,7 @@
|
|||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="com.oculus.intent.category.VR" />
|
<category android:name="com.oculus.intent.category.VR" />
|
||||||
|
<category android:name="com.htc.intent.category.VRAPP" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
<category android:name="org.khronos.openxr.intent.category.IMMERSIVE_HMD" />
|
<category android:name="org.khronos.openxr.intent.category.IMMERSIVE_HMD" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|||||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Binary file not shown.
@@ -0,0 +1,286 @@
|
|||||||
|
{
|
||||||
|
"profileId": "htc-vive-focus-3",
|
||||||
|
"fallbackProfileIds": [
|
||||||
|
"generic-trigger-squeeze-thumbstick"
|
||||||
|
],
|
||||||
|
"layouts": {
|
||||||
|
"left": {
|
||||||
|
"selectComponentId": "xr-standard-trigger",
|
||||||
|
"components": {
|
||||||
|
"xr-standard-trigger": {
|
||||||
|
"type": "trigger",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 0
|
||||||
|
},
|
||||||
|
"rootNodeName": "xr_standard_trigger",
|
||||||
|
"visualResponses": {
|
||||||
|
"xr_standard_trigger_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_trigger_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_trigger_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_trigger_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xr-standard-squeeze": {
|
||||||
|
"type": "squeeze",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 1
|
||||||
|
},
|
||||||
|
"rootNodeName": "xr_standard_squeeze",
|
||||||
|
"visualResponses": {
|
||||||
|
"xr_standard_squeeze_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_squeeze_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_squeeze_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_squeeze_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xr-standard-thumbstick": {
|
||||||
|
"type": "thumbstick",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 3,
|
||||||
|
"xAxis": 2,
|
||||||
|
"yAxis": 3
|
||||||
|
},
|
||||||
|
"rootNodeName": "xr_standard_thumbstick",
|
||||||
|
"visualResponses": {
|
||||||
|
"xr_standard_thumbstick_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_thumbstick_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_thumbstick_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_thumbstick_pressed_max"
|
||||||
|
},
|
||||||
|
"xr_standard_thumbstick_xaxis_pressed": {
|
||||||
|
"componentProperty": "xAxis",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
|
||||||
|
},
|
||||||
|
"xr_standard_thumbstick_yaxis_pressed": {
|
||||||
|
"componentProperty": "yAxis",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"x-button": {
|
||||||
|
"type": "button",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 4
|
||||||
|
},
|
||||||
|
"rootNodeName": "x_button",
|
||||||
|
"visualResponses": {
|
||||||
|
"x_button_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "x_button_pressed_value",
|
||||||
|
"minNodeName": "x_button_pressed_min",
|
||||||
|
"maxNodeName": "x_button_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"y-button": {
|
||||||
|
"type": "button",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 5
|
||||||
|
},
|
||||||
|
"rootNodeName": "y_button",
|
||||||
|
"visualResponses": {
|
||||||
|
"y_button_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "y_button_pressed_value",
|
||||||
|
"minNodeName": "y_button_pressed_min",
|
||||||
|
"maxNodeName": "y_button_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gamepadMapping": "xr-standard",
|
||||||
|
"rootNodeName": "htc-vive-focus-3-left",
|
||||||
|
"assetPath": "left.glb"
|
||||||
|
},
|
||||||
|
"right": {
|
||||||
|
"selectComponentId": "xr-standard-trigger",
|
||||||
|
"components": {
|
||||||
|
"xr-standard-trigger": {
|
||||||
|
"type": "trigger",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 0
|
||||||
|
},
|
||||||
|
"rootNodeName": "xr_standard_trigger",
|
||||||
|
"visualResponses": {
|
||||||
|
"xr_standard_trigger_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_trigger_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_trigger_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_trigger_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xr-standard-squeeze": {
|
||||||
|
"type": "squeeze",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 1
|
||||||
|
},
|
||||||
|
"rootNodeName": "xr_standard_squeeze",
|
||||||
|
"visualResponses": {
|
||||||
|
"xr_standard_squeeze_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_squeeze_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_squeeze_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_squeeze_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xr-standard-thumbstick": {
|
||||||
|
"type": "thumbstick",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 3,
|
||||||
|
"xAxis": 2,
|
||||||
|
"yAxis": 3
|
||||||
|
},
|
||||||
|
"rootNodeName": "xr_standard_thumbstick",
|
||||||
|
"visualResponses": {
|
||||||
|
"xr_standard_thumbstick_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_thumbstick_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_thumbstick_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_thumbstick_pressed_max"
|
||||||
|
},
|
||||||
|
"xr_standard_thumbstick_xaxis_pressed": {
|
||||||
|
"componentProperty": "xAxis",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
|
||||||
|
},
|
||||||
|
"xr_standard_thumbstick_yaxis_pressed": {
|
||||||
|
"componentProperty": "yAxis",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
|
||||||
|
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
|
||||||
|
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"a-button": {
|
||||||
|
"type": "button",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 4
|
||||||
|
},
|
||||||
|
"rootNodeName": "a_button",
|
||||||
|
"visualResponses": {
|
||||||
|
"a_button_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "a_button_pressed_value",
|
||||||
|
"minNodeName": "a_button_pressed_min",
|
||||||
|
"maxNodeName": "a_button_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"b-button": {
|
||||||
|
"type": "button",
|
||||||
|
"gamepadIndices": {
|
||||||
|
"button": 5
|
||||||
|
},
|
||||||
|
"rootNodeName": "b_button",
|
||||||
|
"visualResponses": {
|
||||||
|
"b_button_pressed": {
|
||||||
|
"componentProperty": "button",
|
||||||
|
"states": [
|
||||||
|
"default",
|
||||||
|
"touched",
|
||||||
|
"pressed"
|
||||||
|
],
|
||||||
|
"valueNodeProperty": "transform",
|
||||||
|
"valueNodeName": "b_button_pressed_value",
|
||||||
|
"minNodeName": "b_button_pressed_min",
|
||||||
|
"maxNodeName": "b_button_pressed_max"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gamepadMapping": "xr-standard",
|
||||||
|
"rootNodeName": "htc-vive-focus-3-right",
|
||||||
|
"assetPath": "right.glb"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
+64
-5
@@ -73,7 +73,7 @@ struct interaction_profile
|
|||||||
static std::vector<interaction_profile> interaction_profiles{
|
static std::vector<interaction_profile> interaction_profiles{
|
||||||
interaction_profile{
|
interaction_profile{
|
||||||
"/interaction_profiles/khr/simple_controller",
|
"/interaction_profiles/khr/simple_controller",
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
"/user/hand/left/output/haptic",
|
"/user/hand/left/output/haptic",
|
||||||
"/user/hand/right/output/haptic",
|
"/user/hand/right/output/haptic",
|
||||||
@@ -93,7 +93,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
|||||||
}},
|
}},
|
||||||
interaction_profile{
|
interaction_profile{
|
||||||
"/interaction_profiles/oculus/touch_controller",
|
"/interaction_profiles/oculus/touch_controller",
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
"/user/hand/left/output/haptic",
|
"/user/hand/left/output/haptic",
|
||||||
"/user/hand/right/output/haptic",
|
"/user/hand/right/output/haptic",
|
||||||
@@ -132,7 +132,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
|||||||
}},
|
}},
|
||||||
interaction_profile{
|
interaction_profile{
|
||||||
"/interaction_profiles/bytedance/pico_neo3_controller",
|
"/interaction_profiles/bytedance/pico_neo3_controller",
|
||||||
{ "XR_BD_controller_interaction" },
|
{ "XR_BD_controller_interaction" },
|
||||||
{
|
{
|
||||||
"/user/hand/left/output/haptic",
|
"/user/hand/left/output/haptic",
|
||||||
"/user/hand/right/output/haptic",
|
"/user/hand/right/output/haptic",
|
||||||
@@ -174,7 +174,7 @@ static std::vector<interaction_profile> interaction_profiles{
|
|||||||
}},
|
}},
|
||||||
interaction_profile{
|
interaction_profile{
|
||||||
"/interaction_profiles/bytedance/pico4_controller",
|
"/interaction_profiles/bytedance/pico4_controller",
|
||||||
{ "XR_BD_controller_interaction" },
|
{ "XR_BD_controller_interaction" },
|
||||||
{
|
{
|
||||||
"/user/hand/left/output/haptic",
|
"/user/hand/left/output/haptic",
|
||||||
"/user/hand/right/output/haptic",
|
"/user/hand/right/output/haptic",
|
||||||
@@ -212,6 +212,45 @@ static std::vector<interaction_profile> interaction_profiles{
|
|||||||
"/user/hand/right/input/thumbstick/touch",
|
"/user/hand/right/input/thumbstick/touch",
|
||||||
"/user/hand/right/input/thumbrest/touch",
|
"/user/hand/right/input/thumbrest/touch",
|
||||||
}},
|
}},
|
||||||
|
interaction_profile{
|
||||||
|
"/interaction_profiles/htc/vive_focus3_controller",
|
||||||
|
{ "XR_HTC_vive_focus3_controller_interaction" },
|
||||||
|
{
|
||||||
|
"/user/hand/left/output/haptic",
|
||||||
|
"/user/hand/right/output/haptic",
|
||||||
|
|
||||||
|
"/user/hand/left/input/grip/pose",
|
||||||
|
"/user/hand/left/input/aim/pose",
|
||||||
|
|
||||||
|
"/user/hand/right/input/grip/pose",
|
||||||
|
"/user/hand/right/input/aim/pose",
|
||||||
|
|
||||||
|
"/user/hand/left/input/x/click",
|
||||||
|
"/user/hand/left/input/x/touch",
|
||||||
|
"/user/hand/left/input/y/click",
|
||||||
|
"/user/hand/left/input/y/touch",
|
||||||
|
"/user/hand/left/input/menu/click",
|
||||||
|
"/user/hand/left/input/squeeze/value",
|
||||||
|
"/user/hand/left/input/trigger/value",
|
||||||
|
"/user/hand/left/input/trigger/touch",
|
||||||
|
"/user/hand/left/input/thumbrest/touch",
|
||||||
|
"/user/hand/left/input/thumbstick",
|
||||||
|
"/user/hand/left/input/thumbstick/click",
|
||||||
|
"/user/hand/left/input/thumbstick/touch",
|
||||||
|
|
||||||
|
"/user/hand/right/input/a/click",
|
||||||
|
"/user/hand/right/input/a/touch",
|
||||||
|
"/user/hand/right/input/b/click",
|
||||||
|
"/user/hand/right/input/b/touch",
|
||||||
|
"/user/hand/right/input/system/click",
|
||||||
|
"/user/hand/right/input/squeeze/value",
|
||||||
|
"/user/hand/right/input/trigger/value",
|
||||||
|
"/user/hand/right/input/trigger/touch",
|
||||||
|
"/user/hand/right/input/thumbstick",
|
||||||
|
"/user/hand/right/input/thumbstick/click",
|
||||||
|
"/user/hand/right/input/thumbstick/touch",
|
||||||
|
"/user/hand/right/input/thumbrest/touch",
|
||||||
|
}},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const std::pair<std::string_view, XrActionType> action_suffixes[] =
|
static const std::pair<std::string_view, XrActionType> action_suffixes[] =
|
||||||
@@ -689,7 +728,14 @@ void application::initialize_actions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
spdlog::info("Suggesting bindings for interaction profile {}", profile.profile_name);
|
spdlog::info("Suggesting bindings for interaction profile {}", profile.profile_name);
|
||||||
xr_instance.suggest_bindings(profile.profile_name, xr_bindings);
|
try
|
||||||
|
{
|
||||||
|
xr_instance.suggest_bindings(profile.profile_name, xr_bindings);
|
||||||
|
}
|
||||||
|
catch(std::exception& e)
|
||||||
|
{
|
||||||
|
spdlog::warn("Caught {} while suggesting interaction profile", e.what());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xr_session.attach_actionsets(action_sets);
|
xr_session.attach_actionsets(action_sets);
|
||||||
@@ -741,6 +787,19 @@ void application::initialize()
|
|||||||
xr_system_id = xr::system(xr_instance, app_info.formfactor);
|
xr_system_id = xr::system(xr_instance, app_info.formfactor);
|
||||||
spdlog::info("Created OpenXR system for form factor {}", xr::to_string(app_info.formfactor));
|
spdlog::info("Created OpenXR system for form factor {}", xr::to_string(app_info.formfactor));
|
||||||
|
|
||||||
|
// Log system properties
|
||||||
|
XrSystemProperties properties = xr_system_id.properties();
|
||||||
|
spdlog::info("OpenXR sytem properties:");
|
||||||
|
spdlog::info(" Vendor ID: {:#x}", properties.vendorId);
|
||||||
|
spdlog::info(" System name: {}", properties.systemName);
|
||||||
|
spdlog::info(" Graphics properties:");
|
||||||
|
spdlog::info(" Maximum swapchain image size: {}x{}", properties.graphicsProperties.maxSwapchainImageWidth, properties.graphicsProperties.maxSwapchainImageWidth);
|
||||||
|
spdlog::info(" Maximum layer count: {}", properties.graphicsProperties.maxLayerCount);
|
||||||
|
spdlog::info(" Tracking properties:");
|
||||||
|
spdlog::info(" Orientation tracking: {}", (bool)properties.trackingProperties.orientationTracking);
|
||||||
|
spdlog::info(" Position tracking: {}", (bool)properties.trackingProperties.positionTracking);
|
||||||
|
|
||||||
|
|
||||||
// Log view configurations and blend modes
|
// Log view configurations and blend modes
|
||||||
log_views();
|
log_views();
|
||||||
|
|
||||||
|
|||||||
+16
-2
@@ -46,6 +46,15 @@ model guess_model()
|
|||||||
{
|
{
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
const auto device = get_property("ro.product.device");
|
const auto device = get_property("ro.product.device");
|
||||||
|
const auto manufacturer = get_property("ro.product.manufacturer");
|
||||||
|
const auto model = get_property("ro.product.model");
|
||||||
|
|
||||||
|
spdlog::info("Guessing HMD model from:");
|
||||||
|
spdlog::info(" ro.product.device = \"{}\":", device);
|
||||||
|
spdlog::info(" ro.product.manufacturer = \"{}\":", manufacturer);
|
||||||
|
spdlog::info(" ro.product.model = \"{}\":", model);
|
||||||
|
|
||||||
|
|
||||||
if (device == "monterey")
|
if (device == "monterey")
|
||||||
return model::oculus_quest;
|
return model::oculus_quest;
|
||||||
if (device == "hollywood")
|
if (device == "hollywood")
|
||||||
@@ -54,9 +63,9 @@ model guess_model()
|
|||||||
return model::meta_quest_pro;
|
return model::meta_quest_pro;
|
||||||
if (device == "eureka")
|
if (device == "eureka")
|
||||||
return model::meta_quest_3;
|
return model::meta_quest_3;
|
||||||
|
if (device == "TBD")
|
||||||
|
return model::htc_vive_focus_3;
|
||||||
|
|
||||||
const auto manufacturer = get_property("ro.product.manufacturer");
|
|
||||||
const auto model = get_property("ro.product.model");
|
|
||||||
if (manufacturer == "Pico")
|
if (manufacturer == "Pico")
|
||||||
{
|
{
|
||||||
if (model == "Pico Neo 3")
|
if (model == "Pico Neo 3")
|
||||||
@@ -108,6 +117,11 @@ XrViewConfigurationView override_view(XrViewConfigurationView view, model m)
|
|||||||
view.recommendedImageRectWidth = 2160;
|
view.recommendedImageRectWidth = 2160;
|
||||||
view.recommendedImageRectHeight = 2160;
|
view.recommendedImageRectHeight = 2160;
|
||||||
return view;
|
return view;
|
||||||
|
case model::htc_vive_focus_3:
|
||||||
|
spdlog::info("Using panel resolution 2448x2448 for HTC Vive Focus 3");
|
||||||
|
view.recommendedImageRectWidth = 2448;
|
||||||
|
view.recommendedImageRectHeight = 2448;
|
||||||
|
return view;
|
||||||
case model::unknown:
|
case model::unknown:
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ enum class model
|
|||||||
meta_quest_3,
|
meta_quest_3,
|
||||||
pico_neo_3,
|
pico_neo_3,
|
||||||
pico_4,
|
pico_4,
|
||||||
|
htc_vive_focus_3,
|
||||||
unknown
|
unknown
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ static std::string choose_webxr_profile()
|
|||||||
return "pico-neo3";
|
return "pico-neo3";
|
||||||
case model::pico_4:
|
case model::pico_4:
|
||||||
return "pico-4";
|
return "pico-4";
|
||||||
|
case model::htc_vive_focus_3:
|
||||||
|
return "htc-vive-focus-3";
|
||||||
case model::unknown:
|
case model::unknown:
|
||||||
return "generic-trigger-squeeze";
|
return "generic-trigger-squeeze";
|
||||||
}
|
}
|
||||||
@@ -955,6 +957,21 @@ scene::meta& scenes::lobby::get_meta_scene()
|
|||||||
{"right_haptic", "/user/hand/right/output/haptic"},
|
{"right_haptic", "/user/hand/right/output/haptic"},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
suggested_binding{
|
||||||
|
"/interaction_profiles/htc/vive_focus3_controller",
|
||||||
|
{
|
||||||
|
{"left_aim", "/user/hand/left/input/aim/pose"},
|
||||||
|
{"left_trigger", "/user/hand/left/input/trigger/value"},
|
||||||
|
{"left_squeeze", "/user/hand/left/input/squeeze/value"},
|
||||||
|
{"left_scroll", "/user/hand/left/input/thumbstick"},
|
||||||
|
{"left_haptic", "/user/hand/left/output/haptic"},
|
||||||
|
{"right_aim", "/user/hand/right/input/aim/pose"},
|
||||||
|
{"right_trigger", "/user/hand/right/input/trigger/value"},
|
||||||
|
{"right_squeeze", "/user/hand/right/input/squeeze/value"},
|
||||||
|
{"right_scroll", "/user/hand/right/input/thumbstick"},
|
||||||
|
{"right_haptic", "/user/hand/right/output/haptic"},
|
||||||
|
}
|
||||||
|
},
|
||||||
suggested_binding{
|
suggested_binding{
|
||||||
"/interaction_profiles/khr/simple_controller",
|
"/interaction_profiles/khr/simple_controller",
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ XrSystemProperties xr::system::properties() const
|
|||||||
if (!id)
|
if (!id)
|
||||||
throw std::invalid_argument("this");
|
throw std::invalid_argument("this");
|
||||||
|
|
||||||
XrSystemProperties prop;
|
XrSystemProperties prop{.type = XR_TYPE_SYSTEM_PROPERTIES};
|
||||||
CHECK_XR(xrGetSystemProperties(*inst, id, &prop));
|
CHECK_XR(xrGetSystemProperties(*inst, id, &prop));
|
||||||
|
|
||||||
return prop;
|
return prop;
|
||||||
|
|||||||
Reference in New Issue
Block a user