mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
211 lines
8.7 KiB
ReStructuredText
211 lines
8.7 KiB
ReStructuredText
: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<class_PrimitiveMesh>` **<** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Represents a straight tube-shaped :ref:`PrimitiveMesh<class_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<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.
|
|
|
|
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<class_bool>` | :ref:`cap_bottom<class_TubeTrailMesh_property_cap_bottom>` | ``true`` |
|
|
+---------------------------+--------------------------------------------------------------------+----------+
|
|
| :ref:`bool<class_bool>` | :ref:`cap_top<class_TubeTrailMesh_property_cap_top>` | ``true`` |
|
|
+---------------------------+--------------------------------------------------------------------+----------+
|
|
| :ref:`Curve<class_Curve>` | :ref:`curve<class_TubeTrailMesh_property_curve>` | |
|
|
+---------------------------+--------------------------------------------------------------------+----------+
|
|
| :ref:`int<class_int>` | :ref:`radial_steps<class_TubeTrailMesh_property_radial_steps>` | ``8`` |
|
|
+---------------------------+--------------------------------------------------------------------+----------+
|
|
| :ref:`float<class_float>` | :ref:`radius<class_TubeTrailMesh_property_radius>` | ``0.5`` |
|
|
+---------------------------+--------------------------------------------------------------------+----------+
|
|
| :ref:`float<class_float>` | :ref:`section_length<class_TubeTrailMesh_property_section_length>` | ``0.2`` |
|
|
+---------------------------+--------------------------------------------------------------------+----------+
|
|
| :ref:`int<class_int>` | :ref:`section_rings<class_TubeTrailMesh_property_section_rings>` | ``3`` |
|
|
+---------------------------+--------------------------------------------------------------------+----------+
|
|
| :ref:`int<class_int>` | :ref:`sections<class_TubeTrailMesh_property_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<class_bool>` **cap_bottom** = ``true`` :ref:`🔗<class_TubeTrailMesh_property_cap_bottom>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_cap_bottom**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_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<class_bool>` **cap_top** = ``true`` :ref:`🔗<class_TubeTrailMesh_property_cap_top>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_cap_top**\ (\ value\: :ref:`bool<class_bool>`\ )
|
|
- :ref:`bool<class_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<class_Curve>` **curve** :ref:`🔗<class_TubeTrailMesh_property_curve>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_curve**\ (\ value\: :ref:`Curve<class_Curve>`\ )
|
|
- :ref:`Curve<class_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<class_TubeTrailMesh_property_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<class_Curve>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TubeTrailMesh_property_radial_steps:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **radial_steps** = ``8`` :ref:`🔗<class_TubeTrailMesh_property_radial_steps>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_radial_steps**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_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<class_float>` **radius** = ``0.5`` :ref:`🔗<class_TubeTrailMesh_property_radius>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_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<class_TubeTrailMesh_property_curve>` at the given distance.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TubeTrailMesh_property_section_length:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **section_length** = ``0.2`` :ref:`🔗<class_TubeTrailMesh_property_section_length>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_section_length**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_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<class_int>` **section_rings** = ``3`` :ref:`🔗<class_TubeTrailMesh_property_section_rings>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_section_rings**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_section_rings**\ (\ )
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_TubeTrailMesh_property_sections:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **sections** = ``5`` :ref:`🔗<class_TubeTrailMesh_property_sections>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_sections**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_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.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |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.)`
|