Skip to content

Commit

Permalink
Implement the structure for adding API and hand-written documentation (
Browse files Browse the repository at this point in the history
  • Loading branch information
dsnopek authored May 7, 2024
1 parent 28d0e98 commit 5331555
Show file tree
Hide file tree
Showing 49 changed files with 3,968 additions and 15 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Documentation

permissions:
contents: read
pages: write
id-token: write

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx
pip install -r docs/requirements.txt
- name: Build Sphinx Documentation
run: |
cd docs
make api html
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/_build/html

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy-pages.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion common/src/main/cpp/classes/openxr_fb_spatial_entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void OpenXRFbSpatialEntity::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_supported_components"), &OpenXRFbSpatialEntity::get_supported_components);
ClassDB::bind_method(D_METHOD("is_component_supported", "component"), &OpenXRFbSpatialEntity::is_component_supported);
ClassDB::bind_method(D_METHOD("is_component_enabled", "component"), &OpenXRFbSpatialEntity::is_component_enabled);
ClassDB::bind_method(D_METHOD("set_component_enabled", "component"), &OpenXRFbSpatialEntity::set_component_enabled);
ClassDB::bind_method(D_METHOD("set_component_enabled", "component", "enabled"), &OpenXRFbSpatialEntity::set_component_enabled);

ClassDB::bind_method(D_METHOD("get_semantic_labels"), &OpenXRFbSpatialEntity::get_semantic_labels);
ClassDB::bind_method(D_METHOD("get_room_layout"), &OpenXRFbSpatialEntity::get_room_layout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
using namespace godot;

void OpenXRMetaPassthroughColorLut::_bind_methods() {
ClassDB::bind_static_method("OpenXRMetaPassthroughColorLut", D_METHOD("create_from_image"), &OpenXRMetaPassthroughColorLut::create_from_image);
ClassDB::bind_static_method("OpenXRMetaPassthroughColorLut", D_METHOD("create_from_image", "image", "channels"), &OpenXRMetaPassthroughColorLut::create_from_image);

BIND_ENUM_CONSTANT(COLOR_LUT_CHANNELS_RGB);
BIND_ENUM_CONSTANT(COLOR_LUT_CHANNELS_RGBA);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ OpenXRFbHandTrackingCapsulesExtensionWrapper::~OpenXRFbHandTrackingCapsulesExten
void OpenXRFbHandTrackingCapsulesExtensionWrapper::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_enabled"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::is_enabled);
ClassDB::bind_method(D_METHOD("get_hand_capsule_count"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_count);
ClassDB::bind_method(D_METHOD("get_hand_capsule_transform"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_transform);
ClassDB::bind_method(D_METHOD("get_hand_capsule_height"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_height);
ClassDB::bind_method(D_METHOD("get_hand_capsule_radius"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_radius);
ClassDB::bind_method(D_METHOD("get_hand_capsule_joint"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_joint);
ClassDB::bind_method(D_METHOD("get_hand_capsule_transform", "hand_index", "capsule_index"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_transform);
ClassDB::bind_method(D_METHOD("get_hand_capsule_height", "hand_index", "capsule_index"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_height);
ClassDB::bind_method(D_METHOD("get_hand_capsule_radius", "hand_index", "capsule_index"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_radius);
ClassDB::bind_method(D_METHOD("get_hand_capsule_joint", "hand_index", "capsule_index"), &OpenXRFbHandTrackingCapsulesExtensionWrapper::get_hand_capsule_joint);
}

void OpenXRFbHandTrackingCapsulesExtensionWrapper::cleanup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,29 @@ void OpenXRFbPassthroughExtensionWrapper::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_passthrough_supported"), &OpenXRFbPassthroughExtensionWrapper::is_passthrough_supported);
ClassDB::bind_method(D_METHOD("is_passthrough_started"), &OpenXRFbPassthroughExtensionWrapper::is_passthrough_started);

ClassDB::bind_method(D_METHOD("set_texture_opacity_factor"), &OpenXRFbPassthroughExtensionWrapper::set_texture_opacity_factor);
ClassDB::bind_method(D_METHOD("set_texture_opacity_factor", "value"), &OpenXRFbPassthroughExtensionWrapper::set_texture_opacity_factor);
ClassDB::bind_method(D_METHOD("get_texture_opacity_factor"), &OpenXRFbPassthroughExtensionWrapper::get_texture_opacity_factor);

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

ClassDB::bind_method(D_METHOD("set_edge_color"), &OpenXRFbPassthroughExtensionWrapper::set_edge_color);
ClassDB::bind_method(D_METHOD("set_edge_color", "color"), &OpenXRFbPassthroughExtensionWrapper::set_edge_color);
ClassDB::bind_method(D_METHOD("get_edge_color"), &OpenXRFbPassthroughExtensionWrapper::get_edge_color);

ClassDB::bind_method(D_METHOD("set_passthrough_filter"), &OpenXRFbPassthroughExtensionWrapper::set_passthrough_filter);
ClassDB::bind_method(D_METHOD("set_passthrough_filter", "filter"), &OpenXRFbPassthroughExtensionWrapper::set_passthrough_filter);
ClassDB::bind_method(D_METHOD("get_current_passthrough_filter"), &OpenXRFbPassthroughExtensionWrapper::get_current_passthrough_filter);
ClassDB::bind_method(D_METHOD("set_color_map"), &OpenXRFbPassthroughExtensionWrapper::set_color_map);
ClassDB::bind_method(D_METHOD("set_mono_map"), &OpenXRFbPassthroughExtensionWrapper::set_mono_map);
ClassDB::bind_method(D_METHOD("set_brightness_contrast_saturation"), &OpenXRFbPassthroughExtensionWrapper::set_brightness_contrast_saturation);
ClassDB::bind_method(D_METHOD("set_color_map", "gradient"), &OpenXRFbPassthroughExtensionWrapper::set_color_map);
ClassDB::bind_method(D_METHOD("set_mono_map", "curve"), &OpenXRFbPassthroughExtensionWrapper::set_mono_map);
ClassDB::bind_method(D_METHOD("set_brightness_contrast_saturation", "brightness", "contrast", "saturation"), &OpenXRFbPassthroughExtensionWrapper::set_brightness_contrast_saturation);

ClassDB::bind_method(D_METHOD("has_passthrough_capability"), &OpenXRFbPassthroughExtensionWrapper::has_passthrough_capability);
ClassDB::bind_method(D_METHOD("has_color_passthrough_capability"), &OpenXRFbPassthroughExtensionWrapper::has_color_passthrough_capability);
ClassDB::bind_method(D_METHOD("has_layer_depth_passthrough_capability"), &OpenXRFbPassthroughExtensionWrapper::has_layer_depth_passthrough_capability);

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

ClassDB::bind_method(D_METHOD("set_color_lut"), &OpenXRFbPassthroughExtensionWrapper::set_color_lut);
ClassDB::bind_method(D_METHOD("set_interpolated_color_lut"), &OpenXRFbPassthroughExtensionWrapper::set_interpolated_color_lut);
ClassDB::bind_method(D_METHOD("destroy_color_lut"), &OpenXRFbPassthroughExtensionWrapper::destroy_color_lut);
ClassDB::bind_method(D_METHOD("set_color_lut", "weight", "color_lut"), &OpenXRFbPassthroughExtensionWrapper::set_color_lut);
ClassDB::bind_method(D_METHOD("set_interpolated_color_lut", "weight", "source_color_lut", "target_color_lut"), &OpenXRFbPassthroughExtensionWrapper::set_interpolated_color_lut);
ClassDB::bind_method(D_METHOD("destroy_color_lut", "color_lut"), &OpenXRFbPassthroughExtensionWrapper::destroy_color_lut);
ClassDB::bind_method(D_METHOD("get_max_color_lut_resolution"), &OpenXRFbPassthroughExtensionWrapper::get_max_color_lut_resolution);

ADD_SIGNAL(MethodInfo("openxr_fb_projected_passthrough_layer_created"));
Expand Down
9 changes: 9 additions & 0 deletions doc_classes/KhronosEditorExportPlugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
9 changes: 9 additions & 0 deletions doc_classes/KhronosEditorPlugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
9 changes: 9 additions & 0 deletions doc_classes/LynxEditorPlugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
9 changes: 9 additions & 0 deletions doc_classes/MetaEditorExportPlugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
9 changes: 9 additions & 0 deletions doc_classes/MetaEditorPlugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
9 changes: 9 additions & 0 deletions doc_classes/OpenXREditorExportPlugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
9 changes: 9 additions & 0 deletions doc_classes/OpenXRFbBodyTrackingExtensionWrapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
9 changes: 9 additions & 0 deletions doc_classes/OpenXRFbFaceTrackingExtensionWrapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
</class>
16 changes: 16 additions & 0 deletions doc_classes/OpenXRFbHandTrackingAimExtensionWrapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="is_enabled">
<return type="bool" />
<description>
</description>
</method>
</methods>
</class>
49 changes: 49 additions & 0 deletions doc_classes/OpenXRFbHandTrackingCapsulesExtensionWrapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_hand_capsule_count">
<return type="int" />
<description>
</description>
</method>
<method name="get_hand_capsule_height">
<return type="float" />
<param index="0" name="hand_index" type="int" />
<param index="1" name="capsule_index" type="int" />
<description>
</description>
</method>
<method name="get_hand_capsule_joint">
<return type="int" enum="XRHandTracker.HandJoint" />
<param index="0" name="hand_index" type="int" />
<param index="1" name="capsule_index" type="int" />
<description>
</description>
</method>
<method name="get_hand_capsule_radius">
<return type="float" />
<param index="0" name="hand_index" type="int" />
<param index="1" name="capsule_index" type="int" />
<description>
</description>
</method>
<method name="get_hand_capsule_transform">
<return type="Transform3D" />
<param index="0" name="hand_index" type="int" />
<param index="1" name="capsule_index" type="int" />
<description>
</description>
</method>
<method name="is_enabled">
<return type="bool" />
<description>
</description>
</method>
</methods>
</class>
32 changes: 32 additions & 0 deletions doc_classes/OpenXRFbHandTrackingMesh.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="get_mesh_instance">
<return type="MeshInstance3D" />
<description>
</description>
</method>
</methods>
<members>
<member name="hand" type="int" setter="set_hand" getter="get_hand" enum="OpenXRFbHandTrackingMesh.Hand" default="0">
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
</member>
<member name="scale_override" type="float" setter="set_scale_override" getter="get_scale_override" default="2.51113e-42">
</member>
<member name="use_scale_override" type="bool" setter="set_use_scale_override" getter="get_use_scale_override" default="true">
</member>
</members>
<constants>
<constant name="Hand::HAND_LEFT" value="0" enum="Hand">
</constant>
<constant name="Hand::HAND_RIGHT" value="1" enum="Hand">
</constant>
</constants>
</class>
16 changes: 16 additions & 0 deletions doc_classes/OpenXRFbHandTrackingMeshExtensionWrapper.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<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">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<signals>
<signal name="openxr_fb_hand_tracking_mesh_data_fetched">
<param index="0" name="hand_index" type="int" />
<description>
</description>
</signal>
</signals>
</class>
Loading

0 comments on commit 5331555

Please sign in to comment.