docs.unity3d.com
    目次を表示する/隠す

    Class XRRayInteractor.RaycastHitComparer

    Compares ray cast hits by distance, to sort in ascending order.

    Inheritance
    Object
    XRRayInteractor.RaycastHitComparer
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    protected sealed class RaycastHitComparer : IComparer<RaycastHit>

    Methods

    Compare(RaycastHit, RaycastHit)

    Compares ray cast hits by distance in ascending order.

    Declaration
    public int Compare(RaycastHit a, RaycastHit b)
    Parameters
    Type Name Description
    RaycastHit a

    The first ray cast hit to compare.

    RaycastHit b

    The second ray cast hit to compare.

    Returns
    Type Description
    Int32

    Returns less than 0 if a is closer than b. 0 if a and b are equal. Greater than 0 if b is closer than a.

    Implements
    IComparer<T>.Compare(T, T)
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)