124 lines
2.2 KiB
C#
124 lines
2.2 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Poly2Tri
|
|
{
|
|
// Token: 0x0200001F RID: 31
|
|
public struct FixedBitArray3 : IEnumerable<bool>, IEnumerable
|
|
{
|
|
// Token: 0x17000029 RID: 41
|
|
public bool this[int index]
|
|
{
|
|
get
|
|
{
|
|
switch (index)
|
|
{
|
|
case 0:
|
|
return this._0;
|
|
case 1:
|
|
return this._1;
|
|
case 2:
|
|
return this._2;
|
|
default:
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
}
|
|
set
|
|
{
|
|
switch (index)
|
|
{
|
|
case 0:
|
|
this._0 = value;
|
|
return;
|
|
case 1:
|
|
this._1 = value;
|
|
return;
|
|
case 2:
|
|
this._2 = value;
|
|
return;
|
|
default:
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060000ED RID: 237 RVA: 0x00005324 File Offset: 0x00003524
|
|
public bool Contains(bool value)
|
|
{
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
if (this[i] == value)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// Token: 0x060000EE RID: 238 RVA: 0x0000534C File Offset: 0x0000354C
|
|
public int IndexOf(bool value)
|
|
{
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
if (this[i] == value)
|
|
{
|
|
return i;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
// Token: 0x060000EF RID: 239 RVA: 0x00005374 File Offset: 0x00003574
|
|
public void Clear()
|
|
{
|
|
this._0 = (this._1 = (this._2 = false));
|
|
}
|
|
|
|
// Token: 0x060000F0 RID: 240 RVA: 0x0000539C File Offset: 0x0000359C
|
|
public void Clear(bool value)
|
|
{
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
if (this[i] == value)
|
|
{
|
|
this[i] = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x060000F1 RID: 241 RVA: 0x000053C7 File Offset: 0x000035C7
|
|
private IEnumerable<bool> Enumerate()
|
|
{
|
|
int num;
|
|
for (int i = 0; i < 3; i = num)
|
|
{
|
|
yield return this[i];
|
|
num = i + 1;
|
|
}
|
|
yield break;
|
|
}
|
|
|
|
// Token: 0x060000F2 RID: 242 RVA: 0x000053DC File Offset: 0x000035DC
|
|
public IEnumerator<bool> GetEnumerator()
|
|
{
|
|
return this.Enumerate().GetEnumerator();
|
|
}
|
|
|
|
// Token: 0x060000F3 RID: 243 RVA: 0x000053E9 File Offset: 0x000035E9
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
{
|
|
return this.GetEnumerator();
|
|
}
|
|
|
|
// Token: 0x04000053 RID: 83
|
|
public bool _0;
|
|
|
|
// Token: 0x04000054 RID: 84
|
|
public bool _1;
|
|
|
|
// Token: 0x04000055 RID: 85
|
|
public bool _2;
|
|
}
|
|
}
|