docs.unity.cn
    Show / Hide Table of Contents

    Struct AllHitsCollector<T>

    A collector which stores every hit.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Physics
    Syntax
    public struct AllHitsCollector<T> : ICollector<T> where T : struct, IQueryResult
    Type Parameters
    Name Description
    T

    Generic type parameter.

    Constructors

    AllHitsCollector(Single, ref NativeList<T>)

    Constructor.

    Declaration
    public AllHitsCollector(float maxFraction, ref NativeList<T> allHits)
    Parameters
    Type Name Description
    Single maxFraction

    The maximum fraction.

    NativeList<T> allHits

    [in,out] all hits.

    Fields

    AllHits

    All hits.

    Declaration
    public NativeList<T> AllHits
    Field Value
    Type Description
    NativeList<T>

    Properties

    EarlyOutOnFirstHit

    Gets a value indicating whether the early out on first hit.

    Declaration
    public readonly bool EarlyOutOnFirstHit { get; }
    Property Value
    Type Description
    Boolean

    False.

    Implements
    ICollector<T>.EarlyOutOnFirstHit

    MaxFraction

    Gets the maximum fraction.

    Declaration
    public readonly float MaxFraction { get; }
    Property Value
    Type Description
    Single

    The maximum fraction.

    Implements
    ICollector<T>.MaxFraction

    NumHits

    Gets the number of hits.

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

    The total number of hits.

    Implements
    ICollector<T>.NumHits

    Methods

    AddHit(T)

    Adds a hit.

    Declaration
    public bool AddHit(T hit)
    Parameters
    Type Name Description
    T hit

    The hit.

    Returns
    Type Description
    Boolean

    True.

    Implements
    ICollector<T>.AddHit(T)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023