:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TubeTrailMesh.xml. .. _class_TubeTrailMesh: TubeTrailMesh ============= **Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Represents a straight tube-shaped :ref:`PrimitiveMesh` with variable width. .. rst-class:: classref-introduction-group Description ----------- **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` and number of :ref:`section_rings`. A :ref:`curve` is sampled along the total length of the tube, meaning that the curve determines the radius of the tube along its length. This primitive mesh is usually used for particle trails. .. rst-class:: classref-introduction-group Tutorials --------- - :doc:`3D Particle trails <../tutorials/3d/particles/trails>` - :doc:`Particle systems (3D) <../tutorials/3d/particles/index>` .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------+--------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`cap_bottom` | ``true`` | +---------------------------+--------------------------------------------------------------------+----------+ | :ref:`bool` | :ref:`cap_top` | ``true`` | +---------------------------+--------------------------------------------------------------------+----------+ | :ref:`Curve` | :ref:`curve` | | +---------------------------+--------------------------------------------------------------------+----------+ | :ref:`int` | :ref:`radial_steps` | ``8`` | +---------------------------+--------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`radius` | ``0.5`` | +---------------------------+--------------------------------------------------------------------+----------+ | :ref:`float` | :ref:`section_length` | ``0.2`` | +---------------------------+--------------------------------------------------------------------+----------+ | :ref:`int` | :ref:`section_rings` | ``3`` | +---------------------------+--------------------------------------------------------------------+----------+ | :ref:`int` | :ref:`sections` | ``5`` | +---------------------------+--------------------------------------------------------------------+----------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_TubeTrailMesh_property_cap_bottom: .. rst-class:: classref-property :ref:`bool` **cap_bottom** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_cap_bottom**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_cap_bottom**\ (\ ) 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. .. rst-class:: classref-item-separator ---- .. _class_TubeTrailMesh_property_cap_top: .. rst-class:: classref-property :ref:`bool` **cap_top** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_cap_top**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_cap_top**\ (\ ) 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. .. rst-class:: classref-item-separator ---- .. _class_TubeTrailMesh_property_curve: .. rst-class:: classref-property :ref:`Curve` **curve** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_curve**\ (\ value\: :ref:`Curve`\ ) - :ref:`Curve` **get_curve**\ (\ ) Determines the radius of the tube along its length. The radius of a particular section ring is obtained by multiplying the baseline :ref:`radius` by the value of this curve at the given distance. For values smaller than ``0``, the faces will be inverted. Should be a unit :ref:`Curve`. .. rst-class:: classref-item-separator ---- .. _class_TubeTrailMesh_property_radial_steps: .. rst-class:: classref-property :ref:`int` **radial_steps** = ``8`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_radial_steps**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_radial_steps**\ (\ ) 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. .. rst-class:: classref-item-separator ---- .. _class_TubeTrailMesh_property_radius: .. rst-class:: classref-property :ref:`float` **radius** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_radius**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_radius**\ (\ ) 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` at the given distance. .. rst-class:: classref-item-separator ---- .. _class_TubeTrailMesh_property_section_length: .. rst-class:: classref-property :ref:`float` **section_length** = ``0.2`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_section_length**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_section_length**\ (\ ) The length of a section of the tube. .. rst-class:: classref-item-separator ---- .. _class_TubeTrailMesh_property_section_rings: .. rst-class:: classref-property :ref:`int` **section_rings** = ``3`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_section_rings**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_section_rings**\ (\ ) The number of rings in a section. The :ref:`curve` is sampled on each ring to determine its radius. Higher values result in a more detailed tube at the cost of performance. .. rst-class:: classref-item-separator ---- .. _class_TubeTrailMesh_property_sections: .. rst-class:: classref-property :ref:`int` **sections** = ``5`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_sections**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_sections**\ (\ ) The total number of sections on the tube. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`