class_cylindermesh.rst 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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/CylinderMesh.xml.
  6. .. _class_CylinderMesh:
  7. CylinderMesh
  8. ============
  9. **Inherits:** :ref:`PrimitiveMesh<class_PrimitiveMesh>` **<** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Class representing a cylindrical :ref:`PrimitiveMesh<class_PrimitiveMesh>`.
  11. Description
  12. -----------
  13. Class representing a cylindrical :ref:`PrimitiveMesh<class_PrimitiveMesh>`. This class can be used to create cones by setting either the :ref:`top_radius<class_CylinderMesh_property_top_radius>` or :ref:`bottom_radius<class_CylinderMesh_property_bottom_radius>` properties to ``0.0``.
  14. Properties
  15. ----------
  16. +---------------------------+---------------------------------------------------------------------+----------+
  17. | :ref:`float<class_float>` | :ref:`bottom_radius<class_CylinderMesh_property_bottom_radius>` | ``0.5`` |
  18. +---------------------------+---------------------------------------------------------------------+----------+
  19. | :ref:`bool<class_bool>` | :ref:`cap_bottom<class_CylinderMesh_property_cap_bottom>` | ``true`` |
  20. +---------------------------+---------------------------------------------------------------------+----------+
  21. | :ref:`bool<class_bool>` | :ref:`cap_top<class_CylinderMesh_property_cap_top>` | ``true`` |
  22. +---------------------------+---------------------------------------------------------------------+----------+
  23. | :ref:`float<class_float>` | :ref:`height<class_CylinderMesh_property_height>` | ``2.0`` |
  24. +---------------------------+---------------------------------------------------------------------+----------+
  25. | :ref:`int<class_int>` | :ref:`radial_segments<class_CylinderMesh_property_radial_segments>` | ``64`` |
  26. +---------------------------+---------------------------------------------------------------------+----------+
  27. | :ref:`int<class_int>` | :ref:`rings<class_CylinderMesh_property_rings>` | ``4`` |
  28. +---------------------------+---------------------------------------------------------------------+----------+
  29. | :ref:`float<class_float>` | :ref:`top_radius<class_CylinderMesh_property_top_radius>` | ``0.5`` |
  30. +---------------------------+---------------------------------------------------------------------+----------+
  31. Property Descriptions
  32. ---------------------
  33. .. _class_CylinderMesh_property_bottom_radius:
  34. - :ref:`float<class_float>` **bottom_radius**
  35. +-----------+--------------------------+
  36. | *Default* | ``0.5`` |
  37. +-----------+--------------------------+
  38. | *Setter* | set_bottom_radius(value) |
  39. +-----------+--------------------------+
  40. | *Getter* | get_bottom_radius() |
  41. +-----------+--------------------------+
  42. Bottom radius of the cylinder. If set to ``0.0``, the bottom faces will not be generated, resulting in a conic shape. See also :ref:`cap_bottom<class_CylinderMesh_property_cap_bottom>`.
  43. ----
  44. .. _class_CylinderMesh_property_cap_bottom:
  45. - :ref:`bool<class_bool>` **cap_bottom**
  46. +-----------+-----------------------+
  47. | *Default* | ``true`` |
  48. +-----------+-----------------------+
  49. | *Setter* | set_cap_bottom(value) |
  50. +-----------+-----------------------+
  51. | *Getter* | is_cap_bottom() |
  52. +-----------+-----------------------+
  53. If ``true``, generates a cap at the bottom of the cylinder. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. See also :ref:`bottom_radius<class_CylinderMesh_property_bottom_radius>`.
  54. \ **Note:** If :ref:`bottom_radius<class_CylinderMesh_property_bottom_radius>` is ``0.0``, cap generation is always skipped even if :ref:`cap_bottom<class_CylinderMesh_property_cap_bottom>` is ``true``.
  55. ----
  56. .. _class_CylinderMesh_property_cap_top:
  57. - :ref:`bool<class_bool>` **cap_top**
  58. +-----------+--------------------+
  59. | *Default* | ``true`` |
  60. +-----------+--------------------+
  61. | *Setter* | set_cap_top(value) |
  62. +-----------+--------------------+
  63. | *Getter* | is_cap_top() |
  64. +-----------+--------------------+
  65. If ``true``, generates a cap at the top of the cylinder. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. See also :ref:`top_radius<class_CylinderMesh_property_top_radius>`.
  66. \ **Note:** If :ref:`top_radius<class_CylinderMesh_property_top_radius>` is ``0.0``, cap generation is always skipped even if :ref:`cap_top<class_CylinderMesh_property_cap_top>` is ``true``.
  67. ----
  68. .. _class_CylinderMesh_property_height:
  69. - :ref:`float<class_float>` **height**
  70. +-----------+-------------------+
  71. | *Default* | ``2.0`` |
  72. +-----------+-------------------+
  73. | *Setter* | set_height(value) |
  74. +-----------+-------------------+
  75. | *Getter* | get_height() |
  76. +-----------+-------------------+
  77. Full height of the cylinder.
  78. ----
  79. .. _class_CylinderMesh_property_radial_segments:
  80. - :ref:`int<class_int>` **radial_segments**
  81. +-----------+----------------------------+
  82. | *Default* | ``64`` |
  83. +-----------+----------------------------+
  84. | *Setter* | set_radial_segments(value) |
  85. +-----------+----------------------------+
  86. | *Getter* | get_radial_segments() |
  87. +-----------+----------------------------+
  88. Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance.
  89. ----
  90. .. _class_CylinderMesh_property_rings:
  91. - :ref:`int<class_int>` **rings**
  92. +-----------+------------------+
  93. | *Default* | ``4`` |
  94. +-----------+------------------+
  95. | *Setter* | set_rings(value) |
  96. +-----------+------------------+
  97. | *Getter* | get_rings() |
  98. +-----------+------------------+
  99. Number of edge rings along the height of the cylinder. Changing :ref:`rings<class_CylinderMesh_property_rings>` does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, :ref:`rings<class_CylinderMesh_property_rings>` should be kept to its default value.
  100. ----
  101. .. _class_CylinderMesh_property_top_radius:
  102. - :ref:`float<class_float>` **top_radius**
  103. +-----------+-----------------------+
  104. | *Default* | ``0.5`` |
  105. +-----------+-----------------------+
  106. | *Setter* | set_top_radius(value) |
  107. +-----------+-----------------------+
  108. | *Getter* | get_top_radius() |
  109. +-----------+-----------------------+
  110. Top radius of the cylinder. If set to ``0.0``, the top faces will not be generated, resulting in a conic shape. See also :ref:`cap_top<class_CylinderMesh_property_cap_top>`.
  111. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  112. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  113. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  114. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  115. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  116. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`