Struct AnyHitCollector<T>
A collector which exits the query as soon as any hit is detected.
Inherited Members
Namespace: Unity.Physics
Syntax
public struct AnyHitCollector<T> : ICollector<T> where T : struct, IQueryResult
Type Parameters
Name | Description |
---|---|
T | Generic type parameter. |
Constructors
AnyHitCollector(Single)
Constructor.
Declaration
public AnyHitCollector(float maxFraction)
Parameters
Type | Name | Description |
---|---|---|
Single | maxFraction | The maximum fraction. |
Properties
EarlyOutOnFirstHit
Gets a value indicating whether the early out on first hit.
Declaration
public readonly bool EarlyOutOnFirstHit { get; }
Property Value
Type | Description |
---|---|
Boolean | True. |
Implements
MaxFraction
Gets the maximum fraction.
Declaration
public readonly float MaxFraction { get; }
Property Value
Type | Description |
---|---|
Single | The maximum fraction. |
Implements
NumHits
Gets the number of hits.
Declaration
public readonly int NumHits { get; }
Property Value
Type | Description |
---|---|
Int32 | The total number of hits. |
Implements
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. |