class_gltfnode.rst 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/gltf/doc_classes/GLTFNode.xml.
  6. .. _class_GLTFNode:
  7. GLTFNode
  8. ========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. GLTF node class.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Represents a GLTF node. GLTF nodes may have names, transforms, children (other GLTF nodes), and more specialized properties (represented by their own classes).
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - `GLTF scene and node spec <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_004_ScenesNodes.md">`__
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  25. | :ref:`int<class_int>` | :ref:`camera<class_GLTFNode_property_camera>` | ``-1`` |
  26. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  27. | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`children<class_GLTFNode_property_children>` | ``PackedInt32Array()`` |
  28. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  29. | :ref:`int<class_int>` | :ref:`height<class_GLTFNode_property_height>` | ``-1`` |
  30. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`joint<class_GLTFNode_property_joint>` | ``false`` |
  32. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  33. | :ref:`int<class_int>` | :ref:`light<class_GLTFNode_property_light>` | ``-1`` |
  34. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  35. | :ref:`int<class_int>` | :ref:`mesh<class_GLTFNode_property_mesh>` | ``-1`` |
  36. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  37. | :ref:`int<class_int>` | :ref:`parent<class_GLTFNode_property_parent>` | ``-1`` |
  38. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  39. | :ref:`Vector3<class_Vector3>` | :ref:`position<class_GLTFNode_property_position>` | ``Vector3(0, 0, 0)`` |
  40. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  41. | :ref:`Quaternion<class_Quaternion>` | :ref:`rotation<class_GLTFNode_property_rotation>` | ``Quaternion(0, 0, 0, 1)`` |
  42. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  43. | :ref:`Vector3<class_Vector3>` | :ref:`scale<class_GLTFNode_property_scale>` | ``Vector3(1, 1, 1)`` |
  44. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  45. | :ref:`int<class_int>` | :ref:`skeleton<class_GLTFNode_property_skeleton>` | ``-1`` |
  46. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`skin<class_GLTFNode_property_skin>` | ``-1`` |
  48. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  49. | :ref:`Transform3D<class_Transform3D>` | :ref:`xform<class_GLTFNode_property_xform>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
  50. +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+
  51. .. rst-class:: classref-reftable-group
  52. Methods
  53. -------
  54. .. table::
  55. :widths: auto
  56. +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFNode_method_get_additional_data>` **(** :ref:`StringName<class_StringName>` extension_name **)** |
  58. +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | void | :ref:`set_additional_data<class_GLTFNode_method_set_additional_data>` **(** :ref:`StringName<class_StringName>` extension_name, :ref:`Variant<class_Variant>` additional_data **)** |
  60. +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. .. rst-class:: classref-section-separator
  62. ----
  63. .. rst-class:: classref-descriptions-group
  64. Property Descriptions
  65. ---------------------
  66. .. _class_GLTFNode_property_camera:
  67. .. rst-class:: classref-property
  68. :ref:`int<class_int>` **camera** = ``-1``
  69. .. rst-class:: classref-property-setget
  70. - void **set_camera** **(** :ref:`int<class_int>` value **)**
  71. - :ref:`int<class_int>` **get_camera** **(** **)**
  72. .. container:: contribute
  73. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  74. .. rst-class:: classref-item-separator
  75. ----
  76. .. _class_GLTFNode_property_children:
  77. .. rst-class:: classref-property
  78. :ref:`PackedInt32Array<class_PackedInt32Array>` **children** = ``PackedInt32Array()``
  79. .. rst-class:: classref-property-setget
  80. - void **set_children** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)**
  81. - :ref:`PackedInt32Array<class_PackedInt32Array>` **get_children** **(** **)**
  82. .. container:: contribute
  83. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  84. .. rst-class:: classref-item-separator
  85. ----
  86. .. _class_GLTFNode_property_height:
  87. .. rst-class:: classref-property
  88. :ref:`int<class_int>` **height** = ``-1``
  89. .. rst-class:: classref-property-setget
  90. - void **set_height** **(** :ref:`int<class_int>` value **)**
  91. - :ref:`int<class_int>` **get_height** **(** **)**
  92. .. container:: contribute
  93. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_GLTFNode_property_joint:
  97. .. rst-class:: classref-property
  98. :ref:`bool<class_bool>` **joint** = ``false``
  99. .. rst-class:: classref-property-setget
  100. - void **set_joint** **(** :ref:`bool<class_bool>` value **)**
  101. - :ref:`bool<class_bool>` **get_joint** **(** **)**
  102. .. container:: contribute
  103. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _class_GLTFNode_property_light:
  107. .. rst-class:: classref-property
  108. :ref:`int<class_int>` **light** = ``-1``
  109. .. rst-class:: classref-property-setget
  110. - void **set_light** **(** :ref:`int<class_int>` value **)**
  111. - :ref:`int<class_int>` **get_light** **(** **)**
  112. .. container:: contribute
  113. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  114. .. rst-class:: classref-item-separator
  115. ----
  116. .. _class_GLTFNode_property_mesh:
  117. .. rst-class:: classref-property
  118. :ref:`int<class_int>` **mesh** = ``-1``
  119. .. rst-class:: classref-property-setget
  120. - void **set_mesh** **(** :ref:`int<class_int>` value **)**
  121. - :ref:`int<class_int>` **get_mesh** **(** **)**
  122. .. container:: contribute
  123. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_GLTFNode_property_parent:
  127. .. rst-class:: classref-property
  128. :ref:`int<class_int>` **parent** = ``-1``
  129. .. rst-class:: classref-property-setget
  130. - void **set_parent** **(** :ref:`int<class_int>` value **)**
  131. - :ref:`int<class_int>` **get_parent** **(** **)**
  132. .. container:: contribute
  133. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  134. .. rst-class:: classref-item-separator
  135. ----
  136. .. _class_GLTFNode_property_position:
  137. .. rst-class:: classref-property
  138. :ref:`Vector3<class_Vector3>` **position** = ``Vector3(0, 0, 0)``
  139. .. rst-class:: classref-property-setget
  140. - void **set_position** **(** :ref:`Vector3<class_Vector3>` value **)**
  141. - :ref:`Vector3<class_Vector3>` **get_position** **(** **)**
  142. .. container:: contribute
  143. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  144. .. rst-class:: classref-item-separator
  145. ----
  146. .. _class_GLTFNode_property_rotation:
  147. .. rst-class:: classref-property
  148. :ref:`Quaternion<class_Quaternion>` **rotation** = ``Quaternion(0, 0, 0, 1)``
  149. .. rst-class:: classref-property-setget
  150. - void **set_rotation** **(** :ref:`Quaternion<class_Quaternion>` value **)**
  151. - :ref:`Quaternion<class_Quaternion>` **get_rotation** **(** **)**
  152. .. container:: contribute
  153. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  154. .. rst-class:: classref-item-separator
  155. ----
  156. .. _class_GLTFNode_property_scale:
  157. .. rst-class:: classref-property
  158. :ref:`Vector3<class_Vector3>` **scale** = ``Vector3(1, 1, 1)``
  159. .. rst-class:: classref-property-setget
  160. - void **set_scale** **(** :ref:`Vector3<class_Vector3>` value **)**
  161. - :ref:`Vector3<class_Vector3>` **get_scale** **(** **)**
  162. .. container:: contribute
  163. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  164. .. rst-class:: classref-item-separator
  165. ----
  166. .. _class_GLTFNode_property_skeleton:
  167. .. rst-class:: classref-property
  168. :ref:`int<class_int>` **skeleton** = ``-1``
  169. .. rst-class:: classref-property-setget
  170. - void **set_skeleton** **(** :ref:`int<class_int>` value **)**
  171. - :ref:`int<class_int>` **get_skeleton** **(** **)**
  172. .. container:: contribute
  173. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  174. .. rst-class:: classref-item-separator
  175. ----
  176. .. _class_GLTFNode_property_skin:
  177. .. rst-class:: classref-property
  178. :ref:`int<class_int>` **skin** = ``-1``
  179. .. rst-class:: classref-property-setget
  180. - void **set_skin** **(** :ref:`int<class_int>` value **)**
  181. - :ref:`int<class_int>` **get_skin** **(** **)**
  182. .. container:: contribute
  183. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  184. .. rst-class:: classref-item-separator
  185. ----
  186. .. _class_GLTFNode_property_xform:
  187. .. rst-class:: classref-property
  188. :ref:`Transform3D<class_Transform3D>` **xform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)``
  189. .. rst-class:: classref-property-setget
  190. - void **set_xform** **(** :ref:`Transform3D<class_Transform3D>` value **)**
  191. - :ref:`Transform3D<class_Transform3D>` **get_xform** **(** **)**
  192. .. container:: contribute
  193. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  194. .. rst-class:: classref-section-separator
  195. ----
  196. .. rst-class:: classref-descriptions-group
  197. Method Descriptions
  198. -------------------
  199. .. _class_GLTFNode_method_get_additional_data:
  200. .. rst-class:: classref-method
  201. :ref:`Variant<class_Variant>` **get_additional_data** **(** :ref:`StringName<class_StringName>` extension_name **)**
  202. Gets additional arbitrary data in this **GLTFNode** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless.
  203. The argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null.
  204. .. rst-class:: classref-item-separator
  205. ----
  206. .. _class_GLTFNode_method_set_additional_data:
  207. .. rst-class:: classref-method
  208. void **set_additional_data** **(** :ref:`StringName<class_StringName>` extension_name, :ref:`Variant<class_Variant>` additional_data **)**
  209. Sets additional arbitrary data in this **GLTFNode** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless.
  210. The first argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want.
  211. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  212. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  213. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  214. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  215. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  216. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`