class_surfacetool.rst 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  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/3.5/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/SurfaceTool.xml.
  6. .. _class_SurfaceTool:
  7. SurfaceTool
  8. ===========
  9. **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Helper tool to create geometry.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. The **SurfaceTool** is used to construct a :ref:`Mesh<class_Mesh>` by specifying vertex attributes individually. It can be used to construct a :ref:`Mesh<class_Mesh>` from a script. All properties except indices need to be added before calling :ref:`add_vertex<class_SurfaceTool_method_add_vertex>`. For example, to add vertex colors and UVs:
  15. ::
  16. var st = SurfaceTool.new()
  17. st.begin(Mesh.PRIMITIVE_TRIANGLES)
  18. st.add_color(Color(1, 0, 0))
  19. st.add_uv(Vector2(0, 0))
  20. st.add_vertex(Vector3(0, 0, 0))
  21. The above **SurfaceTool** now contains one vertex of a triangle which has a UV coordinate and a specified :ref:`Color<class_Color>`. If another vertex were added without calling :ref:`add_uv<class_SurfaceTool_method_add_uv>` or :ref:`add_color<class_SurfaceTool_method_add_color>`, then the last values would be used.
  22. Vertex attributes must be passed **before** calling :ref:`add_vertex<class_SurfaceTool_method_add_vertex>`. Failure to do so will result in an error when committing the vertex information to a mesh.
  23. Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices.
  24. See also :ref:`ArrayMesh<class_ArrayMesh>`, :ref:`ImmediateGeometry<class_ImmediateGeometry>` and :ref:`MeshDataTool<class_MeshDataTool>` for procedural geometry generation.
  25. \ **Note:** Godot uses clockwise `winding order <https://learnopengl.com/Advanced-OpenGL/Face-culling>`__ for front faces of triangle primitive modes.
  26. .. rst-class:: classref-introduction-group
  27. Tutorials
  28. ---------
  29. - `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__
  30. .. rst-class:: classref-reftable-group
  31. Methods
  32. -------
  33. .. table::
  34. :widths: auto
  35. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`add_bones<class_SurfaceTool_method_add_bones>` **(** :ref:`PoolIntArray<class_PoolIntArray>` bones **)** |
  37. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`add_color<class_SurfaceTool_method_add_color>` **(** :ref:`Color<class_Color>` color **)** |
  39. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`add_index<class_SurfaceTool_method_add_index>` **(** :ref:`int<class_int>` index **)** |
  41. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | void | :ref:`add_normal<class_SurfaceTool_method_add_normal>` **(** :ref:`Vector3<class_Vector3>` normal **)** |
  43. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | void | :ref:`add_smooth_group<class_SurfaceTool_method_add_smooth_group>` **(** :ref:`bool<class_bool>` smooth **)** |
  45. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | void | :ref:`add_tangent<class_SurfaceTool_method_add_tangent>` **(** :ref:`Plane<class_Plane>` tangent **)** |
  47. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | void | :ref:`add_triangle_fan<class_SurfaceTool_method_add_triangle_fan>` **(** :ref:`PoolVector3Array<class_PoolVector3Array>` vertices, :ref:`PoolVector2Array<class_PoolVector2Array>` uvs=PoolVector2Array( ), :ref:`PoolColorArray<class_PoolColorArray>` colors=PoolColorArray( ), :ref:`PoolVector2Array<class_PoolVector2Array>` uv2s=PoolVector2Array( ), :ref:`PoolVector3Array<class_PoolVector3Array>` normals=PoolVector3Array( ), :ref:`Array<class_Array>` tangents=[ ] **)** |
  49. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | void | :ref:`add_uv<class_SurfaceTool_method_add_uv>` **(** :ref:`Vector2<class_Vector2>` uv **)** |
  51. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | void | :ref:`add_uv2<class_SurfaceTool_method_add_uv2>` **(** :ref:`Vector2<class_Vector2>` uv2 **)** |
  53. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | void | :ref:`add_vertex<class_SurfaceTool_method_add_vertex>` **(** :ref:`Vector3<class_Vector3>` vertex **)** |
  55. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | void | :ref:`add_weights<class_SurfaceTool_method_add_weights>` **(** :ref:`PoolRealArray<class_PoolRealArray>` weights **)** |
  57. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | void | :ref:`append_from<class_SurfaceTool_method_append_from>` **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`Transform<class_Transform>` transform **)** |
  59. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | void | :ref:`begin<class_SurfaceTool_method_begin>` **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive **)** |
  61. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | void | :ref:`clear<class_SurfaceTool_method_clear>` **(** **)** |
  63. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`commit<class_SurfaceTool_method_commit>` **(** :ref:`ArrayMesh<class_ArrayMesh>` existing=null, :ref:`int<class_int>` flags=2194432 **)** |
  65. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`Array<class_Array>` | :ref:`commit_to_arrays<class_SurfaceTool_method_commit_to_arrays>` **(** **)** |
  67. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | void | :ref:`create_from<class_SurfaceTool_method_create_from>` **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface **)** |
  69. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | void | :ref:`create_from_blend_shape<class_SurfaceTool_method_create_from_blend_shape>` **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`String<class_String>` blend_shape **)** |
  71. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | void | :ref:`deindex<class_SurfaceTool_method_deindex>` **(** **)** |
  73. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | void | :ref:`generate_normals<class_SurfaceTool_method_generate_normals>` **(** :ref:`bool<class_bool>` flip=false **)** |
  75. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | void | :ref:`generate_tangents<class_SurfaceTool_method_generate_tangents>` **(** **)** |
  77. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | void | :ref:`index<class_SurfaceTool_method_index>` **(** **)** |
  79. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | void | :ref:`set_material<class_SurfaceTool_method_set_material>` **(** :ref:`Material<class_Material>` material **)** |
  81. +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. .. rst-class:: classref-section-separator
  83. ----
  84. .. rst-class:: classref-descriptions-group
  85. Method Descriptions
  86. -------------------
  87. .. _class_SurfaceTool_method_add_bones:
  88. .. rst-class:: classref-method
  89. void **add_bones** **(** :ref:`PoolIntArray<class_PoolIntArray>` bones **)**
  90. Specifies an array of bones to use for the *next* vertex. ``bones`` must contain 4 integers.
  91. .. rst-class:: classref-item-separator
  92. ----
  93. .. _class_SurfaceTool_method_add_color:
  94. .. rst-class:: classref-method
  95. void **add_color** **(** :ref:`Color<class_Color>` color **)**
  96. Specifies a :ref:`Color<class_Color>` to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
  97. \ **Note:** The material must have :ref:`SpatialMaterial.vertex_color_use_as_albedo<class_SpatialMaterial_property_vertex_color_use_as_albedo>` enabled for the vertex color to be visible.
  98. .. rst-class:: classref-item-separator
  99. ----
  100. .. _class_SurfaceTool_method_add_index:
  101. .. rst-class:: classref-method
  102. void **add_index** **(** :ref:`int<class_int>` index **)**
  103. Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices.
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _class_SurfaceTool_method_add_normal:
  107. .. rst-class:: classref-method
  108. void **add_normal** **(** :ref:`Vector3<class_Vector3>` normal **)**
  109. Specifies a normal to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
  110. .. rst-class:: classref-item-separator
  111. ----
  112. .. _class_SurfaceTool_method_add_smooth_group:
  113. .. rst-class:: classref-method
  114. void **add_smooth_group** **(** :ref:`bool<class_bool>` smooth **)**
  115. Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation.
  116. .. rst-class:: classref-item-separator
  117. ----
  118. .. _class_SurfaceTool_method_add_tangent:
  119. .. rst-class:: classref-method
  120. void **add_tangent** **(** :ref:`Plane<class_Plane>` tangent **)**
  121. Specifies a tangent to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
  122. .. rst-class:: classref-item-separator
  123. ----
  124. .. _class_SurfaceTool_method_add_triangle_fan:
  125. .. rst-class:: classref-method
  126. void **add_triangle_fan** **(** :ref:`PoolVector3Array<class_PoolVector3Array>` vertices, :ref:`PoolVector2Array<class_PoolVector2Array>` uvs=PoolVector2Array( ), :ref:`PoolColorArray<class_PoolColorArray>` colors=PoolColorArray( ), :ref:`PoolVector2Array<class_PoolVector2Array>` uv2s=PoolVector2Array( ), :ref:`PoolVector3Array<class_PoolVector3Array>` normals=PoolVector3Array( ), :ref:`Array<class_Array>` tangents=[ ] **)**
  127. Inserts a triangle fan made of array data into :ref:`Mesh<class_Mesh>` being constructed.
  128. Requires the primitive type be set to :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`.
  129. .. rst-class:: classref-item-separator
  130. ----
  131. .. _class_SurfaceTool_method_add_uv:
  132. .. rst-class:: classref-method
  133. void **add_uv** **(** :ref:`Vector2<class_Vector2>` uv **)**
  134. Specifies a set of UV coordinates to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
  135. .. rst-class:: classref-item-separator
  136. ----
  137. .. _class_SurfaceTool_method_add_uv2:
  138. .. rst-class:: classref-method
  139. void **add_uv2** **(** :ref:`Vector2<class_Vector2>` uv2 **)**
  140. Specifies an optional second set of UV coordinates to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
  141. .. rst-class:: classref-item-separator
  142. ----
  143. .. _class_SurfaceTool_method_add_vertex:
  144. .. rst-class:: classref-method
  145. void **add_vertex** **(** :ref:`Vector3<class_Vector3>` vertex **)**
  146. Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV).
  147. .. rst-class:: classref-item-separator
  148. ----
  149. .. _class_SurfaceTool_method_add_weights:
  150. .. rst-class:: classref-method
  151. void **add_weights** **(** :ref:`PoolRealArray<class_PoolRealArray>` weights **)**
  152. Specifies weight values to use for the *next* vertex. ``weights`` must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.
  153. .. rst-class:: classref-item-separator
  154. ----
  155. .. _class_SurfaceTool_method_append_from:
  156. .. rst-class:: classref-method
  157. void **append_from** **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`Transform<class_Transform>` transform **)**
  158. Append vertices from a given :ref:`Mesh<class_Mesh>` surface onto the current vertex array with specified :ref:`Transform<class_Transform>`.
  159. \ **Note:** Using :ref:`append_from<class_SurfaceTool_method_append_from>` on a :ref:`Thread<class_Thread>` is much slower as the GPU must communicate data back to the CPU, while also causing the main thread to stall (as OpenGL is not thread-safe). Consider requesting a copy of the mesh, converting it to an :ref:`ArrayMesh<class_ArrayMesh>` and adding vertices manually instead.
  160. .. rst-class:: classref-item-separator
  161. ----
  162. .. _class_SurfaceTool_method_begin:
  163. .. rst-class:: classref-method
  164. void **begin** **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive **)**
  165. Called before adding any vertices. Takes the primitive type as an argument (e.g. :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`).
  166. .. rst-class:: classref-item-separator
  167. ----
  168. .. _class_SurfaceTool_method_clear:
  169. .. rst-class:: classref-method
  170. void **clear** **(** **)**
  171. Clear all information passed into the surface tool so far.
  172. .. rst-class:: classref-item-separator
  173. ----
  174. .. _class_SurfaceTool_method_commit:
  175. .. rst-class:: classref-method
  176. :ref:`ArrayMesh<class_ArrayMesh>` **commit** **(** :ref:`ArrayMesh<class_ArrayMesh>` existing=null, :ref:`int<class_int>` flags=2194432 **)**
  177. Returns a constructed :ref:`ArrayMesh<class_ArrayMesh>` from current information passed in. If an existing :ref:`ArrayMesh<class_ArrayMesh>` is passed in as an argument, will add an extra surface to the existing :ref:`ArrayMesh<class_ArrayMesh>`.
  178. Default flag is :ref:`Mesh.ARRAY_COMPRESS_DEFAULT<class_Mesh_constant_ARRAY_COMPRESS_DEFAULT>` if compression is enabled. If compression is disabled the default flag is :ref:`Mesh.ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION<class_Mesh_constant_ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION>`. See ``ARRAY_COMPRESS_*`` constants in :ref:`ArrayFormat<enum_Mesh_ArrayFormat>` for other flags.
  179. .. rst-class:: classref-item-separator
  180. ----
  181. .. _class_SurfaceTool_method_commit_to_arrays:
  182. .. rst-class:: classref-method
  183. :ref:`Array<class_Array>` **commit_to_arrays** **(** **)**
  184. Commits the data to the same format used by :ref:`ArrayMesh.add_surface_from_arrays<class_ArrayMesh_method_add_surface_from_arrays>`. This way you can further process the mesh data using the :ref:`ArrayMesh<class_ArrayMesh>` API.
  185. .. rst-class:: classref-item-separator
  186. ----
  187. .. _class_SurfaceTool_method_create_from:
  188. .. rst-class:: classref-method
  189. void **create_from** **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface **)**
  190. Creates a vertex array from an existing :ref:`Mesh<class_Mesh>`.
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_SurfaceTool_method_create_from_blend_shape:
  194. .. rst-class:: classref-method
  195. void **create_from_blend_shape** **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`String<class_String>` blend_shape **)**
  196. Creates a vertex array from the specified blend shape of an existing :ref:`Mesh<class_Mesh>`. This can be used to extract a specific pose from a blend shape.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_SurfaceTool_method_deindex:
  200. .. rst-class:: classref-method
  201. void **deindex** **(** **)**
  202. Removes the index array by expanding the vertex array.
  203. .. rst-class:: classref-item-separator
  204. ----
  205. .. _class_SurfaceTool_method_generate_normals:
  206. .. rst-class:: classref-method
  207. void **generate_normals** **(** :ref:`bool<class_bool>` flip=false **)**
  208. Generates normals from vertices so you do not have to do it manually. If ``flip`` is ``true``, the resulting normals will be inverted. :ref:`generate_normals<class_SurfaceTool_method_generate_normals>` should be called *after* generating geometry and *before* committing the mesh using :ref:`commit<class_SurfaceTool_method_commit>` or :ref:`commit_to_arrays<class_SurfaceTool_method_commit_to_arrays>`. For correct display of normal-mapped surfaces, you will also have to generate tangents using :ref:`generate_tangents<class_SurfaceTool_method_generate_tangents>`.
  209. \ **Note:** :ref:`generate_normals<class_SurfaceTool_method_generate_normals>` only works if the primitive type to be set to :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`.
  210. .. rst-class:: classref-item-separator
  211. ----
  212. .. _class_SurfaceTool_method_generate_tangents:
  213. .. rst-class:: classref-method
  214. void **generate_tangents** **(** **)**
  215. Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already (see :ref:`generate_normals<class_SurfaceTool_method_generate_normals>`).
  216. .. rst-class:: classref-item-separator
  217. ----
  218. .. _class_SurfaceTool_method_index:
  219. .. rst-class:: classref-method
  220. void **index** **(** **)**
  221. Shrinks the vertex array by creating an index array. This can improve performance by avoiding vertex reuse.
  222. .. rst-class:: classref-item-separator
  223. ----
  224. .. _class_SurfaceTool_method_set_material:
  225. .. rst-class:: classref-method
  226. void **set_material** **(** :ref:`Material<class_Material>` material **)**
  227. Sets :ref:`Material<class_Material>` to be used by the :ref:`Mesh<class_Mesh>` you are constructing.
  228. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  229. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  230. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  231. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`