81 lines
2.1 KiB
C#
81 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace ProBuilder2.Common
|
|
{
|
|
// Token: 0x0200004D RID: 77
|
|
public class pb_EdgeLookup : IEquatable<pb_EdgeLookup>
|
|
{
|
|
// Token: 0x06000255 RID: 597 RVA: 0x0001EF50 File Offset: 0x0001D350
|
|
public pb_EdgeLookup(pb_Edge common, pb_Edge local)
|
|
{
|
|
this.common = common;
|
|
this.local = local;
|
|
}
|
|
|
|
// Token: 0x06000256 RID: 598 RVA: 0x0001EF66 File Offset: 0x0001D366
|
|
public pb_EdgeLookup(int cx, int cy, int x, int y)
|
|
{
|
|
this.common = new pb_Edge(cx, cy);
|
|
this.local = new pb_Edge(x, y);
|
|
}
|
|
|
|
// Token: 0x06000257 RID: 599 RVA: 0x0001EF89 File Offset: 0x0001D389
|
|
public bool Equals(pb_EdgeLookup b)
|
|
{
|
|
return this.common.Equals(b.common);
|
|
}
|
|
|
|
// Token: 0x06000258 RID: 600 RVA: 0x0001EF9C File Offset: 0x0001D39C
|
|
public override bool Equals(object b)
|
|
{
|
|
pb_EdgeLookup pb_EdgeLookup = b as pb_EdgeLookup;
|
|
return pb_EdgeLookup != null && this.common.Equals(pb_EdgeLookup.common);
|
|
}
|
|
|
|
// Token: 0x06000259 RID: 601 RVA: 0x0001EFD0 File Offset: 0x0001D3D0
|
|
public static bool operator ==(pb_EdgeLookup a, pb_EdgeLookup b)
|
|
{
|
|
return a.Equals(b);
|
|
}
|
|
|
|
// Token: 0x0600025A RID: 602 RVA: 0x0001EFD9 File Offset: 0x0001D3D9
|
|
public static bool operator !=(pb_EdgeLookup a, pb_EdgeLookup b)
|
|
{
|
|
return !a.Equals(b);
|
|
}
|
|
|
|
// Token: 0x0600025B RID: 603 RVA: 0x0001EFE5 File Offset: 0x0001D3E5
|
|
public override int GetHashCode()
|
|
{
|
|
return this.common.GetHashCode();
|
|
}
|
|
|
|
// Token: 0x0600025C RID: 604 RVA: 0x0001EFF4 File Offset: 0x0001D3F4
|
|
public override string ToString()
|
|
{
|
|
return string.Format("c({0}, {1}) l({2}, {3}) > {4}", new object[]
|
|
{
|
|
this.common.x,
|
|
this.common.y,
|
|
this.local.x,
|
|
this.local.y,
|
|
this.GetHashCode()
|
|
});
|
|
}
|
|
|
|
// Token: 0x0600025D RID: 605 RVA: 0x0001F06C File Offset: 0x0001D46C
|
|
public static IEnumerable<pb_EdgeLookup> GetEdgeLookup(IEnumerable<pb_Edge> edges, Dictionary<int, int> lookup)
|
|
{
|
|
return edges.Select((pb_Edge x) => new pb_EdgeLookup(new pb_Edge(lookup[x.x], lookup[x.y]), x));
|
|
}
|
|
|
|
// Token: 0x040001B3 RID: 435
|
|
public pb_Edge local;
|
|
|
|
// Token: 0x040001B4 RID: 436
|
|
public pb_Edge common;
|
|
}
|
|
}
|