|
1 | 1 | <?xml version="1.0" encoding="UTF-8" ?>
|
2 | 2 | <class name="OpenXRFbSceneManager" inherits="Node" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
|
3 | 3 | <brief_description>
|
| 4 | + Provides an easy-to-use way to interact with Meta's Scene Understanding. |
4 | 5 | </brief_description>
|
5 | 6 | <description>
|
| 7 | + Provides an easy-to-use way to interact with Meta's Scene Understanding. |
| 8 | + This node allows you to register scenes to be instantiated for each scene anchor that is discovered, and provide a method that will be called on them after creation with a [OpenXRFbSpatialEntity] that can be used to setup the scene using data from the scene anchor. |
| 9 | + Each instantiated scene will be added as a child of an [XRAnchor3D] node that will be positioned using tracking data from the headset. |
6 | 10 | </description>
|
7 | 11 | <tutorials>
|
8 | 12 | </tutorials>
|
9 | 13 | <methods>
|
10 |
| - <method name="are_scene_anchors_created"> |
| 14 | + <method name="are_scene_anchors_created" qualifiers="const"> |
11 | 15 | <return type="bool" />
|
12 | 16 | <description>
|
| 17 | + Checks if the scene anchors have been created already or not. |
13 | 18 | </description>
|
14 | 19 | </method>
|
15 | 20 | <method name="create_scene_anchors">
|
16 | 21 | <return type="int" enum="Error" />
|
17 | 22 | <description>
|
| 23 | + Attempts to create the scene anchors discovered in the physical space around the user. |
| 24 | + This is an asynchronous operation - the [signal openxr_fb_scene_data_missing] signal will be emitted if no scene data can be found, and the [signal openxr_fb_scene_anchor_created] signal will be emitted for each scene anchor successfully created. |
| 25 | + This will only work during an active OpenXR session. If you've set [member auto_create] to [code]true[/code], then this method will be called automatically when an OpenXR session has begun. |
18 | 26 | </description>
|
19 | 27 | </method>
|
20 |
| - <method name="get_anchor_node"> |
| 28 | + <method name="get_anchor_node" qualifiers="const"> |
21 | 29 | <return type="XRAnchor3D" />
|
22 | 30 | <param index="0" name="uuid" type="StringName" />
|
23 | 31 | <description>
|
| 32 | + Gets the [XRAnchor3D] node which was created for the spatial entity with the given UUID. |
| 33 | + Note: All anchors will be created asynchronously, either by calling [method create_scene_anchors] or when the OpenXR session begins if [member auto_create] is set to [code]true[/code]. |
24 | 34 | </description>
|
25 | 35 | </method>
|
26 |
| - <method name="get_anchor_uuids"> |
| 36 | + <method name="get_anchor_uuids" qualifiers="const"> |
27 | 37 | <return type="Array" />
|
28 | 38 | <description>
|
| 39 | + Gets the UUIDs of all scene anchors that have been created. |
| 40 | + Note: All anchors will be created asynchronously, either by calling [method create_scene_anchors] or when the OpenXR session begins if [member auto_create] is set to [code]true[/code]. |
29 | 41 | </description>
|
30 | 42 | </method>
|
31 |
| - <method name="get_spatial_entity"> |
| 43 | + <method name="get_spatial_entity" qualifiers="const"> |
32 | 44 | <return type="OpenXRFbSpatialEntity" />
|
33 | 45 | <param index="0" name="uuid" type="StringName" />
|
34 | 46 | <description>
|
| 47 | + Gets the spatial entity identified by the given UUID. |
| 48 | + Note: Only works for spatial entities that were loaded as a result of calling [method create_scene_anchors] or when the OpenXR session begins if [member auto_create] is set to [code]true[/code]. |
35 | 49 | </description>
|
36 | 50 | </method>
|
37 | 51 | <method name="hide">
|
38 | 52 | <return type="void" />
|
39 | 53 | <description>
|
| 54 | + Hides all scene anchors created by this manager. |
40 | 55 | </description>
|
41 | 56 | </method>
|
42 |
| - <method name="is_scene_capture_enabled"> |
| 57 | + <method name="is_scene_capture_enabled" qualifiers="const"> |
43 | 58 | <return type="bool" />
|
44 | 59 | <description>
|
| 60 | + Checks if scene capture is enabled. |
45 | 61 | </description>
|
46 | 62 | </method>
|
47 | 63 | <method name="remove_scene_anchors">
|
48 | 64 | <return type="void" />
|
49 | 65 | <description>
|
| 66 | + Removes all scene anchors. |
| 67 | + This will be done automatically when the OpenXR session ends, or when this node is removed from the scene tree. |
50 | 68 | </description>
|
51 | 69 | </method>
|
52 |
| - <method name="request_scene_capture"> |
| 70 | + <method name="request_scene_capture" qualifiers="const"> |
53 | 71 | <return type="bool" />
|
54 | 72 | <param index="0" name="request" type="String" default="""" />
|
55 | 73 | <description>
|
| 74 | + Requests the user go through the scene capture process. |
| 75 | + This will only work if scene capture is enabled, which can be checked by calling [method is_scene_capture_enabled]. |
| 76 | + The [signal openxr_fb_scene_capture_completed] signal will be emitted when the process has completed. |
56 | 77 | </description>
|
57 | 78 | </method>
|
58 | 79 | <method name="show">
|
59 | 80 | <return type="void" />
|
60 | 81 | <description>
|
| 82 | + Shows all scene anchors created by this manager, if they had been previously hidden. |
61 | 83 | </description>
|
62 | 84 | </method>
|
63 | 85 | </methods>
|
64 | 86 | <members>
|
65 | 87 | <member name="auto_create" type="bool" setter="set_auto_create" getter="get_auto_create" default="true">
|
| 88 | + If enabled, this node will run [method create_scene_anchors] when an OpenXR session starts. |
66 | 89 | </member>
|
67 | 90 | <member name="default_scene" type="PackedScene" setter="set_default_scene" getter="get_default_scene">
|
| 91 | + The default scene to be instatiated for any scene anchor, if there isn't a scene registered for the given type of scene anchor. |
68 | 92 | </member>
|
69 | 93 | <member name="scene_setup_method" type="StringName" setter="set_scene_setup_method" getter="get_scene_setup_method" default="&"setup_scene"">
|
| 94 | + The method that will be called on scenes after they have been instantiated for a scene anchor. |
| 95 | + The method will be called with a single [OpenXRFbSpatialEntity] argument, representing the scene anchor. |
70 | 96 | </member>
|
71 | 97 | <member name="visible" type="bool" setter="set_visible" getter="get_visible" default="true">
|
| 98 | + Controls the visibility of the scene anchors managed by this node. |
72 | 99 | </member>
|
73 | 100 | </members>
|
74 | 101 | <signals>
|
75 | 102 | <signal name="openxr_fb_scene_anchor_created">
|
76 | 103 | <param index="0" name="scene_node" type="Object" />
|
77 | 104 | <param index="1" name="spatial_entity" type="Object" />
|
78 | 105 | <description>
|
| 106 | + Emitted when a new scene anchor is created. |
| 107 | + It will receive the scene that was instantiated, and the `OpenXRFbSpatialEntity` object representing the scene anchor. |
79 | 108 | </description>
|
80 | 109 | </signal>
|
81 | 110 | <signal name="openxr_fb_scene_capture_completed">
|
82 | 111 | <param index="0" name="success" type="bool" />
|
83 | 112 | <description>
|
| 113 | + Emitted when the scene capture process is completed. |
84 | 114 | </description>
|
85 | 115 | </signal>
|
86 | 116 | <signal name="openxr_fb_scene_data_missing">
|
87 | 117 | <description>
|
| 118 | + Emitted after [method create_scene_anchors] is called (or the OpenXR session has begun if [member auto_create] is [code]true[/code]), if no scene data can be found. |
| 119 | + Depending on your application, this may be a good time to initiate the scene capture process via [method request_scene_capture]. |
88 | 120 | </description>
|
89 | 121 | </signal>
|
90 | 122 | </signals>
|
|
0 commit comments