9 private ref array<int> m_BitMasks =
null;
14 return m_BitMasks.Count();
18 int GetBitMask(
int index)
20 return m_BitMasks[
index];
24 void SetBitMask(
int index,
int bitMask)
26 if (
index >= m_BitMasks.Count())
29 m_BitMasks[
index] = bitMask;
35 for (
int b = 0; b < m_BitMasks.Count(); b++)
37 int bitMask = m_BitMasks.Get(b);
46 bool GetBit(
int index)
48 int bitMaskIndex = Math.Floor(
index / 32);
49 int bitInMask = 1 << (
index % 32);
51 int bitMask = m_BitMasks.Get(bitMaskIndex);
53 if (bitMask & bitInMask)
60 void SetBit(
int index,
bool bSet)
62 int bitMaskIndex = Math.Floor(
index / 32);
63 int bitInMask = 1 << (
index % 32);
65 int bitMask = m_BitMasks.Get(bitMaskIndex);
69 bitMask &= ~bitInMask;
70 m_BitMasks.Set(bitMaskIndex, bitMask);
76 int numBitMasks = Math.Ceil(maxBits / 32);
77 m_BitMasks =
new array<int>;
79 for (
int b = 0; b < numBitMasks; b++)