TubeTrailMesh

    Represents a straight tube-shaped PrimitiveMesh with variable width.

    TubeTrailMesh.swift:14
    class TubeTrailMesh

    TubeTrailMesh represents a straight tube-shaped mesh with variable width. The tube is composed of a number of cylindrical sections, each with the same sectionLength and number of sectionRings. A 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.

    Superclasses

    • class PrimitiveMesh

      Base class for all primitive meshes. Handles applying a Material to a primitive mesh.

    Citizens in SwiftGodot

    Conformances

    • protocol CustomStringConvertible

      A type with a customized textual representation.

    • protocol Equatable

      A type that can be compared for value equality.

    • protocol Hashable

      A type that can be hashed into a Hasher to produce an integer hash value.

    • protocol Identifiable<ID>

      A class of types whose instances hold the value of an entity with stable identity.

    • protocol VariantRepresentable

      Types that conform to VariantRepresentable can be stored directly in Variant with no conversion. These include all of the Variant types from Godot (for example GString, Rect, Plane), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.

    • protocol VariantStorable

      Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.

    Type members

    Instance members

    • var capBottom: Bool

      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.

    • var capTop: Bool

      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.

    • var curve: Curve?

      Determines the radius of the tube along its length. The radius of a particular section ring is obtained by multiplying the baseline radius by the value of this curve at the given distance. For values smaller than 0, the faces will be inverted.

    • var radialSteps: Int32

      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.

    • var radius: Double

      The baseline radius of the tube. The radius of a particular section ring is obtained by multiplying this radius by the value of the curve at the given distance.

    • var sectionLength: Double

      The length of a section of the tube.

    • var sectionRings: Int32

      The number of rings in a section. The curve is sampled on each ring to determine its radius. Higher values result in a more detailed tube at the cost of performance.

    • var sections: Int32

      The total number of sections on the tube.