Skip to content

Commit 5331555

Browse files
authored
Implement the structure for adding API and hand-written documentation (#138)
1 parent 28d0e98 commit 5331555

File tree

49 files changed

+3968
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3968
-15
lines changed

.github/workflows/documentation.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Documentation
2+
3+
permissions:
4+
contents: read
5+
pages: write
6+
id-token: write
7+
8+
on:
9+
push:
10+
branches:
11+
- master
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.10'
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install sphinx
30+
pip install -r docs/requirements.txt
31+
32+
- name: Build Sphinx Documentation
33+
run: |
34+
cd docs
35+
make api html
36+
37+
- name: Upload Pages Artifact
38+
uses: actions/upload-pages-artifact@v1
39+
with:
40+
path: docs/_build/html
41+
42+
deploy:
43+
needs: build
44+
runs-on: ubuntu-latest
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deploy-pages.outputs.page_url }}
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
uses: actions/deploy-pages@v1

common/src/main/cpp/classes/openxr_fb_spatial_entity.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void OpenXRFbSpatialEntity::_bind_methods() {
5050
ClassDB::bind_method(D_METHOD("get_supported_components"), &OpenXRFbSpatialEntity::get_supported_components);
5151
ClassDB::bind_method(D_METHOD("is_component_supported", "component"), &OpenXRFbSpatialEntity::is_component_supported);
5252
ClassDB::bind_method(D_METHOD("is_component_enabled", "component"), &OpenXRFbSpatialEntity::is_component_enabled);
53-
ClassDB::bind_method(D_METHOD("set_component_enabled", "component"), &OpenXRFbSpatialEntity::set_component_enabled);
53+
ClassDB::bind_method(D_METHOD("set_component_enabled", "component", "enabled"), &OpenXRFbSpatialEntity::set_component_enabled);
5454

5555
ClassDB::bind_method(D_METHOD("get_semantic_labels"), &OpenXRFbSpatialEntity::get_semantic_labels);
5656
ClassDB::bind_method(D_METHOD("get_room_layout"), &OpenXRFbSpatialEntity::get_room_layout);

common/src/main/cpp/classes/openxr_meta_passthrough_color_lut.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
using namespace godot;
3838

3939
void OpenXRMetaPassthroughColorLut::_bind_methods() {
40-
ClassDB::bind_static_method("OpenXRMetaPassthroughColorLut", D_METHOD("create_from_image"), &OpenXRMetaPassthroughColorLut::create_from_image);
40+
ClassDB::bind_static_method("OpenXRMetaPassthroughColorLut", D_METHOD("create_from_image", "image", "channels"), &OpenXRMetaPassthroughColorLut::create_from_image);
4141

4242
BIND_ENUM_CONSTANT(COLOR_LUT_CHANNELS_RGB);
4343
BIND_ENUM_CONSTANT(COLOR_LUT_CHANNELS_RGBA);

common/src/main/cpp/extensions/openxr_fb_hand_tracking_capsules_extension_wrapper.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ OpenXRFbHandTrackingCapsulesExtensionWrapper::~OpenXRFbHandTrackingCapsulesExten
5555
void OpenXRFbHandTrackingCapsulesExtensionWrapper::_bind_methods() {
5656
ClassDB::bind_method(D_METHOD("is_enabled"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::is_enabled);
5757
ClassDB::bind_method(D_METHOD("get_hand_capsule_count"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_count);
58-
ClassDB::bind_method(D_METHOD("get_hand_capsule_transform"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_transform);
59-
ClassDB::bind_method(D_METHOD("get_hand_capsule_height"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_height);
60-
ClassDB::bind_method(D_METHOD("get_hand_capsule_radius"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_radius);
61-
ClassDB::bind_method(D_METHOD("get_hand_capsule_joint"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_joint);
58+
ClassDB::bind_method(D_METHOD("get_hand_capsule_transform", "hand_index", "capsule_index"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_transform);
59+
ClassDB::bind_method(D_METHOD("get_hand_capsule_height", "hand_index", "capsule_index"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_height);
60+
ClassDB::bind_method(D_METHOD("get_hand_capsule_radius", "hand_index", "capsule_index"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_radius);
61+
ClassDB::bind_method(D_METHOD("get_hand_capsule_joint", "hand_index", "capsule_index"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_joint);
6262
}
6363

6464
void OpenXRFbHandTrackingCapsulesExtensionWrapper::cleanup() {

common/src/main/cpp/extensions/openxr_fb_passthrough_extension_wrapper.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -72,29 +72,29 @@ void OpenXRFbPassthroughExtensionWrapper::_bind_methods() {
7272
ClassDB::bind_method(D_METHOD("is_passthrough_supported"), &OpenXRFbPassthroughExtensionWrapper::is_passthrough_supported);
7373
ClassDB::bind_method(D_METHOD("is_passthrough_started"), &OpenXRFbPassthroughExtensionWrapper::is_passthrough_started);
7474

75-
ClassDB::bind_method(D_METHOD("set_texture_opacity_factor"), &OpenXRFbPassthroughExtensionWrapper::set_texture_opacity_factor);
75+
ClassDB::bind_method(D_METHOD("set_texture_opacity_factor", "value"), &OpenXRFbPassthroughExtensionWrapper::set_texture_opacity_factor);
7676
ClassDB::bind_method(D_METHOD("get_texture_opacity_factor"), &OpenXRFbPassthroughExtensionWrapper::get_texture_opacity_factor);
7777

7878
ClassDB::bind_method(D_METHOD("get_current_layer_purpose"), &OpenXRFbPassthroughExtensionWrapper::get_current_layer_purpose);
7979

80-
ClassDB::bind_method(D_METHOD("set_edge_color"), &OpenXRFbPassthroughExtensionWrapper::set_edge_color);
80+
ClassDB::bind_method(D_METHOD("set_edge_color", "color"), &OpenXRFbPassthroughExtensionWrapper::set_edge_color);
8181
ClassDB::bind_method(D_METHOD("get_edge_color"), &OpenXRFbPassthroughExtensionWrapper::get_edge_color);
8282

83-
ClassDB::bind_method(D_METHOD("set_passthrough_filter"), &OpenXRFbPassthroughExtensionWrapper::set_passthrough_filter);
83+
ClassDB::bind_method(D_METHOD("set_passthrough_filter", "filter"), &OpenXRFbPassthroughExtensionWrapper::set_passthrough_filter);
8484
ClassDB::bind_method(D_METHOD("get_current_passthrough_filter"), &OpenXRFbPassthroughExtensionWrapper::get_current_passthrough_filter);
85-
ClassDB::bind_method(D_METHOD("set_color_map"), &OpenXRFbPassthroughExtensionWrapper::set_color_map);
86-
ClassDB::bind_method(D_METHOD("set_mono_map"), &OpenXRFbPassthroughExtensionWrapper::set_mono_map);
87-
ClassDB::bind_method(D_METHOD("set_brightness_contrast_saturation"), &OpenXRFbPassthroughExtensionWrapper::set_brightness_contrast_saturation);
85+
ClassDB::bind_method(D_METHOD("set_color_map", "gradient"), &OpenXRFbPassthroughExtensionWrapper::set_color_map);
86+
ClassDB::bind_method(D_METHOD("set_mono_map", "curve"), &OpenXRFbPassthroughExtensionWrapper::set_mono_map);
87+
ClassDB::bind_method(D_METHOD("set_brightness_contrast_saturation", "brightness", "contrast", "saturation"), &OpenXRFbPassthroughExtensionWrapper::set_brightness_contrast_saturation);
8888

8989
ClassDB::bind_method(D_METHOD("has_passthrough_capability"), &OpenXRFbPassthroughExtensionWrapper::has_passthrough_capability);
9090
ClassDB::bind_method(D_METHOD("has_color_passthrough_capability"), &OpenXRFbPassthroughExtensionWrapper::has_color_passthrough_capability);
9191
ClassDB::bind_method(D_METHOD("has_layer_depth_passthrough_capability"), &OpenXRFbPassthroughExtensionWrapper::has_layer_depth_passthrough_capability);
9292

9393
ClassDB::bind_method(D_METHOD("is_passthrough_preferred"), &OpenXRFbPassthroughExtensionWrapper::is_passthrough_preferred);
9494

95-
ClassDB::bind_method(D_METHOD("set_color_lut"), &OpenXRFbPassthroughExtensionWrapper::set_color_lut);
96-
ClassDB::bind_method(D_METHOD("set_interpolated_color_lut"), &OpenXRFbPassthroughExtensionWrapper::set_interpolated_color_lut);
97-
ClassDB::bind_method(D_METHOD("destroy_color_lut"), &OpenXRFbPassthroughExtensionWrapper::destroy_color_lut);
95+
ClassDB::bind_method(D_METHOD("set_color_lut", "weight", "color_lut"), &OpenXRFbPassthroughExtensionWrapper::set_color_lut);
96+
ClassDB::bind_method(D_METHOD("set_interpolated_color_lut", "weight", "source_color_lut", "target_color_lut"), &OpenXRFbPassthroughExtensionWrapper::set_interpolated_color_lut);
97+
ClassDB::bind_method(D_METHOD("destroy_color_lut", "color_lut"), &OpenXRFbPassthroughExtensionWrapper::destroy_color_lut);
9898
ClassDB::bind_method(D_METHOD("get_max_color_lut_resolution"), &OpenXRFbPassthroughExtensionWrapper::get_max_color_lut_resolution);
9999

100100
ADD_SIGNAL(MethodInfo("openxr_fb_projected_passthrough_layer_created"));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="KhronosEditorExportPlugin" inherits="OpenXREditorExportPlugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
</class>

doc_classes/KhronosEditorPlugin.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="KhronosEditorPlugin" inherits="EditorPlugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
</class>

doc_classes/LynxEditorPlugin.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="LynxEditorPlugin" inherits="EditorPlugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
</class>
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="MetaEditorExportPlugin" inherits="OpenXREditorExportPlugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
</class>

doc_classes/MetaEditorPlugin.xml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="MetaEditorPlugin" inherits="EditorPlugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
</class>
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="OpenXREditorExportPlugin" inherits="EditorExportPlugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
</class>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="OpenXRFbBodyTrackingExtensionWrapper" inherits="OpenXRExtensionWrapperExtension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
</class>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="OpenXRFbCompositionLayerSecureContentExtensionWrapper" inherits="OpenXRExtensionWrapperExtension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
</class>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="OpenXRFbFaceTrackingExtensionWrapper" inherits="OpenXRExtensionWrapperExtension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
</class>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="OpenXRFbHandTrackingAimExtensionWrapper" inherits="OpenXRExtensionWrapperExtension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
<methods>
10+
<method name="is_enabled">
11+
<return type="bool" />
12+
<description>
13+
</description>
14+
</method>
15+
</methods>
16+
</class>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="OpenXRFbHandTrackingCapsulesExtensionWrapper" inherits="OpenXRExtensionWrapperExtension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
<methods>
10+
<method name="get_hand_capsule_count">
11+
<return type="int" />
12+
<description>
13+
</description>
14+
</method>
15+
<method name="get_hand_capsule_height">
16+
<return type="float" />
17+
<param index="0" name="hand_index" type="int" />
18+
<param index="1" name="capsule_index" type="int" />
19+
<description>
20+
</description>
21+
</method>
22+
<method name="get_hand_capsule_joint">
23+
<return type="int" enum="XRHandTracker.HandJoint" />
24+
<param index="0" name="hand_index" type="int" />
25+
<param index="1" name="capsule_index" type="int" />
26+
<description>
27+
</description>
28+
</method>
29+
<method name="get_hand_capsule_radius">
30+
<return type="float" />
31+
<param index="0" name="hand_index" type="int" />
32+
<param index="1" name="capsule_index" type="int" />
33+
<description>
34+
</description>
35+
</method>
36+
<method name="get_hand_capsule_transform">
37+
<return type="Transform3D" />
38+
<param index="0" name="hand_index" type="int" />
39+
<param index="1" name="capsule_index" type="int" />
40+
<description>
41+
</description>
42+
</method>
43+
<method name="is_enabled">
44+
<return type="bool" />
45+
<description>
46+
</description>
47+
</method>
48+
</methods>
49+
</class>
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="OpenXRFbHandTrackingMesh" inherits="Skeleton3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
<methods>
10+
<method name="get_mesh_instance">
11+
<return type="MeshInstance3D" />
12+
<description>
13+
</description>
14+
</method>
15+
</methods>
16+
<members>
17+
<member name="hand" type="int" setter="set_hand" getter="get_hand" enum="OpenXRFbHandTrackingMesh.Hand" default="0">
18+
</member>
19+
<member name="material" type="Material" setter="set_material" getter="get_material">
20+
</member>
21+
<member name="scale_override" type="float" setter="set_scale_override" getter="get_scale_override" default="2.51113e-42">
22+
</member>
23+
<member name="use_scale_override" type="bool" setter="set_use_scale_override" getter="get_use_scale_override" default="true">
24+
</member>
25+
</members>
26+
<constants>
27+
<constant name="Hand::HAND_LEFT" value="0" enum="Hand">
28+
</constant>
29+
<constant name="Hand::HAND_RIGHT" value="1" enum="Hand">
30+
</constant>
31+
</constants>
32+
</class>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<class name="OpenXRFbHandTrackingMeshExtensionWrapper" inherits="OpenXRExtensionWrapperExtension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
3+
<brief_description>
4+
</brief_description>
5+
<description>
6+
</description>
7+
<tutorials>
8+
</tutorials>
9+
<signals>
10+
<signal name="openxr_fb_hand_tracking_mesh_data_fetched">
11+
<param index="0" name="hand_index" type="int" />
12+
<description>
13+
</description>
14+
</signal>
15+
</signals>
16+
</class>

0 commit comments

Comments
 (0)