OpenXRRenderModelExtension.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="OpenXRRenderModelExtension" inherits="OpenXRExtensionWrapper" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
  3. <brief_description>
  4. This class implements the OpenXR Render Model Extension.
  5. </brief_description>
  6. <description>
  7. This class implements the OpenXR Render Model Extension, if enabled it will maintain a list of active render models and provides an interface to the render model data.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="is_active" qualifiers="const">
  13. <return type="bool" />
  14. <description>
  15. Returns [code]true[/code] if OpenXR's render model extension is supported and enabled.
  16. [b]Note:[/b] This only returns a valid value after OpenXR has been initialized.
  17. </description>
  18. </method>
  19. <method name="render_model_create">
  20. <return type="RID" />
  21. <param index="0" name="render_model_id" type="int" />
  22. <description>
  23. Creates a render model object within OpenXR using a render model id.
  24. [b]Note:[/b] This function is exposed for dependent OpenXR extensions that provide render model ids to be used with the render model extension.
  25. </description>
  26. </method>
  27. <method name="render_model_destroy">
  28. <return type="void" />
  29. <param index="0" name="render_model" type="RID" />
  30. <description>
  31. Destroys a render model object within OpenXR that was previously created with [method render_model_create].
  32. [b]Note:[/b] This function is exposed for dependent OpenXR extensions that provide render model ids to be used with the render model extension.
  33. </description>
  34. </method>
  35. <method name="render_model_get_all">
  36. <return type="RID[]" />
  37. <description>
  38. Returns an array of all currently active render models registered with this extension.
  39. </description>
  40. </method>
  41. <method name="render_model_get_animatable_node_count" qualifiers="const">
  42. <return type="int" />
  43. <param index="0" name="render_model" type="RID" />
  44. <description>
  45. Returns the number of animatable nodes this render model has.
  46. </description>
  47. </method>
  48. <method name="render_model_get_animatable_node_name" qualifiers="const">
  49. <return type="String" />
  50. <param index="0" name="render_model" type="RID" />
  51. <param index="1" name="index" type="int" />
  52. <description>
  53. Returns the name of the given animatable node.
  54. </description>
  55. </method>
  56. <method name="render_model_get_animatable_node_transform" qualifiers="const">
  57. <return type="Transform3D" />
  58. <param index="0" name="render_model" type="RID" />
  59. <param index="1" name="index" type="int" />
  60. <description>
  61. Returns the current local transform for an animatable node. This is updated every frame.
  62. </description>
  63. </method>
  64. <method name="render_model_get_confidence" qualifiers="const">
  65. <return type="int" enum="XRPose.TrackingConfidence" />
  66. <param index="0" name="render_model" type="RID" />
  67. <description>
  68. Returns the tracking confidence of the tracking data for the render model.
  69. </description>
  70. </method>
  71. <method name="render_model_get_root_transform" qualifiers="const">
  72. <return type="Transform3D" />
  73. <param index="0" name="render_model" type="RID" />
  74. <description>
  75. Returns the root transform of a render model. This is the tracked position relative to our [XROrigin3D] node.
  76. </description>
  77. </method>
  78. <method name="render_model_get_subaction_paths">
  79. <return type="PackedStringArray" />
  80. <param index="0" name="render_model" type="RID" />
  81. <description>
  82. Returns a list of active subaction paths for this [param render_model].
  83. [b]Note:[/b] If different devices are bound to your actions than available in suggested interaction bindings, this information shows paths related to the interaction bindings being mimicked by that device.
  84. </description>
  85. </method>
  86. <method name="render_model_get_top_level_path" qualifiers="const">
  87. <return type="String" />
  88. <param index="0" name="render_model" type="RID" />
  89. <description>
  90. Returns the top level path associated with this [param render_model]. If provided this identifies whether the render model is associated with the player's hands or other body part.
  91. </description>
  92. </method>
  93. <method name="render_model_is_animatable_node_visible" qualifiers="const">
  94. <return type="bool" />
  95. <param index="0" name="render_model" type="RID" />
  96. <param index="1" name="index" type="int" />
  97. <description>
  98. Returns [code]true[/code] if this animatable node should be visible.
  99. </description>
  100. </method>
  101. <method name="render_model_new_scene_instance" qualifiers="const">
  102. <return type="Node3D" />
  103. <param index="0" name="render_model" type="RID" />
  104. <description>
  105. Returns an instance of a subscene that contains all [MeshInstance3D] nodes that allow you to visualize the render model.
  106. </description>
  107. </method>
  108. </methods>
  109. <signals>
  110. <signal name="render_model_added">
  111. <param index="0" name="render_model" type="RID" />
  112. <description>
  113. Emitted when a new render model is added.
  114. </description>
  115. </signal>
  116. <signal name="render_model_removed">
  117. <param index="0" name="render_model" type="RID" />
  118. <description>
  119. Emitted when a render model is removed.
  120. </description>
  121. </signal>
  122. <signal name="render_model_top_level_path_changed">
  123. <param index="0" name="render_model" type="RID" />
  124. <description>
  125. Emitted when the top level path associated with a render model changed.
  126. </description>
  127. </signal>
  128. </signals>
  129. </class>