Photon Quantum 3.0.0

Public Member Functions | Properties | List of all members
Quantum.Physics3D.HitCollection3D Struct Reference

Collection of hit information returned from a physics query. More...

Public Member Functions

void Add (Hit3D hit, FrameContext context)
 Adds a Hit3D object to the HitCollection3D. More...
 
void Free (Native.Allocator allocator)
 Frees a persistent hit collection held by an allocator. More...
 
void Reset ()
 Resets the hit collection by setting its count to 0. More...
 
void Sort (FPVector3 point)
 Sort all hits in the collection, in ascending order, based on the distance from the Hit3D.Point to the target point . More...
 
void SortCastDistance ()
 Sort all hits in the collection, in ascending order, based on the Hit3D.CastDistanceNormalized. More...
 
Hit3D[] ToArray ()
 Converts the collection of hits into a managed array. More...
 

Properties

int Count [get]
 Gets the number of hits in the hit collection. More...
 
Hit3DHitsBuffer [get]
 The buffer containing all hits in the collection. More...
 
Hit3D this[int index] [get]
 Represents a hit result from a physics query at a specific index. More...
 

Detailed Description

Collection of hit information returned from a physics query.

Member Function Documentation

◆ ToArray()

Hit3D [] Quantum.Physics3D.HitCollection3D.ToArray ( )
inline

Converts the collection of hits into a managed array.

Returns
A managed array of hits.

◆ Sort()

void Quantum.Physics3D.HitCollection3D.Sort ( FPVector3  point)
inline

Sort all hits in the collection, in ascending order, based on the distance from the Hit3D.Point to the target point .

◆ SortCastDistance()

void Quantum.Physics3D.HitCollection3D.SortCastDistance ( )
inline

Sort all hits in the collection, in ascending order, based on the Hit3D.CastDistanceNormalized.

◆ Free()

void Quantum.Physics3D.HitCollection3D.Free ( Native.Allocator  allocator)
inline

Frees a persistent hit collection held by an allocator.

Parameters
allocatorThe allocator used for the hit collection.

◆ Reset()

void Quantum.Physics3D.HitCollection3D.Reset ( )
inline

Resets the hit collection by setting its count to 0.

◆ Add()

void Quantum.Physics3D.HitCollection3D.Add ( Hit3D  hit,
FrameContext  context 
)
inline

Adds a Hit3D object to the HitCollection3D.

Parameters
hitThe Hit3D object to add.
contextThe FrameContext object.

Property Documentation

◆ Count

int Quantum.Physics3D.HitCollection3D.Count
get

Gets the number of hits in the hit collection.

The number of hits in the hit collection.

◆ this[int index]

Hit3D Quantum.Physics3D.HitCollection3D.this[int index]
get

Represents a hit result from a physics query at a specific index.

◆ HitsBuffer

Hit3D* Quantum.Physics3D.HitCollection3D.HitsBuffer
get

The buffer containing all hits in the collection.