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

namespace Obi
{
	// Token: 0x020004A3 RID: 1187
	[Token(Token = "0x20004A3")]
	public class ObiTerrainShapeTracker : ObiShapeTracker
	{
		// Token: 0x06002A1A RID: 10778 RVA: 0x0005BD40 File Offset: 0x00059F40
		[Token(Token = "0x6002A1A")]
		[Address(RVA = "0xD33050", Offset = "0xD31E50", VA = "0x180D33050")]
		public ObiTerrainShapeTracker(TerrainCollider collider)
		{
			this.oniShape = (IntPtr)((ulong)0L);
			base..ctor();
			this.collider = collider;
			this.adaptor.is2D = false;
			IntPtr intPtr = Oni.CreateShape(Oni.ShapeType.Heightmap);
			this.oniShape = intPtr;
			this.UpdateHeightData();
		}

		// Token: 0x06002A1B RID: 10779 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A1B")]
		[Address(RVA = "0xD32C00", Offset = "0xD31A00", VA = "0x180D32C00")]
		public void UpdateHeightData()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A1C RID: 10780 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002A1C")]
		[Address(RVA = "0xD32E10", Offset = "0xD31C10", VA = "0x180D32E10", Slot = "5")]
		public override void UpdateIfNeeded()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002A1D RID: 10781 RVA: 0x0005BD84 File Offset: 0x00059F84
		[Token(Token = "0x6002A1D")]
		[Address(RVA = "0xD32BB0", Offset = "0xD319B0", VA = "0x180D32BB0", Slot = "4")]
		public override void Destroy()
		{
			Oni.DestroyShape(this.oniShape);
			GCHandle gchandle = this.dataHandle;
			this.oniShape = (IntPtr)((ulong)0L);
			Oni.UnpinMemory(gchandle);
		}

		// Token: 0x04003319 RID: 13081
		[Cpp2IlInjected.FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003319")]
		private Vector3 size;

		// Token: 0x0400331A RID: 13082
		[Cpp2IlInjected.FieldOffset(Offset = "0x6C")]
		[Token(Token = "0x400331A")]
		private int resolutionU;

		// Token: 0x0400331B RID: 13083
		[Cpp2IlInjected.FieldOffset(Offset = "0x70")]
		[Token(Token = "0x400331B")]
		private int resolutionV;

		// Token: 0x0400331C RID: 13084
		[Cpp2IlInjected.FieldOffset(Offset = "0x74")]
		[Token(Token = "0x400331C")]
		private GCHandle dataHandle;

		// Token: 0x0400331D RID: 13085
		[Cpp2IlInjected.FieldOffset(Offset = "0x78")]
		[Token(Token = "0x400331D")]
		private bool heightmapDataHasChanged;
	}
}
