class_tubetrailmesh.rst 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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/TubeTrailMesh.xml.
  6. .. _class_TubeTrailMesh:
  7. TubeTrailMesh
  8. =============
  9. **Inherits:** :ref:`PrimitiveMesh<class_PrimitiveMesh>` **<** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Represents a straight tube-shaped :ref:`PrimitiveMesh<class_PrimitiveMesh>` with variable width.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **TubeTrailMesh** represents a straight tube-shaped mesh with variable width. The tube is composed of a number of cylindrical sections, each with the same :ref:`section_length<class_TubeTrailMesh_property_section_length>` and number of :ref:`section_rings<class_TubeTrailMesh_property_section_rings>`. A :ref:`curve<class_TubeTrailMesh_property_curve>` is sampled along the total length of the tube, meaning that the curve determines the radius of the tube along its length.
  15. This primitive mesh is usually used for particle trails.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`3D Particle trails <../tutorials/3d/particles/trails>`
  20. - :doc:`Particle systems (3D) <../tutorials/3d/particles/index>`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +---------------------------+--------------------------------------------------------------------+----------+
  27. | :ref:`bool<class_bool>` | :ref:`cap_bottom<class_TubeTrailMesh_property_cap_bottom>` | ``true`` |
  28. +---------------------------+--------------------------------------------------------------------+----------+
  29. | :ref:`bool<class_bool>` | :ref:`cap_top<class_TubeTrailMesh_property_cap_top>` | ``true`` |
  30. +---------------------------+--------------------------------------------------------------------+----------+
  31. | :ref:`Curve<class_Curve>` | :ref:`curve<class_TubeTrailMesh_property_curve>` | |
  32. +---------------------------+--------------------------------------------------------------------+----------+
  33. | :ref:`int<class_int>` | :ref:`radial_steps<class_TubeTrailMesh_property_radial_steps>` | ``8`` |
  34. +---------------------------+--------------------------------------------------------------------+----------+
  35. | :ref:`float<class_float>` | :ref:`radius<class_TubeTrailMesh_property_radius>` | ``0.5`` |
  36. +---------------------------+--------------------------------------------------------------------+----------+
  37. | :ref:`float<class_float>` | :ref:`section_length<class_TubeTrailMesh_property_section_length>` | ``0.2`` |
  38. +---------------------------+--------------------------------------------------------------------+----------+
  39. | :ref:`int<class_int>` | :ref:`section_rings<class_TubeTrailMesh_property_section_rings>` | ``3`` |
  40. +---------------------------+--------------------------------------------------------------------+----------+
  41. | :ref:`int<class_int>` | :ref:`sections<class_TubeTrailMesh_property_sections>` | ``5`` |
  42. +---------------------------+--------------------------------------------------------------------+----------+
  43. .. rst-class:: classref-section-separator
  44. ----
  45. .. rst-class:: classref-descriptions-group
  46. Property Descriptions
  47. ---------------------
  48. .. _class_TubeTrailMesh_property_cap_bottom:
  49. .. rst-class:: classref-property
  50. :ref:`bool<class_bool>` **cap_bottom** = ``true`` :ref:`🔗<class_TubeTrailMesh_property_cap_bottom>`
  51. .. rst-class:: classref-property-setget
  52. - |void| **set_cap_bottom**\ (\ value\: :ref:`bool<class_bool>`\ )
  53. - :ref:`bool<class_bool>` **is_cap_bottom**\ (\ )
  54. If ``true``, generates a cap at the bottom of the tube. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera.
  55. .. rst-class:: classref-item-separator
  56. ----
  57. .. _class_TubeTrailMesh_property_cap_top:
  58. .. rst-class:: classref-property
  59. :ref:`bool<class_bool>` **cap_top** = ``true`` :ref:`🔗<class_TubeTrailMesh_property_cap_top>`
  60. .. rst-class:: classref-property-setget
  61. - |void| **set_cap_top**\ (\ value\: :ref:`bool<class_bool>`\ )
  62. - :ref:`bool<class_bool>` **is_cap_top**\ (\ )
  63. If ``true``, generates a cap at the top of the tube. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera.
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _class_TubeTrailMesh_property_curve:
  67. .. rst-class:: classref-property
  68. :ref:`Curve<class_Curve>` **curve** :ref:`🔗<class_TubeTrailMesh_property_curve>`
  69. .. rst-class:: classref-property-setget
  70. - |void| **set_curve**\ (\ value\: :ref:`Curve<class_Curve>`\ )
  71. - :ref:`Curve<class_Curve>` **get_curve**\ (\ )
  72. Determines the radius of the tube along its length. The radius of a particular section ring is obtained by multiplying the baseline :ref:`radius<class_TubeTrailMesh_property_radius>` by the value of this curve at the given distance. For values smaller than ``0``, the faces will be inverted.
  73. .. rst-class:: classref-item-separator
  74. ----
  75. .. _class_TubeTrailMesh_property_radial_steps:
  76. .. rst-class:: classref-property
  77. :ref:`int<class_int>` **radial_steps** = ``8`` :ref:`🔗<class_TubeTrailMesh_property_radial_steps>`
  78. .. rst-class:: classref-property-setget
  79. - |void| **set_radial_steps**\ (\ value\: :ref:`int<class_int>`\ )
  80. - :ref:`int<class_int>` **get_radial_steps**\ (\ )
  81. The number of sides on the tube. For example, a value of ``5`` means the tube will be pentagonal. Higher values result in a more detailed tube at the cost of performance.
  82. .. rst-class:: classref-item-separator
  83. ----
  84. .. _class_TubeTrailMesh_property_radius:
  85. .. rst-class:: classref-property
  86. :ref:`float<class_float>` **radius** = ``0.5`` :ref:`🔗<class_TubeTrailMesh_property_radius>`
  87. .. rst-class:: classref-property-setget
  88. - |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ )
  89. - :ref:`float<class_float>` **get_radius**\ (\ )
  90. The baseline radius of the tube. The radius of a particular section ring is obtained by multiplying this radius by the value of the :ref:`curve<class_TubeTrailMesh_property_curve>` at the given distance.
  91. .. rst-class:: classref-item-separator
  92. ----
  93. .. _class_TubeTrailMesh_property_section_length:
  94. .. rst-class:: classref-property
  95. :ref:`float<class_float>` **section_length** = ``0.2`` :ref:`🔗<class_TubeTrailMesh_property_section_length>`
  96. .. rst-class:: classref-property-setget
  97. - |void| **set_section_length**\ (\ value\: :ref:`float<class_float>`\ )
  98. - :ref:`float<class_float>` **get_section_length**\ (\ )
  99. The length of a section of the tube.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_TubeTrailMesh_property_section_rings:
  103. .. rst-class:: classref-property
  104. :ref:`int<class_int>` **section_rings** = ``3`` :ref:`🔗<class_TubeTrailMesh_property_section_rings>`
  105. .. rst-class:: classref-property-setget
  106. - |void| **set_section_rings**\ (\ value\: :ref:`int<class_int>`\ )
  107. - :ref:`int<class_int>` **get_section_rings**\ (\ )
  108. The number of rings in a section. The :ref:`curve<class_TubeTrailMesh_property_curve>` is sampled on each ring to determine its radius. Higher values result in a more detailed tube at the cost of performance.
  109. .. rst-class:: classref-item-separator
  110. ----
  111. .. _class_TubeTrailMesh_property_sections:
  112. .. rst-class:: classref-property
  113. :ref:`int<class_int>` **sections** = ``5`` :ref:`🔗<class_TubeTrailMesh_property_sections>`
  114. .. rst-class:: classref-property-setget
  115. - |void| **set_sections**\ (\ value\: :ref:`int<class_int>`\ )
  116. - :ref:`int<class_int>` **get_sections**\ (\ )
  117. The total number of sections on the tube.
  118. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  119. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  120. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  121. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  122. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  123. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  124. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  125. .. |void| replace:: :abbr:`void (No return value.)`