docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Square

    Create a square shape to be extruded along a spline.

    Inheritance
    object
    Square
    Implements
    IExtrudeShape
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Splines.ExtrusionShapes
    Assembly: Unity.Splines.dll
    Syntax
    [Serializable]
    public sealed class Square : IExtrudeShape

    Properties

    SideCount

    How many vertices make up a single ring around the mesh.

    Declaration
    public int SideCount { get; }
    Property Value
    Type Description
    int

    How many vertices make up a revolution for each segment of the extruded mesh.

    See Also
    SplineMesh
    IExtrudeShape
    SplineExtrude

    Methods

    GetPosition(float, int)

    This method is responsible for returning a 2D position of the template shape for each vertex of a single ring around the extruded mesh. Note that both interpolation t and index are provided as a convenience.

    Declaration
    public float2 GetPosition(float t, int index)
    Parameters
    Type Name Description
    float t

    The normalized interpolation [0...1] for a vertex around an extruded ring.

    int index

    The index of the vertex in the extruded ring.

    Returns
    Type Description
    float2

    A 2D position interpolated along a template shape to be extruded. This value will be converted to a 3D point and rotated to align with the spline at the current segment index.

    See Also
    SplineMesh
    IExtrudeShape
    SplineExtrude

    Implements

    IExtrudeShape

    See Also

    SplineMesh
    IExtrudeShape
    SplineExtrude
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)