class_immediatemesh.rst 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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/ImmediateMesh.xml.
  6. .. _class_ImmediateMesh:
  7. ImmediateMesh
  8. =============
  9. **Inherits:** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Mesh optimized for creating geometry manually.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Mesh optimized for creating geometry manually, similar to OpenGL1.x immediate mode.
  15. .. rst-class:: classref-reftable-group
  16. Methods
  17. -------
  18. .. table::
  19. :widths: auto
  20. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`clear_surfaces<class_ImmediateMesh_method_clear_surfaces>` **(** **)** |
  22. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`surface_add_vertex<class_ImmediateMesh_method_surface_add_vertex>` **(** :ref:`Vector3<class_Vector3>` vertex **)** |
  24. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`surface_add_vertex_2d<class_ImmediateMesh_method_surface_add_vertex_2d>` **(** :ref:`Vector2<class_Vector2>` vertex **)** |
  26. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`surface_begin<class_ImmediateMesh_method_surface_begin>` **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive, :ref:`Material<class_Material>` material=null **)** |
  28. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`surface_end<class_ImmediateMesh_method_surface_end>` **(** **)** |
  30. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`surface_set_color<class_ImmediateMesh_method_surface_set_color>` **(** :ref:`Color<class_Color>` color **)** |
  32. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`surface_set_normal<class_ImmediateMesh_method_surface_set_normal>` **(** :ref:`Vector3<class_Vector3>` normal **)** |
  34. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`surface_set_tangent<class_ImmediateMesh_method_surface_set_tangent>` **(** :ref:`Plane<class_Plane>` tangent **)** |
  36. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`surface_set_uv<class_ImmediateMesh_method_surface_set_uv>` **(** :ref:`Vector2<class_Vector2>` uv **)** |
  38. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`surface_set_uv2<class_ImmediateMesh_method_surface_set_uv2>` **(** :ref:`Vector2<class_Vector2>` uv2 **)** |
  40. +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Method Descriptions
  45. -------------------
  46. .. _class_ImmediateMesh_method_clear_surfaces:
  47. .. rst-class:: classref-method
  48. void **clear_surfaces** **(** **)**
  49. Clear all surfaces.
  50. .. rst-class:: classref-item-separator
  51. ----
  52. .. _class_ImmediateMesh_method_surface_add_vertex:
  53. .. rst-class:: classref-method
  54. void **surface_add_vertex** **(** :ref:`Vector3<class_Vector3>` vertex **)**
  55. Add a 3D vertex using the current attributes previously set.
  56. .. rst-class:: classref-item-separator
  57. ----
  58. .. _class_ImmediateMesh_method_surface_add_vertex_2d:
  59. .. rst-class:: classref-method
  60. void **surface_add_vertex_2d** **(** :ref:`Vector2<class_Vector2>` vertex **)**
  61. Add a 2D vertex using the current attributes previously set.
  62. .. rst-class:: classref-item-separator
  63. ----
  64. .. _class_ImmediateMesh_method_surface_begin:
  65. .. rst-class:: classref-method
  66. void **surface_begin** **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive, :ref:`Material<class_Material>` material=null **)**
  67. Begin a new surface.
  68. .. rst-class:: classref-item-separator
  69. ----
  70. .. _class_ImmediateMesh_method_surface_end:
  71. .. rst-class:: classref-method
  72. void **surface_end** **(** **)**
  73. End and commit current surface. Note that surface being created will not be visible until this function is called.
  74. .. rst-class:: classref-item-separator
  75. ----
  76. .. _class_ImmediateMesh_method_surface_set_color:
  77. .. rst-class:: classref-method
  78. void **surface_set_color** **(** :ref:`Color<class_Color>` color **)**
  79. Set the color attribute that will be pushed with the next vertex.
  80. .. rst-class:: classref-item-separator
  81. ----
  82. .. _class_ImmediateMesh_method_surface_set_normal:
  83. .. rst-class:: classref-method
  84. void **surface_set_normal** **(** :ref:`Vector3<class_Vector3>` normal **)**
  85. Set the normal attribute that will be pushed with the next vertex.
  86. .. rst-class:: classref-item-separator
  87. ----
  88. .. _class_ImmediateMesh_method_surface_set_tangent:
  89. .. rst-class:: classref-method
  90. void **surface_set_tangent** **(** :ref:`Plane<class_Plane>` tangent **)**
  91. Set the tangent attribute that will be pushed with the next vertex.
  92. .. rst-class:: classref-item-separator
  93. ----
  94. .. _class_ImmediateMesh_method_surface_set_uv:
  95. .. rst-class:: classref-method
  96. void **surface_set_uv** **(** :ref:`Vector2<class_Vector2>` uv **)**
  97. Set the UV attribute that will be pushed with the next vertex.
  98. .. rst-class:: classref-item-separator
  99. ----
  100. .. _class_ImmediateMesh_method_surface_set_uv2:
  101. .. rst-class:: classref-method
  102. void **surface_set_uv2** **(** :ref:`Vector2<class_Vector2>` uv2 **)**
  103. Set the UV2 attribute that will be pushed with the next vertex.
  104. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  105. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  106. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  107. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  108. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  109. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`