docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SplineKnotIndex

    Provides a tuple to define a couple (Spline index, Knot index) that identifies a particular knot on a spline. This tuple is used by KnotLinkCollection to maintain links between knots.

    Implements
    IEquatable<SplineKnotIndex>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Splines
    Assembly: Unity.Splines.dll
    Syntax
    [Serializable]
    public struct SplineKnotIndex : IEquatable<SplineKnotIndex>

    Constructors

    SplineKnotIndex(int, int)

    Creates a new SplineKnotIndex to reference a knot.

    Declaration
    public SplineKnotIndex(int spline, int knot)
    Parameters
    Type Name Description
    int spline

    The spline index.

    int knot

    The knot index.

    Fields

    Invalid

    Represents the default value for an invalid index.

    Declaration
    public static SplineKnotIndex Invalid
    Field Value
    Type Description
    SplineKnotIndex

    Knot

    The index of the knot in the spline.

    Declaration
    public int Knot
    Field Value
    Type Description
    int

    Spline

    The index of the spline in the Splines.

    Declaration
    public int Spline
    Field Value
    Type Description
    int

    Methods

    Equals(object)

    Checks if two indices are equal.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare against.

    Returns
    Type Description
    bool

    Returns true if the object is a SplineKnotIndex and the indices reference the same knot on the same spline, false otherwise.

    Overrides
    ValueType.Equals(object)

    Equals(SplineKnotIndex)

    Checks if two indices are equal.

    Declaration
    public bool Equals(SplineKnotIndex otherIndex)
    Parameters
    Type Name Description
    SplineKnotIndex otherIndex

    The index to compare against.

    Returns
    Type Description
    bool

    Returns true if the indices reference the same knot on the same spline, false otherwise.

    GetHashCode()

    Gets a hash code for this SplineKnotIndex.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the SplineKnotIndex.

    Overrides
    ValueType.GetHashCode()

    IsValid()

    Checks if an index is greater than or equal to 0.

    Declaration
    public bool IsValid()
    Returns
    Type Description
    bool

    Returns true if the indices are greater than or equal to 0, false otherwise.

    ToString()

    Gets a string representation of a SplineKnotIndex.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of this SplineKnotIndex.

    Overrides
    ValueType.ToString()

    Operators

    operator ==(SplineKnotIndex, SplineKnotIndex)

    Checks if two indices are equal.

    Declaration
    public static bool operator ==(SplineKnotIndex indexA, SplineKnotIndex indexB)
    Parameters
    Type Name Description
    SplineKnotIndex indexA

    The first index.

    SplineKnotIndex indexB

    The second index.

    Returns
    Type Description
    bool

    Returns true if the indices reference the same knot on the same spline, false otherwise.

    operator !=(SplineKnotIndex, SplineKnotIndex)

    Checks if two indices are not equal.

    Declaration
    public static bool operator !=(SplineKnotIndex indexA, SplineKnotIndex indexB)
    Parameters
    Type Name Description
    SplineKnotIndex indexA

    The first index.

    SplineKnotIndex indexB

    The second index.

    Returns
    Type Description
    bool

    Returns false if the indices reference the same knot on the same spline, true otherwise.

    Implements

    IEquatable<T>
    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)