Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FilteredIndices.cs 755B

123456789101112131415161718192021
  1. using System.Runtime.CompilerServices;
  2. using Svelto.ECS.DataStructures;
  3. namespace Svelto.ECS
  4. {
  5. public readonly struct FilteredIndices
  6. {
  7. public FilteredIndices(NativeDynamicArrayCast<uint> denseListOfIndicesToEntityComponentArray)
  8. {
  9. _denseListOfIndicesToEntityComponentArray = denseListOfIndicesToEntityComponentArray;
  10. }
  11. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  12. public int Count() => _denseListOfIndicesToEntityComponentArray.Count();
  13. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  14. public uint Get(uint index) => _denseListOfIndicesToEntityComponentArray[index];
  15. readonly NativeDynamicArrayCast<uint> _denseListOfIndicesToEntityComponentArray;
  16. }
  17. }