mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
204 lines
8.1 KiB
ReStructuredText
204 lines
8.1 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/RibbonTrailMesh.xml.
|
|
|
|
.. _class_RibbonTrailMesh:
|
|
|
|
RibbonTrailMesh
|
|
===============
|
|
|
|
**Inherits:** :ref:`PrimitiveMesh<class_PrimitiveMesh>` **<** :ref:`Mesh<class_Mesh>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Represents a straight ribbon-shaped :ref:`PrimitiveMesh<class_PrimitiveMesh>` with variable width.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Description
|
|
-----------
|
|
|
|
**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.
|
|
|
|
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:`Curve<class_Curve>` | :ref:`curve<class_RibbonTrailMesh_property_curve>` | |
|
|
+------------------------------------------+--------------------------------------------------------------------------+---------+
|
|
| :ref:`float<class_float>` | :ref:`section_length<class_RibbonTrailMesh_property_section_length>` | ``0.2`` |
|
|
+------------------------------------------+--------------------------------------------------------------------------+---------+
|
|
| :ref:`int<class_int>` | :ref:`section_segments<class_RibbonTrailMesh_property_section_segments>` | ``3`` |
|
|
+------------------------------------------+--------------------------------------------------------------------------+---------+
|
|
| :ref:`int<class_int>` | :ref:`sections<class_RibbonTrailMesh_property_sections>` | ``5`` |
|
|
+------------------------------------------+--------------------------------------------------------------------------+---------+
|
|
| :ref:`Shape<enum_RibbonTrailMesh_Shape>` | :ref:`shape<class_RibbonTrailMesh_property_shape>` | ``1`` |
|
|
+------------------------------------------+--------------------------------------------------------------------------+---------+
|
|
| :ref:`float<class_float>` | :ref:`size<class_RibbonTrailMesh_property_size>` | ``1.0`` |
|
|
+------------------------------------------+--------------------------------------------------------------------------+---------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_RibbonTrailMesh_Shape:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **Shape**: :ref:`🔗<enum_RibbonTrailMesh_Shape>`
|
|
|
|
.. _class_RibbonTrailMesh_constant_SHAPE_FLAT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Shape<enum_RibbonTrailMesh_Shape>` **SHAPE_FLAT** = ``0``
|
|
|
|
Gives the mesh a single flat face.
|
|
|
|
.. _class_RibbonTrailMesh_constant_SHAPE_CROSS:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`Shape<enum_RibbonTrailMesh_Shape>` **SHAPE_CROSS** = ``1``
|
|
|
|
Gives the mesh two perpendicular flat faces, making a cross shape.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_RibbonTrailMesh_property_curve:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Curve<class_Curve>` **curve** :ref:`🔗<class_RibbonTrailMesh_property_curve>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_curve**\ (\ value\: :ref:`Curve<class_Curve>`\ )
|
|
- :ref:`Curve<class_Curve>` **get_curve**\ (\ )
|
|
|
|
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. Should be a unit :ref:`Curve<class_Curve>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_RibbonTrailMesh_property_section_length:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **section_length** = ``0.2`` :ref:`🔗<class_RibbonTrailMesh_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 ribbon.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_RibbonTrailMesh_property_section_segments:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **section_segments** = ``3`` :ref:`🔗<class_RibbonTrailMesh_property_section_segments>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_section_segments**\ (\ value\: :ref:`int<class_int>`\ )
|
|
- :ref:`int<class_int>` **get_section_segments**\ (\ )
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_RibbonTrailMesh_property_sections:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`int<class_int>` **sections** = ``5`` :ref:`🔗<class_RibbonTrailMesh_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 ribbon.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_RibbonTrailMesh_property_shape:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`Shape<enum_RibbonTrailMesh_Shape>` **shape** = ``1`` :ref:`🔗<class_RibbonTrailMesh_property_shape>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_shape**\ (\ value\: :ref:`Shape<enum_RibbonTrailMesh_Shape>`\ )
|
|
- :ref:`Shape<enum_RibbonTrailMesh_Shape>` **get_shape**\ (\ )
|
|
|
|
Determines the shape of the ribbon.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_RibbonTrailMesh_property_size:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **size** = ``1.0`` :ref:`🔗<class_RibbonTrailMesh_property_size>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_size**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_size**\ (\ )
|
|
|
|
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.
|
|
|
|
.. |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.)`
|