ZLab.Discrete ZLab.Discrete
ZLab.Discrete ZLab.Discrete
Developed by Zeke Zhang

Search Results for

    Edit this page

    Constructor PolylineF

    | Edit this page View Source

    PolylineF()

    Creates an empty polyline. (Invalid)

    Declaration
    public PolylineF()
    Remarks

    You shouldn't use an empty polyline for any meaningful operations. Useful only for initialization or placeholder purposes.

    | Edit this page View Source

    PolylineF(Vector3[])

    Creates a polyline and automatically checks if it is closed.

    Declaration
    public PolylineF(Vector3[] vertices)
    Parameters
    Type Name Description
    Vector3[] vertices

    Array of vertices defining the polyline

    Remarks

    Calculating closedness involves checking the distance between the first and last vertex. This is a simple check but may be inefficient for very large polylines. If you already know the polyline's closedness, consider using the constructor that accepts an explicit closedness parameter.

    | Edit this page View Source

    PolylineF(ReadOnlySpan<Vector3>)

    Creates a polyline and automatically checks if it is closed.

    Declaration
    public PolylineF(ReadOnlySpan<Vector3> vertices)
    Parameters
    Type Name Description
    ReadOnlySpan<Vector3> vertices

    Span of vertices defining the polyline

    Remarks

    Calculating closedness involves checking the distance between the first and last vertex. This is a simple check but may be inefficient for very large polylines. If you already know the polyline's closedness, consider using the constructor that accepts an explicit closedness parameter.

    | Edit this page View Source

    PolylineF(Vector3[], bool)

    Creates a polyline with the given vertices and explicit closedness.

    Declaration
    public PolylineF(Vector3[] vertices, bool isClosed)
    Parameters
    Type Name Description
    Vector3[] vertices

    Array of vertices defining the polyline

    bool isClosed

    Whether the polyline is closed

    Remarks

    This constructor does not check if the first and last vertices are the same when isClosed is true. Use this constructor when you already know the closedness of the polyline to avoid unnecessary computations.

    | Edit this page View Source

    PolylineF(ReadOnlySpan<Vector3>, bool)

    Creates a polyline with the given vertices and explicit closedness.

    Declaration
    public PolylineF(ReadOnlySpan<Vector3> vertices, bool isClosed)
    Parameters
    Type Name Description
    ReadOnlySpan<Vector3> vertices

    Array of vertices defining the polyline

    bool isClosed

    Whether the polyline is closed

    Remarks

    This constructor does not check if the first and last vertices are the same when isClosed is true. Use this constructor when you already know the closedness of the polyline to avoid unnecessary computations.