using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using UnityEngine;

namespace Obi
{
	// Token: 0x0200049C RID: 1180
	[Token(Token = "0x200049C")]
	public class ObiEdgeShapeTracker2D : ObiShapeTracker
	{
		// Token: 0x060029FF RID: 10751 RVA: 0x0005BA94 File Offset: 0x00059C94
		[Token(Token = "0x60029FF")]
		[Address(RVA = "0x100EF50", Offset = "0x100DD50", VA = "0x18100EF50")]
		public ObiEdgeShapeTracker2D(EdgeCollider2D collider)
		{
			this.collider = collider;
			this.adaptor.is2D = true;
			IntPtr intPtr = Oni.CreateShape(Oni.ShapeType.EdgeMesh);
			this.oniShape = intPtr;
			this.UpdateEdgeData();
		}

		// Token: 0x06002A00 RID: 10752 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A00")]
		[Address(RVA = "0x100EB80", Offset = "0x100D980", VA = "0x18100EB80")]
		public void UpdateEdgeData()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A01 RID: 10753 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A01")]
		[Address(RVA = "0x100EE00", Offset = "0x100DC00", VA = "0x18100EE00", Slot = "5")]
		public override void UpdateIfNeeded()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A02 RID: 10754 RVA: 0x0005BAD0 File Offset: 0x00059CD0
		[Token(Token = "0x6002A02")]
		[Address(RVA = "0x100EB50", Offset = "0x100D950", VA = "0x18100EB50", Slot = "4")]
		public override void Destroy()
		{
			base.Destroy();
			Oni.UnpinMemory(this.pointsHandle);
			Oni.UnpinMemory(this.indicesHandle);
		}

		// Token: 0x04003304 RID: 13060
		[Cpp2IlInjected.FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003304")]
		private int pointCount;

		// Token: 0x04003305 RID: 13061
		[Cpp2IlInjected.FieldOffset(Offset = "0x64")]
		[Token(Token = "0x4003305")]
		private GCHandle pointsHandle;

		// Token: 0x04003306 RID: 13062
		[Cpp2IlInjected.FieldOffset(Offset = "0x68")]
		[Token(Token = "0x4003306")]
		private GCHandle indicesHandle;

		// Token: 0x04003307 RID: 13063
		[Cpp2IlInjected.FieldOffset(Offset = "0x6C")]
		[Token(Token = "0x4003307")]
		private bool edgeDataHasChanged;
	}
}
