docs.unity3d.com
    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.

    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: UnityEngine.Splines
    Syntax
    [Serializable]
    public struct SplineKnotIndex : IEquatable<SplineKnotIndex>

    Constructors

    SplineKnotIndex(Int32, Int32)

    Creates a new SplineKnotIndex to reference a knot.

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

    The spline index.

    Int32 knot

    The knot index.

    Fields

    Knot

    The index of the knot in the spline.

    Declaration
    public int Knot
    Field Value
    Type Description
    Int32

    Spline

    The index of the spline in the Splines.

    Declaration
    public int Spline
    Field Value
    Type Description
    Int32

    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
    Boolean

    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
    Boolean

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

    Implements
    IEquatable<T>.Equals(T)

    GetHashCode()

    Gets a hash code for this SplineKnotIndex.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for the SplineKnotIndex.

    Overrides
    ValueType.GetHashCode()

    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

    Equality(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
    Boolean

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

    Inequality(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
    Boolean

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

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023