42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Poly2Tri
|
|
{
|
|
// Token: 0x02000012 RID: 18
|
|
public class ConstrainedPointSet : PointSet
|
|
{
|
|
// Token: 0x17000015 RID: 21
|
|
// (get) Token: 0x060000A0 RID: 160 RVA: 0x0000494D File Offset: 0x00002B4D
|
|
// (set) Token: 0x060000A1 RID: 161 RVA: 0x00004955 File Offset: 0x00002B55
|
|
public int[] EdgeIndex { get; private set; }
|
|
|
|
// Token: 0x060000A2 RID: 162 RVA: 0x0000495E File Offset: 0x00002B5E
|
|
public ConstrainedPointSet(List<TriangulationPoint> points, int[] index)
|
|
: base(points)
|
|
{
|
|
this.EdgeIndex = index;
|
|
}
|
|
|
|
// Token: 0x17000016 RID: 22
|
|
// (get) Token: 0x060000A3 RID: 163 RVA: 0x000048B8 File Offset: 0x00002AB8
|
|
public override TriangulationMode TriangulationMode
|
|
{
|
|
get
|
|
{
|
|
return TriangulationMode.Constrained;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060000A4 RID: 164 RVA: 0x00004970 File Offset: 0x00002B70
|
|
public override void Prepare(TriangulationContext tcx)
|
|
{
|
|
base.Prepare(tcx);
|
|
for (int i = 0; i < this.EdgeIndex.Length; i += 2)
|
|
{
|
|
tcx.NewConstraint(base.Points[this.EdgeIndex[i]], base.Points[this.EdgeIndex[i + 1]]);
|
|
}
|
|
}
|
|
}
|
|
}
|