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
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
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
GetHashCode()
Gets a hash code for this SplineKnotIndex.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for the SplineKnotIndex. |
Overrides
ToString()
Gets a string representation of a SplineKnotIndex.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string representation of this SplineKnotIndex. |
Overrides
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. |