class_node3d.rst 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009
  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/doc/classes/Node3D.xml.
  6. .. _class_Node3D:
  7. Node3D
  8. ======
  9. **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`AudioListener3D<class_AudioListener3D>`, :ref:`AudioStreamPlayer3D<class_AudioStreamPlayer3D>`, :ref:`BoneAttachment3D<class_BoneAttachment3D>`, :ref:`Camera3D<class_Camera3D>`, :ref:`CollisionObject3D<class_CollisionObject3D>`, :ref:`CollisionPolygon3D<class_CollisionPolygon3D>`, :ref:`CollisionShape3D<class_CollisionShape3D>`, :ref:`GridMap<class_GridMap>`, :ref:`ImporterMeshInstance3D<class_ImporterMeshInstance3D>`, :ref:`Joint3D<class_Joint3D>`, :ref:`LightmapProbe<class_LightmapProbe>`, :ref:`Marker3D<class_Marker3D>`, :ref:`NavigationLink3D<class_NavigationLink3D>`, :ref:`NavigationRegion3D<class_NavigationRegion3D>`, :ref:`OccluderInstance3D<class_OccluderInstance3D>`, :ref:`OpenXRHand<class_OpenXRHand>`, :ref:`Path3D<class_Path3D>`, :ref:`PathFollow3D<class_PathFollow3D>`, :ref:`RayCast3D<class_RayCast3D>`, :ref:`RemoteTransform3D<class_RemoteTransform3D>`, :ref:`ShapeCast3D<class_ShapeCast3D>`, :ref:`Skeleton3D<class_Skeleton3D>`, :ref:`SpringArm3D<class_SpringArm3D>`, :ref:`VehicleWheel3D<class_VehicleWheel3D>`, :ref:`VisualInstance3D<class_VisualInstance3D>`, :ref:`XRNode3D<class_XRNode3D>`, :ref:`XROrigin3D<class_XROrigin3D>`
  11. Most basic 3D game object, parent of all 3D-related nodes.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Most basic 3D game object, with a :ref:`Transform3D<class_Transform3D>` and visibility settings. All other 3D game objects inherit from Node3D. Use **Node3D** as a parent node to move, scale, rotate and show/hide children in a 3D project.
  16. Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the **Node3D** object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the **Node3D**'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the **Node3D** object itself is referred to as object-local coordinate system.
  17. \ **Note:** Unless otherwise specified, all methods that have angle parameters must have angles specified as *radians*. To convert degrees to radians, use :ref:`@GlobalScope.deg_to_rad<class_@GlobalScope_method_deg_to_rad>`.
  18. .. rst-class:: classref-introduction-group
  19. Tutorials
  20. ---------
  21. - :doc:`Introduction to 3D <../tutorials/3d/introduction_to_3d>`
  22. - `All 3D Demos <https://github.com/godotengine/godot-demo-projects/tree/master/3d>`__
  23. .. rst-class:: classref-reftable-group
  24. Properties
  25. ----------
  26. .. table::
  27. :widths: auto
  28. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  29. | :ref:`Basis<class_Basis>` | :ref:`basis<class_Node3D_property_basis>` | |
  30. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  31. | :ref:`Vector3<class_Vector3>` | :ref:`global_position<class_Node3D_property_global_position>` | |
  32. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  33. | :ref:`Vector3<class_Vector3>` | :ref:`global_rotation<class_Node3D_property_global_rotation>` | |
  34. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  35. | :ref:`Vector3<class_Vector3>` | :ref:`global_rotation_degrees<class_Node3D_property_global_rotation_degrees>` | |
  36. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  37. | :ref:`Transform3D<class_Transform3D>` | :ref:`global_transform<class_Node3D_property_global_transform>` | |
  38. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  39. | :ref:`Vector3<class_Vector3>` | :ref:`position<class_Node3D_property_position>` | ``Vector3(0, 0, 0)`` |
  40. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  41. | :ref:`Quaternion<class_Quaternion>` | :ref:`quaternion<class_Node3D_property_quaternion>` | |
  42. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  43. | :ref:`Vector3<class_Vector3>` | :ref:`rotation<class_Node3D_property_rotation>` | ``Vector3(0, 0, 0)`` |
  44. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  45. | :ref:`Vector3<class_Vector3>` | :ref:`rotation_degrees<class_Node3D_property_rotation_degrees>` | |
  46. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  47. | :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` | :ref:`rotation_edit_mode<class_Node3D_property_rotation_edit_mode>` | ``0`` |
  48. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  49. | :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` | :ref:`rotation_order<class_Node3D_property_rotation_order>` | ``2`` |
  50. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  51. | :ref:`Vector3<class_Vector3>` | :ref:`scale<class_Node3D_property_scale>` | ``Vector3(1, 1, 1)`` |
  52. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`top_level<class_Node3D_property_top_level>` | ``false`` |
  54. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  55. | :ref:`Transform3D<class_Transform3D>` | :ref:`transform<class_Node3D_property_transform>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
  56. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  57. | :ref:`NodePath<class_NodePath>` | :ref:`visibility_parent<class_Node3D_property_visibility_parent>` | ``NodePath("")`` |
  58. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  59. | :ref:`bool<class_bool>` | :ref:`visible<class_Node3D_property_visible>` | ``true`` |
  60. +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+
  61. .. rst-class:: classref-reftable-group
  62. Methods
  63. -------
  64. .. table::
  65. :widths: auto
  66. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`add_gizmo<class_Node3D_method_add_gizmo>` **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo **)** |
  68. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | void | :ref:`clear_gizmos<class_Node3D_method_clear_gizmos>` **(** **)** |
  70. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`clear_subgizmo_selection<class_Node3D_method_clear_subgizmo_selection>` **(** **)** |
  72. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`force_update_transform<class_Node3D_method_force_update_transform>` **(** **)** |
  74. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`Node3DGizmo[]<class_Node3DGizmo>` | :ref:`get_gizmos<class_Node3D_method_get_gizmos>` **(** **)** |const| |
  76. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`Node3D<class_Node3D>` | :ref:`get_parent_node_3d<class_Node3D_method_get_parent_node_3d>` **(** **)** |const| |
  78. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`World3D<class_World3D>` | :ref:`get_world_3d<class_Node3D_method_get_world_3d>` **(** **)** |const| |
  80. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`global_rotate<class_Node3D_method_global_rotate>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |
  82. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`global_scale<class_Node3D_method_global_scale>` **(** :ref:`Vector3<class_Vector3>` scale **)** |
  84. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`global_translate<class_Node3D_method_global_translate>` **(** :ref:`Vector3<class_Vector3>` offset **)** |
  86. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`hide<class_Node3D_method_hide>` **(** **)** |
  88. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`bool<class_bool>` | :ref:`is_local_transform_notification_enabled<class_Node3D_method_is_local_transform_notification_enabled>` **(** **)** |const| |
  90. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`bool<class_bool>` | :ref:`is_scale_disabled<class_Node3D_method_is_scale_disabled>` **(** **)** |const| |
  92. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`bool<class_bool>` | :ref:`is_transform_notification_enabled<class_Node3D_method_is_transform_notification_enabled>` **(** **)** |const| |
  94. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_Node3D_method_is_visible_in_tree>` **(** **)** |const| |
  96. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | void | :ref:`look_at<class_Node3D_method_look_at>` **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)** |
  98. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | void | :ref:`look_at_from_position<class_Node3D_method_look_at_from_position>` **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)** |
  100. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | void | :ref:`orthonormalize<class_Node3D_method_orthonormalize>` **(** **)** |
  102. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | void | :ref:`rotate<class_Node3D_method_rotate>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |
  104. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | void | :ref:`rotate_object_local<class_Node3D_method_rotate_object_local>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |
  106. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | void | :ref:`rotate_x<class_Node3D_method_rotate_x>` **(** :ref:`float<class_float>` angle **)** |
  108. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | void | :ref:`rotate_y<class_Node3D_method_rotate_y>` **(** :ref:`float<class_float>` angle **)** |
  110. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | void | :ref:`rotate_z<class_Node3D_method_rotate_z>` **(** :ref:`float<class_float>` angle **)** |
  112. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | void | :ref:`scale_object_local<class_Node3D_method_scale_object_local>` **(** :ref:`Vector3<class_Vector3>` scale **)** |
  114. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | void | :ref:`set_disable_scale<class_Node3D_method_set_disable_scale>` **(** :ref:`bool<class_bool>` disable **)** |
  116. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | void | :ref:`set_identity<class_Node3D_method_set_identity>` **(** **)** |
  118. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | void | :ref:`set_ignore_transform_notification<class_Node3D_method_set_ignore_transform_notification>` **(** :ref:`bool<class_bool>` enabled **)** |
  120. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | void | :ref:`set_notify_local_transform<class_Node3D_method_set_notify_local_transform>` **(** :ref:`bool<class_bool>` enable **)** |
  122. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | void | :ref:`set_notify_transform<class_Node3D_method_set_notify_transform>` **(** :ref:`bool<class_bool>` enable **)** |
  124. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | void | :ref:`set_subgizmo_selection<class_Node3D_method_set_subgizmo_selection>` **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo, :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)** |
  126. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | void | :ref:`show<class_Node3D_method_show>` **(** **)** |
  128. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | :ref:`Vector3<class_Vector3>` | :ref:`to_global<class_Node3D_method_to_global>` **(** :ref:`Vector3<class_Vector3>` local_point **)** |const| |
  130. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :ref:`Vector3<class_Vector3>` | :ref:`to_local<class_Node3D_method_to_local>` **(** :ref:`Vector3<class_Vector3>` global_point **)** |const| |
  132. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | void | :ref:`translate<class_Node3D_method_translate>` **(** :ref:`Vector3<class_Vector3>` offset **)** |
  134. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | void | :ref:`translate_object_local<class_Node3D_method_translate_object_local>` **(** :ref:`Vector3<class_Vector3>` offset **)** |
  136. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | void | :ref:`update_gizmos<class_Node3D_method_update_gizmos>` **(** **)** |
  138. +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. .. rst-class:: classref-section-separator
  140. ----
  141. .. rst-class:: classref-descriptions-group
  142. Signals
  143. -------
  144. .. _class_Node3D_signal_visibility_changed:
  145. .. rst-class:: classref-signal
  146. **visibility_changed** **(** **)**
  147. Emitted when node visibility changes.
  148. .. rst-class:: classref-section-separator
  149. ----
  150. .. rst-class:: classref-descriptions-group
  151. Enumerations
  152. ------------
  153. .. _enum_Node3D_RotationEditMode:
  154. .. rst-class:: classref-enumeration
  155. enum **RotationEditMode**:
  156. .. _class_Node3D_constant_ROTATION_EDIT_MODE_EULER:
  157. .. rst-class:: classref-enumeration-constant
  158. :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` **ROTATION_EDIT_MODE_EULER** = ``0``
  159. .. _class_Node3D_constant_ROTATION_EDIT_MODE_QUATERNION:
  160. .. rst-class:: classref-enumeration-constant
  161. :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` **ROTATION_EDIT_MODE_QUATERNION** = ``1``
  162. .. _class_Node3D_constant_ROTATION_EDIT_MODE_BASIS:
  163. .. rst-class:: classref-enumeration-constant
  164. :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` **ROTATION_EDIT_MODE_BASIS** = ``2``
  165. .. rst-class:: classref-section-separator
  166. ----
  167. .. rst-class:: classref-descriptions-group
  168. Constants
  169. ---------
  170. .. _class_Node3D_constant_NOTIFICATION_TRANSFORM_CHANGED:
  171. .. rst-class:: classref-constant
  172. **NOTIFICATION_TRANSFORM_CHANGED** = ``2000``
  173. Node3D nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform.
  174. In order for :ref:`NOTIFICATION_TRANSFORM_CHANGED<class_Node3D_constant_NOTIFICATION_TRANSFORM_CHANGED>` to work, users first need to ask for it, with :ref:`set_notify_transform<class_Node3D_method_set_notify_transform>`. The notification is also sent if the node is in the editor context and it has at least one valid gizmo.
  175. .. _class_Node3D_constant_NOTIFICATION_ENTER_WORLD:
  176. .. rst-class:: classref-constant
  177. **NOTIFICATION_ENTER_WORLD** = ``41``
  178. Node3D nodes receives this notification when they are registered to new :ref:`World3D<class_World3D>` resource.
  179. .. _class_Node3D_constant_NOTIFICATION_EXIT_WORLD:
  180. .. rst-class:: classref-constant
  181. **NOTIFICATION_EXIT_WORLD** = ``42``
  182. Node3D nodes receives this notification when they are unregistered from current :ref:`World3D<class_World3D>` resource.
  183. .. _class_Node3D_constant_NOTIFICATION_VISIBILITY_CHANGED:
  184. .. rst-class:: classref-constant
  185. **NOTIFICATION_VISIBILITY_CHANGED** = ``43``
  186. Node3D nodes receives this notification when their visibility changes.
  187. .. _class_Node3D_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED:
  188. .. rst-class:: classref-constant
  189. **NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``44``
  190. Node3D nodes receives this notification when their local transform changes. This is not received when the transform of a parent node is changed.
  191. In order for :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED<class_Node3D_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED>` to work, users first need to ask for it, with :ref:`set_notify_local_transform<class_Node3D_method_set_notify_local_transform>`.
  192. .. rst-class:: classref-section-separator
  193. ----
  194. .. rst-class:: classref-descriptions-group
  195. Property Descriptions
  196. ---------------------
  197. .. _class_Node3D_property_basis:
  198. .. rst-class:: classref-property
  199. :ref:`Basis<class_Basis>` **basis**
  200. .. rst-class:: classref-property-setget
  201. - void **set_basis** **(** :ref:`Basis<class_Basis>` value **)**
  202. - :ref:`Basis<class_Basis>` **get_basis** **(** **)**
  203. Direct access to the 3x3 basis of the :ref:`Transform3D<class_Transform3D>` property.
  204. .. rst-class:: classref-item-separator
  205. ----
  206. .. _class_Node3D_property_global_position:
  207. .. rst-class:: classref-property
  208. :ref:`Vector3<class_Vector3>` **global_position**
  209. .. rst-class:: classref-property-setget
  210. - void **set_global_position** **(** :ref:`Vector3<class_Vector3>` value **)**
  211. - :ref:`Vector3<class_Vector3>` **get_global_position** **(** **)**
  212. Global position of this node. This is equivalent to ``global_transform.origin``.
  213. .. rst-class:: classref-item-separator
  214. ----
  215. .. _class_Node3D_property_global_rotation:
  216. .. rst-class:: classref-property
  217. :ref:`Vector3<class_Vector3>` **global_rotation**
  218. .. rst-class:: classref-property-setget
  219. - void **set_global_rotation** **(** :ref:`Vector3<class_Vector3>` value **)**
  220. - :ref:`Vector3<class_Vector3>` **get_global_rotation** **(** **)**
  221. Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).
  222. \ **Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a :ref:`Vector3<class_Vector3>` data structure not because the rotation is a vector, but only because :ref:`Vector3<class_Vector3>` exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
  223. .. rst-class:: classref-item-separator
  224. ----
  225. .. _class_Node3D_property_global_rotation_degrees:
  226. .. rst-class:: classref-property
  227. :ref:`Vector3<class_Vector3>` **global_rotation_degrees**
  228. .. rst-class:: classref-property-setget
  229. - void **set_global_rotation_degrees** **(** :ref:`Vector3<class_Vector3>` value **)**
  230. - :ref:`Vector3<class_Vector3>` **get_global_rotation_degrees** **(** **)**
  231. Helper property to access :ref:`global_rotation<class_Node3D_property_global_rotation>` in degrees instead of radians.
  232. .. rst-class:: classref-item-separator
  233. ----
  234. .. _class_Node3D_property_global_transform:
  235. .. rst-class:: classref-property
  236. :ref:`Transform3D<class_Transform3D>` **global_transform**
  237. .. rst-class:: classref-property-setget
  238. - void **set_global_transform** **(** :ref:`Transform3D<class_Transform3D>` value **)**
  239. - :ref:`Transform3D<class_Transform3D>` **get_global_transform** **(** **)**
  240. World3D space (global) :ref:`Transform3D<class_Transform3D>` of this node.
  241. .. rst-class:: classref-item-separator
  242. ----
  243. .. _class_Node3D_property_position:
  244. .. rst-class:: classref-property
  245. :ref:`Vector3<class_Vector3>` **position** = ``Vector3(0, 0, 0)``
  246. .. rst-class:: classref-property-setget
  247. - void **set_position** **(** :ref:`Vector3<class_Vector3>` value **)**
  248. - :ref:`Vector3<class_Vector3>` **get_position** **(** **)**
  249. Local position or translation of this node relative to the parent. This is equivalent to ``transform.origin``.
  250. .. rst-class:: classref-item-separator
  251. ----
  252. .. _class_Node3D_property_quaternion:
  253. .. rst-class:: classref-property
  254. :ref:`Quaternion<class_Quaternion>` **quaternion**
  255. .. rst-class:: classref-property-setget
  256. - void **set_quaternion** **(** :ref:`Quaternion<class_Quaternion>` value **)**
  257. - :ref:`Quaternion<class_Quaternion>` **get_quaternion** **(** **)**
  258. Access to the node rotation as a :ref:`Quaternion<class_Quaternion>`. This property is ideal for tweening complex rotations.
  259. .. rst-class:: classref-item-separator
  260. ----
  261. .. _class_Node3D_property_rotation:
  262. .. rst-class:: classref-property
  263. :ref:`Vector3<class_Vector3>` **rotation** = ``Vector3(0, 0, 0)``
  264. .. rst-class:: classref-property-setget
  265. - void **set_rotation** **(** :ref:`Vector3<class_Vector3>` value **)**
  266. - :ref:`Vector3<class_Vector3>` **get_rotation** **(** **)**
  267. Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotaton in the order specified by the :ref:`rotation_order<class_Node3D_property_rotation_order>` property.
  268. \ **Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a :ref:`Vector3<class_Vector3>` data structure not because the rotation is a vector, but only because :ref:`Vector3<class_Vector3>` exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
  269. \ **Note:** This property is edited in the inspector in degrees. If you want to use degrees in a script, use :ref:`rotation_degrees<class_Node3D_property_rotation_degrees>`.
  270. .. rst-class:: classref-item-separator
  271. ----
  272. .. _class_Node3D_property_rotation_degrees:
  273. .. rst-class:: classref-property
  274. :ref:`Vector3<class_Vector3>` **rotation_degrees**
  275. .. rst-class:: classref-property-setget
  276. - void **set_rotation_degrees** **(** :ref:`Vector3<class_Vector3>` value **)**
  277. - :ref:`Vector3<class_Vector3>` **get_rotation_degrees** **(** **)**
  278. Helper property to access :ref:`rotation<class_Node3D_property_rotation>` in degrees instead of radians.
  279. .. rst-class:: classref-item-separator
  280. ----
  281. .. _class_Node3D_property_rotation_edit_mode:
  282. .. rst-class:: classref-property
  283. :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` **rotation_edit_mode** = ``0``
  284. .. rst-class:: classref-property-setget
  285. - void **set_rotation_edit_mode** **(** :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` value **)**
  286. - :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` **get_rotation_edit_mode** **(** **)**
  287. Specify how rotation (and scale) will be presented in the editor.
  288. .. rst-class:: classref-item-separator
  289. ----
  290. .. _class_Node3D_property_rotation_order:
  291. .. rst-class:: classref-property
  292. :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **rotation_order** = ``2``
  293. .. rst-class:: classref-property-setget
  294. - void **set_rotation_order** **(** :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` value **)**
  295. - :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **get_rotation_order** **(** **)**
  296. Specify the axis rotation order of the :ref:`rotation<class_Node3D_property_rotation>` property. The final orientation is constructed by rotating the Euler angles in the order specified by this property.
  297. .. rst-class:: classref-item-separator
  298. ----
  299. .. _class_Node3D_property_scale:
  300. .. rst-class:: classref-property
  301. :ref:`Vector3<class_Vector3>` **scale** = ``Vector3(1, 1, 1)``
  302. .. rst-class:: classref-property-setget
  303. - void **set_scale** **(** :ref:`Vector3<class_Vector3>` value **)**
  304. - :ref:`Vector3<class_Vector3>` **get_scale** **(** **)**
  305. Scale part of the local transformation.
  306. \ **Note:** Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative.
  307. \ **Note:** Not all nodes are visually scaled by the :ref:`scale<class_Node3D_property_scale>` property. For example, :ref:`Light3D<class_Light3D>`\ s are not visually affected by :ref:`scale<class_Node3D_property_scale>`.
  308. .. rst-class:: classref-item-separator
  309. ----
  310. .. _class_Node3D_property_top_level:
  311. .. rst-class:: classref-property
  312. :ref:`bool<class_bool>` **top_level** = ``false``
  313. .. rst-class:: classref-property-setget
  314. - void **set_as_top_level** **(** :ref:`bool<class_bool>` value **)**
  315. - :ref:`bool<class_bool>` **is_set_as_top_level** **(** **)**
  316. If ``true``, the node will not inherit its transformations from its parent. Node transformations are only in global space.
  317. .. rst-class:: classref-item-separator
  318. ----
  319. .. _class_Node3D_property_transform:
  320. .. rst-class:: classref-property
  321. :ref:`Transform3D<class_Transform3D>` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)``
  322. .. rst-class:: classref-property-setget
  323. - void **set_transform** **(** :ref:`Transform3D<class_Transform3D>` value **)**
  324. - :ref:`Transform3D<class_Transform3D>` **get_transform** **(** **)**
  325. Local space :ref:`Transform3D<class_Transform3D>` of this node, with respect to the parent node.
  326. .. rst-class:: classref-item-separator
  327. ----
  328. .. _class_Node3D_property_visibility_parent:
  329. .. rst-class:: classref-property
  330. :ref:`NodePath<class_NodePath>` **visibility_parent** = ``NodePath("")``
  331. .. rst-class:: classref-property-setget
  332. - void **set_visibility_parent** **(** :ref:`NodePath<class_NodePath>` value **)**
  333. - :ref:`NodePath<class_NodePath>` **get_visibility_parent** **(** **)**
  334. Defines the visibility range parent for this node and its subtree. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own :ref:`GeometryInstance3D.visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>`. Nodes hidden via the :ref:`visible<class_Node3D_property_visible>` property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden node or its ancestors into account.
  335. .. rst-class:: classref-item-separator
  336. ----
  337. .. _class_Node3D_property_visible:
  338. .. rst-class:: classref-property
  339. :ref:`bool<class_bool>` **visible** = ``true``
  340. .. rst-class:: classref-property-setget
  341. - void **set_visible** **(** :ref:`bool<class_bool>` value **)**
  342. - :ref:`bool<class_bool>` **is_visible** **(** **)**
  343. If ``true``, this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, :ref:`is_visible_in_tree<class_Node3D_method_is_visible_in_tree>` must return ``true``).
  344. .. rst-class:: classref-section-separator
  345. ----
  346. .. rst-class:: classref-descriptions-group
  347. Method Descriptions
  348. -------------------
  349. .. _class_Node3D_method_add_gizmo:
  350. .. rst-class:: classref-method
  351. void **add_gizmo** **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo **)**
  352. Attach a gizmo to this ``Node3D``.
  353. .. rst-class:: classref-item-separator
  354. ----
  355. .. _class_Node3D_method_clear_gizmos:
  356. .. rst-class:: classref-method
  357. void **clear_gizmos** **(** **)**
  358. Clear all gizmos attached to this ``Node3D``.
  359. .. rst-class:: classref-item-separator
  360. ----
  361. .. _class_Node3D_method_clear_subgizmo_selection:
  362. .. rst-class:: classref-method
  363. void **clear_subgizmo_selection** **(** **)**
  364. Clears subgizmo selection for this node in the editor. Useful when subgizmo IDs become invalid after a property change.
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_Node3D_method_force_update_transform:
  368. .. rst-class:: classref-method
  369. void **force_update_transform** **(** **)**
  370. Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations.
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_Node3D_method_get_gizmos:
  374. .. rst-class:: classref-method
  375. :ref:`Node3DGizmo[]<class_Node3DGizmo>` **get_gizmos** **(** **)** |const|
  376. Returns all the gizmos attached to this ``Node3D``.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_Node3D_method_get_parent_node_3d:
  380. .. rst-class:: classref-method
  381. :ref:`Node3D<class_Node3D>` **get_parent_node_3d** **(** **)** |const|
  382. Returns the parent **Node3D**, or an empty :ref:`Object<class_Object>` if no parent exists or parent is not of type **Node3D**.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_Node3D_method_get_world_3d:
  386. .. rst-class:: classref-method
  387. :ref:`World3D<class_World3D>` **get_world_3d** **(** **)** |const|
  388. Returns the current :ref:`World3D<class_World3D>` resource this **Node3D** node is registered to.
  389. .. rst-class:: classref-item-separator
  390. ----
  391. .. _class_Node3D_method_global_rotate:
  392. .. rst-class:: classref-method
  393. void **global_rotate** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)**
  394. Rotates the global (world) transformation around axis, a unit :ref:`Vector3<class_Vector3>`, by specified angle in radians. The rotation axis is in global coordinate system.
  395. .. rst-class:: classref-item-separator
  396. ----
  397. .. _class_Node3D_method_global_scale:
  398. .. rst-class:: classref-method
  399. void **global_scale** **(** :ref:`Vector3<class_Vector3>` scale **)**
  400. Scales the global (world) transformation by the given :ref:`Vector3<class_Vector3>` scale factors.
  401. .. rst-class:: classref-item-separator
  402. ----
  403. .. _class_Node3D_method_global_translate:
  404. .. rst-class:: classref-method
  405. void **global_translate** **(** :ref:`Vector3<class_Vector3>` offset **)**
  406. Moves the global (world) transformation by :ref:`Vector3<class_Vector3>` offset. The offset is in global coordinate system.
  407. .. rst-class:: classref-item-separator
  408. ----
  409. .. _class_Node3D_method_hide:
  410. .. rst-class:: classref-method
  411. void **hide** **(** **)**
  412. Disables rendering of this node. Changes :ref:`visible<class_Node3D_property_visible>` to ``false``.
  413. .. rst-class:: classref-item-separator
  414. ----
  415. .. _class_Node3D_method_is_local_transform_notification_enabled:
  416. .. rst-class:: classref-method
  417. :ref:`bool<class_bool>` **is_local_transform_notification_enabled** **(** **)** |const|
  418. Returns whether node notifies about its local transformation changes. **Node3D** will not propagate this by default.
  419. .. rst-class:: classref-item-separator
  420. ----
  421. .. _class_Node3D_method_is_scale_disabled:
  422. .. rst-class:: classref-method
  423. :ref:`bool<class_bool>` **is_scale_disabled** **(** **)** |const|
  424. Returns whether this node uses a scale of ``(1, 1, 1)`` or its local transformation scale.
  425. .. rst-class:: classref-item-separator
  426. ----
  427. .. _class_Node3D_method_is_transform_notification_enabled:
  428. .. rst-class:: classref-method
  429. :ref:`bool<class_bool>` **is_transform_notification_enabled** **(** **)** |const|
  430. Returns whether the node notifies about its global and local transformation changes. **Node3D** will not propagate this by default.
  431. .. rst-class:: classref-item-separator
  432. ----
  433. .. _class_Node3D_method_is_visible_in_tree:
  434. .. rst-class:: classref-method
  435. :ref:`bool<class_bool>` **is_visible_in_tree** **(** **)** |const|
  436. Returns ``true`` if the node is present in the :ref:`SceneTree<class_SceneTree>`, its :ref:`visible<class_Node3D_property_visible>` property is ``true`` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree.
  437. .. rst-class:: classref-item-separator
  438. ----
  439. .. _class_Node3D_method_look_at:
  440. .. rst-class:: classref-method
  441. void **look_at** **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)**
  442. Rotates the node so that the local forward axis (-Z) points toward the ``target`` position.
  443. The local up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly.
  444. The ``target`` position cannot be the same as the node's position, the ``up`` vector cannot be zero, and the direction from the node's position to the ``target`` vector cannot be parallel to the ``up`` vector.
  445. Operations take place in global space, which means that the node must be in the scene tree.
  446. .. rst-class:: classref-item-separator
  447. ----
  448. .. _class_Node3D_method_look_at_from_position:
  449. .. rst-class:: classref-method
  450. void **look_at_from_position** **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)**
  451. Moves the node to the specified ``position``, and then rotates the node to point toward the ``target`` as per :ref:`look_at<class_Node3D_method_look_at>`. Operations take place in global space.
  452. .. rst-class:: classref-item-separator
  453. ----
  454. .. _class_Node3D_method_orthonormalize:
  455. .. rst-class:: classref-method
  456. void **orthonormalize** **(** **)**
  457. Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's :ref:`Transform3D<class_Transform3D>`.
  458. .. rst-class:: classref-item-separator
  459. ----
  460. .. _class_Node3D_method_rotate:
  461. .. rst-class:: classref-method
  462. void **rotate** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)**
  463. Rotates the local transformation around axis, a unit :ref:`Vector3<class_Vector3>`, by specified angle in radians.
  464. .. rst-class:: classref-item-separator
  465. ----
  466. .. _class_Node3D_method_rotate_object_local:
  467. .. rst-class:: classref-method
  468. void **rotate_object_local** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)**
  469. Rotates the local transformation around axis, a unit :ref:`Vector3<class_Vector3>`, by specified angle in radians. The rotation axis is in object-local coordinate system.
  470. .. rst-class:: classref-item-separator
  471. ----
  472. .. _class_Node3D_method_rotate_x:
  473. .. rst-class:: classref-method
  474. void **rotate_x** **(** :ref:`float<class_float>` angle **)**
  475. Rotates the local transformation around the X axis by angle in radians.
  476. .. rst-class:: classref-item-separator
  477. ----
  478. .. _class_Node3D_method_rotate_y:
  479. .. rst-class:: classref-method
  480. void **rotate_y** **(** :ref:`float<class_float>` angle **)**
  481. Rotates the local transformation around the Y axis by angle in radians.
  482. .. rst-class:: classref-item-separator
  483. ----
  484. .. _class_Node3D_method_rotate_z:
  485. .. rst-class:: classref-method
  486. void **rotate_z** **(** :ref:`float<class_float>` angle **)**
  487. Rotates the local transformation around the Z axis by angle in radians.
  488. .. rst-class:: classref-item-separator
  489. ----
  490. .. _class_Node3D_method_scale_object_local:
  491. .. rst-class:: classref-method
  492. void **scale_object_local** **(** :ref:`Vector3<class_Vector3>` scale **)**
  493. Scales the local transformation by given 3D scale factors in object-local coordinate system.
  494. .. rst-class:: classref-item-separator
  495. ----
  496. .. _class_Node3D_method_set_disable_scale:
  497. .. rst-class:: classref-method
  498. void **set_disable_scale** **(** :ref:`bool<class_bool>` disable **)**
  499. Sets whether the node uses a scale of ``(1, 1, 1)`` or its local transformation scale. Changes to the local transformation scale are preserved.
  500. .. rst-class:: classref-item-separator
  501. ----
  502. .. _class_Node3D_method_set_identity:
  503. .. rst-class:: classref-method
  504. void **set_identity** **(** **)**
  505. Reset all transformations for this node (sets its :ref:`Transform3D<class_Transform3D>` to the identity matrix).
  506. .. rst-class:: classref-item-separator
  507. ----
  508. .. _class_Node3D_method_set_ignore_transform_notification:
  509. .. rst-class:: classref-method
  510. void **set_ignore_transform_notification** **(** :ref:`bool<class_bool>` enabled **)**
  511. Sets whether the node ignores notification that its transformation (global or local) changed.
  512. .. rst-class:: classref-item-separator
  513. ----
  514. .. _class_Node3D_method_set_notify_local_transform:
  515. .. rst-class:: classref-method
  516. void **set_notify_local_transform** **(** :ref:`bool<class_bool>` enable **)**
  517. Sets whether the node notifies about its local transformation changes. **Node3D** will not propagate this by default.
  518. .. rst-class:: classref-item-separator
  519. ----
  520. .. _class_Node3D_method_set_notify_transform:
  521. .. rst-class:: classref-method
  522. void **set_notify_transform** **(** :ref:`bool<class_bool>` enable **)**
  523. Sets whether the node notifies about its global and local transformation changes. **Node3D** will not propagate this by default, unless it is in the editor context and it has a valid gizmo.
  524. .. rst-class:: classref-item-separator
  525. ----
  526. .. _class_Node3D_method_set_subgizmo_selection:
  527. .. rst-class:: classref-method
  528. void **set_subgizmo_selection** **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo, :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)**
  529. Set subgizmo selection for this node in the editor.
  530. .. rst-class:: classref-item-separator
  531. ----
  532. .. _class_Node3D_method_show:
  533. .. rst-class:: classref-method
  534. void **show** **(** **)**
  535. Enables rendering of this node. Changes :ref:`visible<class_Node3D_property_visible>` to ``true``.
  536. .. rst-class:: classref-item-separator
  537. ----
  538. .. _class_Node3D_method_to_global:
  539. .. rst-class:: classref-method
  540. :ref:`Vector3<class_Vector3>` **to_global** **(** :ref:`Vector3<class_Vector3>` local_point **)** |const|
  541. Transforms ``local_point`` from this node's local space to world space.
  542. .. rst-class:: classref-item-separator
  543. ----
  544. .. _class_Node3D_method_to_local:
  545. .. rst-class:: classref-method
  546. :ref:`Vector3<class_Vector3>` **to_local** **(** :ref:`Vector3<class_Vector3>` global_point **)** |const|
  547. Transforms ``global_point`` from world space to this node's local space.
  548. .. rst-class:: classref-item-separator
  549. ----
  550. .. _class_Node3D_method_translate:
  551. .. rst-class:: classref-method
  552. void **translate** **(** :ref:`Vector3<class_Vector3>` offset **)**
  553. Changes the node's position by the given offset :ref:`Vector3<class_Vector3>`.
  554. Note that the translation ``offset`` is affected by the node's scale, so if scaled by e.g. ``(10, 1, 1)``, a translation by an offset of ``(2, 0, 0)`` would actually add 20 (``2 * 10``) to the X coordinate.
  555. .. rst-class:: classref-item-separator
  556. ----
  557. .. _class_Node3D_method_translate_object_local:
  558. .. rst-class:: classref-method
  559. void **translate_object_local** **(** :ref:`Vector3<class_Vector3>` offset **)**
  560. Changes the node's position by the given offset :ref:`Vector3<class_Vector3>` in local space.
  561. .. rst-class:: classref-item-separator
  562. ----
  563. .. _class_Node3D_method_update_gizmos:
  564. .. rst-class:: classref-method
  565. void **update_gizmos** **(** **)**
  566. Updates all the :ref:`Node3DGizmo<class_Node3DGizmo>`\ s attached to this node.
  567. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  568. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  569. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  570. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  571. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  572. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`