scripts
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TriangleNet.Data;
|
||||
|
||||
namespace TriangleNet.Geometry
|
||||
{
|
||||
// Token: 0x0200002E RID: 46
|
||||
public class EdgeEnumerator : IEnumerator<Edge>, IDisposable, IEnumerator
|
||||
{
|
||||
// Token: 0x0600017E RID: 382 RVA: 0x00017F30 File Offset: 0x00016130
|
||||
public EdgeEnumerator(Mesh mesh)
|
||||
{
|
||||
this.triangles = mesh.triangles.Values.GetEnumerator();
|
||||
this.triangles.MoveNext();
|
||||
this.tri.triangle = this.triangles.Current;
|
||||
this.tri.orient = 0;
|
||||
}
|
||||
|
||||
// Token: 0x1700006B RID: 107
|
||||
// (get) Token: 0x0600017F RID: 383 RVA: 0x00017F8C File Offset: 0x0001618C
|
||||
public Edge Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000180 RID: 384 RVA: 0x00017F94 File Offset: 0x00016194
|
||||
public void Dispose()
|
||||
{
|
||||
this.triangles.Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x1700006C RID: 108
|
||||
// (get) Token: 0x06000181 RID: 385 RVA: 0x00017F8C File Offset: 0x0001618C
|
||||
object IEnumerator.Current
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.current;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000182 RID: 386 RVA: 0x00017FA4 File Offset: 0x000161A4
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this.tri.triangle == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.current = null;
|
||||
while (this.current == null)
|
||||
{
|
||||
if (this.tri.orient == 3)
|
||||
{
|
||||
if (!this.triangles.MoveNext())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.tri.triangle = this.triangles.Current;
|
||||
this.tri.orient = 0;
|
||||
}
|
||||
this.tri.Sym(ref this.neighbor);
|
||||
if (this.tri.triangle.id < this.neighbor.triangle.id || this.neighbor.triangle == Mesh.dummytri)
|
||||
{
|
||||
this.p1 = this.tri.Org();
|
||||
this.p2 = this.tri.Dest();
|
||||
this.tri.SegPivot(ref this.sub);
|
||||
this.current = new Edge(this.p1.id, this.p2.id, this.sub.seg.boundary);
|
||||
}
|
||||
this.tri.orient = this.tri.orient + 1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x06000183 RID: 387 RVA: 0x000180D2 File Offset: 0x000162D2
|
||||
public void Reset()
|
||||
{
|
||||
this.triangles.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x040000F5 RID: 245
|
||||
private IEnumerator<Triangle> triangles;
|
||||
|
||||
// Token: 0x040000F6 RID: 246
|
||||
private Otri tri;
|
||||
|
||||
// Token: 0x040000F7 RID: 247
|
||||
private Otri neighbor;
|
||||
|
||||
// Token: 0x040000F8 RID: 248
|
||||
private Osub sub;
|
||||
|
||||
// Token: 0x040000F9 RID: 249
|
||||
private Edge current;
|
||||
|
||||
// Token: 0x040000FA RID: 250
|
||||
private Vertex p1;
|
||||
|
||||
// Token: 0x040000FB RID: 251
|
||||
private Vertex p2;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user