KROYSDOCS
HomeWhat's newv0.1.0
SCRIPTING API / Physics / RaycastBatchBuffer

RaycastBatchBuffer

Reusable storage for allocation-free batched raycast tests.

Kindclass
NamespaceKroys.EngineScripting
Members5
SourceRaycastBatchBuffer.cs
DECLARATION

Declaration

Namespace Kroys.EngineScripting.

Declaration
public sealed class RaycastBatchBuffer
REFERENCE

Members

Constructors
#public RaycastBatchBuffer(int count)
Allocates storage for this many raycasts, reused by every Execute.
constructor
Properties
#public RaycastCommand[] Commands { get; }
The commands to run; fill them before Execute.
property
#public RaycastHit[] Hits { get; }
The results of the last Execute, one per command.
property
#public int Count { get; }
Number of commands the buffer holds.
property
Methods
#public int Execute(int count = -1)
Runs the first count commands (all when negative) and returns how many hit something.
method
Signatures
public RaycastBatchBuffer(int count)
public RaycastCommand[] Commands { get; }
public RaycastHit[] Hits { get; }
public int Count { get; }
public int Execute(int count = -1)

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.