class_ribbontrailmesh.rst 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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/RibbonTrailMesh.xml.
  6. .. _class_RibbonTrailMesh:
  7. RibbonTrailMesh
  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 ribbon-shaped :ref:`PrimitiveMesh<class_PrimitiveMesh>` with variable width.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **RibbonTrailMesh** represents a straight ribbon-shaped mesh with variable width. The ribbon is composed of a number of flat or cross-shaped sections, each with the same :ref:`section_length<class_RibbonTrailMesh_property_section_length>` and number of :ref:`section_segments<class_RibbonTrailMesh_property_section_segments>`. A :ref:`curve<class_RibbonTrailMesh_property_curve>` is sampled along the total length of the ribbon, meaning that the curve determines the size of the ribbon 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:`Curve<class_Curve>` | :ref:`curve<class_RibbonTrailMesh_property_curve>` | |
  28. +------------------------------------------+--------------------------------------------------------------------------+---------+
  29. | :ref:`float<class_float>` | :ref:`section_length<class_RibbonTrailMesh_property_section_length>` | ``0.2`` |
  30. +------------------------------------------+--------------------------------------------------------------------------+---------+
  31. | :ref:`int<class_int>` | :ref:`section_segments<class_RibbonTrailMesh_property_section_segments>` | ``3`` |
  32. +------------------------------------------+--------------------------------------------------------------------------+---------+
  33. | :ref:`int<class_int>` | :ref:`sections<class_RibbonTrailMesh_property_sections>` | ``5`` |
  34. +------------------------------------------+--------------------------------------------------------------------------+---------+
  35. | :ref:`Shape<enum_RibbonTrailMesh_Shape>` | :ref:`shape<class_RibbonTrailMesh_property_shape>` | ``1`` |
  36. +------------------------------------------+--------------------------------------------------------------------------+---------+
  37. | :ref:`float<class_float>` | :ref:`size<class_RibbonTrailMesh_property_size>` | ``1.0`` |
  38. +------------------------------------------+--------------------------------------------------------------------------+---------+
  39. .. rst-class:: classref-section-separator
  40. ----
  41. .. rst-class:: classref-descriptions-group
  42. Enumerations
  43. ------------
  44. .. _enum_RibbonTrailMesh_Shape:
  45. .. rst-class:: classref-enumeration
  46. enum **Shape**: :ref:`🔗<enum_RibbonTrailMesh_Shape>`
  47. .. _class_RibbonTrailMesh_constant_SHAPE_FLAT:
  48. .. rst-class:: classref-enumeration-constant
  49. :ref:`Shape<enum_RibbonTrailMesh_Shape>` **SHAPE_FLAT** = ``0``
  50. Gives the mesh a single flat face.
  51. .. _class_RibbonTrailMesh_constant_SHAPE_CROSS:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`Shape<enum_RibbonTrailMesh_Shape>` **SHAPE_CROSS** = ``1``
  54. Gives the mesh two perpendicular flat faces, making a cross shape.
  55. .. rst-class:: classref-section-separator
  56. ----
  57. .. rst-class:: classref-descriptions-group
  58. Property Descriptions
  59. ---------------------
  60. .. _class_RibbonTrailMesh_property_curve:
  61. .. rst-class:: classref-property
  62. :ref:`Curve<class_Curve>` **curve** :ref:`🔗<class_RibbonTrailMesh_property_curve>`
  63. .. rst-class:: classref-property-setget
  64. - |void| **set_curve**\ (\ value\: :ref:`Curve<class_Curve>`\ )
  65. - :ref:`Curve<class_Curve>` **get_curve**\ (\ )
  66. Determines the size of the ribbon along its length. The size of a particular section segment is obtained by multiplying the baseline :ref:`size<class_RibbonTrailMesh_property_size>` by the value of this curve at the given distance. For values smaller than ``0``, the faces will be inverted.
  67. .. rst-class:: classref-item-separator
  68. ----
  69. .. _class_RibbonTrailMesh_property_section_length:
  70. .. rst-class:: classref-property
  71. :ref:`float<class_float>` **section_length** = ``0.2`` :ref:`🔗<class_RibbonTrailMesh_property_section_length>`
  72. .. rst-class:: classref-property-setget
  73. - |void| **set_section_length**\ (\ value\: :ref:`float<class_float>`\ )
  74. - :ref:`float<class_float>` **get_section_length**\ (\ )
  75. The length of a section of the ribbon.
  76. .. rst-class:: classref-item-separator
  77. ----
  78. .. _class_RibbonTrailMesh_property_section_segments:
  79. .. rst-class:: classref-property
  80. :ref:`int<class_int>` **section_segments** = ``3`` :ref:`🔗<class_RibbonTrailMesh_property_section_segments>`
  81. .. rst-class:: classref-property-setget
  82. - |void| **set_section_segments**\ (\ value\: :ref:`int<class_int>`\ )
  83. - :ref:`int<class_int>` **get_section_segments**\ (\ )
  84. The number of segments in a section. The :ref:`curve<class_RibbonTrailMesh_property_curve>` is sampled on each segment to determine its size. Higher values result in a more detailed ribbon at the cost of performance.
  85. .. rst-class:: classref-item-separator
  86. ----
  87. .. _class_RibbonTrailMesh_property_sections:
  88. .. rst-class:: classref-property
  89. :ref:`int<class_int>` **sections** = ``5`` :ref:`🔗<class_RibbonTrailMesh_property_sections>`
  90. .. rst-class:: classref-property-setget
  91. - |void| **set_sections**\ (\ value\: :ref:`int<class_int>`\ )
  92. - :ref:`int<class_int>` **get_sections**\ (\ )
  93. The total number of sections on the ribbon.
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _class_RibbonTrailMesh_property_shape:
  97. .. rst-class:: classref-property
  98. :ref:`Shape<enum_RibbonTrailMesh_Shape>` **shape** = ``1`` :ref:`🔗<class_RibbonTrailMesh_property_shape>`
  99. .. rst-class:: classref-property-setget
  100. - |void| **set_shape**\ (\ value\: :ref:`Shape<enum_RibbonTrailMesh_Shape>`\ )
  101. - :ref:`Shape<enum_RibbonTrailMesh_Shape>` **get_shape**\ (\ )
  102. Determines the shape of the ribbon.
  103. .. rst-class:: classref-item-separator
  104. ----
  105. .. _class_RibbonTrailMesh_property_size:
  106. .. rst-class:: classref-property
  107. :ref:`float<class_float>` **size** = ``1.0`` :ref:`🔗<class_RibbonTrailMesh_property_size>`
  108. .. rst-class:: classref-property-setget
  109. - |void| **set_size**\ (\ value\: :ref:`float<class_float>`\ )
  110. - :ref:`float<class_float>` **get_size**\ (\ )
  111. The baseline size of the ribbon. The size of a particular section segment is obtained by multiplying this size by the value of the :ref:`curve<class_RibbonTrailMesh_property_curve>` at the given distance.
  112. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  113. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  114. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  115. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  116. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  117. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  118. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  119. .. |void| replace:: :abbr:`void (No return value.)`