Collection of hits returned from a physics query. More...
Public Member Functions | |
void | Add (Hit hit, FrameContext context) |
Adds a hit to the list collection. More... | |
void | ExpandCapacity (int newCapacity, FrameContext context) |
Expands the hit collection capacity. More... | |
void | Free (Native.Allocator allocator) |
Frees the values and resets the hit collection metadata. More... | |
void | Reset () |
Resets the HitCollection. More... | |
void | Sort (FPVector2 point) |
Sort all hits in the collection, in ascending order, based on the distance from the Hit.Point to the target point . More... | |
void | SortCastDistance () |
Sort all hits in the collection, in ascending order, based on the Hit.CastDistanceNormalized. More... | |
Hit[] | ToArray () |
Converts the hit collection to a managed array of hits. More... | |
Properties | |
int | Count [get] |
The amount of hits in the collection. More... | |
Hit * | HitsBuffer [get] |
Returns the Hit pointer to the buffer of hits. More... | |
Hit | this[int index] [get] |
Returns a Hit in collection by the index . More... | |
Collection of hits returned from a physics query.
|
inline |
Converts the hit collection to a managed array of hits.
|
inline |
Sort all hits in the collection, in ascending order, based on the distance from the Hit.Point to the target point .
Queries must have the QueryOptions.ComputeDetailedInfo option set in order to compute hit Points and Cast Distance. Include this flag if intending to sort the query results.
|
inline |
Sort all hits in the collection, in ascending order, based on the Hit.CastDistanceNormalized.
Queries must have the QueryOptions.ComputeDetailedInfo option set in order to compute hit Points and Cast Distance. Include this flag if intending to sort the query results.
|
inline |
Frees the values and resets the hit collection metadata.
allocator | The native memory allocator. |
|
inline |
Resets the HitCollection.
|
inline |
Adds a hit to the list collection.
hit | The Hit instance to be added to the collection. |
context | The FrameContext. |
|
inline |
Expands the hit collection capacity.
newCapacity | The amount of new capacity. |
context | The FrameContext. |
|
get |
The amount of hits in the collection.
|
get |
Returns a Hit in collection by the index .
IndexOutOfRangeException | When the specified index is out of the collection boundaries. |