Struct ArchetypeMaskLarge
Large archetype bitset for >256 archetypes, backed by a ulong[] array.
Same API as ArchetypeMask256 but supports up to 4096 archetypes.
public struct ArchetypeMaskLarge : IArchetypeMask<ArchetypeMaskLarge>
- Implements
- Inherited Members
Constructors
ArchetypeMaskLarge(int)
Create a mask sized for the given maximum archetype ID.
public ArchetypeMaskLarge(int maxArchetypeId)
Parameters
maxArchetypeIdint
Properties
IsEmpty
True if no bits are set.
public readonly bool IsEmpty { get; }
Property Value
MaxId
Maximum archetype ID supported by this mask instance.
public int MaxId { get; }
Property Value
PopCount
Number of set bits.
public readonly int PopCount { get; }
Property Value
Methods
And(in ArchetypeMaskLarge)
Bitwise AND — inclusion filtering.
public readonly ArchetypeMaskLarge And(in ArchetypeMaskLarge other)
Parameters
otherArchetypeMaskLarge
Returns
AndNot(in ArchetypeMaskLarge)
Bitwise AND NOT — exclusion filtering.
public readonly ArchetypeMaskLarge AndNot(in ArchetypeMaskLarge other)
Parameters
otherArchetypeMaskLarge
Returns
Clear(ushort)
Clear the bit for the given archetype ID.
public void Clear(ushort archetypeId)
Parameters
archetypeIdushort
FromArchetype(ushort, int)
Create a mask with a single archetype bit set.
public static ArchetypeMaskLarge FromArchetype(ushort archetypeId, int maxArchetypeId)
Parameters
Returns
FromSubtree(ushort[], int)
Create a mask with bits set for all archetype IDs in the subtree.
public static ArchetypeMaskLarge FromSubtree(ushort[] archetypeIds, int maxArchetypeId)
Parameters
Returns
Or(in ArchetypeMaskLarge)
Bitwise OR — union.
public readonly ArchetypeMaskLarge Or(in ArchetypeMaskLarge other)
Parameters
otherArchetypeMaskLarge
Returns
Set(ushort)
Set the bit for the given archetype ID.
public void Set(ushort archetypeId)
Parameters
archetypeIdushort
Test(ushort)
Test whether the given archetype ID is set.
public readonly bool Test(ushort archetypeId)
Parameters
archetypeIdushort