docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SelectableTangent

    Represents a struct that implements the ISelectableElement interface. Spline selection uses SelectableTangent and handles to easily manipulate spline elements with tools and handles.

    Implements
    ISelectableElement
    IEquatable<ISelectableElement>
    IEquatable<SelectableTangent>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.Splines
    Assembly: Unity.Splines.Editor.dll
    Syntax
    public struct SelectableTangent : ISelectableElement, IEquatable<ISelectableElement>, IEquatable<SelectableTangent>

    Constructors

    SelectableTangent(SplineInfo, int, int)

    Creates a new SelectableTangent object.

    Declaration
    public SelectableTangent(SplineInfo info, int knotIndex, int tangentIndex)
    Parameters
    Type Name Description
    SplineInfo info

    The SplineInfo associated with the tangent.

    int knotIndex

    The index of the knot that the tangent is attached to.

    int tangentIndex

    The index of the tangent. A value of 0 represents an In tangent. A value of 1 represents an Out tangent.

    SelectableTangent(SplineInfo, int, BezierTangent)

    Creates a new SelectableTangent object.

    Declaration
    public SelectableTangent(SplineInfo info, int knotIndex, BezierTangent tangent)
    Parameters
    Type Name Description
    SplineInfo info

    The SplineInfo associated with the tangent.

    int knotIndex

    The index of the knot that the tangent is attached to.

    BezierTangent tangent

    The BezierTangent that represents this tangent.

    Properties

    Direction

    The direction of the tangent in world space.

    Declaration
    public float3 Direction { get; set; }
    Property Value
    Type Description
    float3

    KnotIndex

    The index of the knot in the spline. If the spline element is a tangent, this is the index of the knot that the tangent is attached to.

    Declaration
    public readonly int KnotIndex { get; }
    Property Value
    Type Description
    int

    LocalDirection

    The direction of the tangent in local space.

    Declaration
    public float3 LocalDirection { get; set; }
    Property Value
    Type Description
    float3

    LocalPosition

    The position of the spline element in local space.

    Declaration
    public float3 LocalPosition { get; set; }
    Property Value
    Type Description
    float3

    OppositeTangent

    The opposite tangent on the knot. If this tangent is the In tangent, then the opposite tangent is the Out tangent. If this tangent is the Out tangent, then the opposite tangent is the In tangent.

    Declaration
    public SelectableTangent OppositeTangent { get; }
    Property Value
    Type Description
    SelectableTangent

    Owner

    The knot associated with this tangent.

    Declaration
    public SelectableKnot Owner { get; }
    Property Value
    Type Description
    SelectableKnot

    Position

    The position of the spline element in world space.

    Declaration
    public float3 Position { get; set; }
    Property Value
    Type Description
    float3

    SplineInfo

    The SplineInfo that describes the spline.

    Declaration
    public readonly SplineInfo SplineInfo { get; }
    Property Value
    Type Description
    SplineInfo

    TangentIndex

    The index of the tangent. A value of 0 represents an In tangent. A value of 1 represents an Out tangent.

    Declaration
    public readonly int TangentIndex { get; }
    Property Value
    Type Description
    int

    Methods

    Equals(object)

    Checks if two objects 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 when obj is a SelectableTangent and the values of each instance are identical.

    Overrides
    ValueType.Equals(object)

    Equals(ISelectableElement)

    Checks if two instances of a SplineElement are equal.

    Declaration
    public bool Equals(ISelectableElement other)
    Parameters
    Type Name Description
    ISelectableElement other

    The ISelectableElement to compare against.

    Returns
    Type Description
    bool

    Returns true when other is a SelectableTangent and the values of each instance are identical.

    Equals(SelectableTangent)

    Checks if two instances of SelectableTangent are equal.

    Declaration
    public bool Equals(SelectableTangent other)
    Parameters
    Type Name Description
    SelectableTangent other

    The SelectableTangent to compare against.

    Returns
    Type Description
    bool

    Returns true if the values of each instance are identical.

    GetHashCode()

    Gets a hash code for this tangent.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the SelectableTangent.

    Overrides
    ValueType.GetHashCode()

    IsValid()

    Checks if the element is valid. For example, checks if the spline is not null and the index is valid.

    Declaration
    public bool IsValid()
    Returns
    Type Description
    bool

    Returns true if all fields from the element have valid values.

    Implements

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