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

namespace Obi
{
	// Token: 0x020004FB RID: 1275
	[Token(Token = "0x20004FB")]
	public class ObiTerrainShapeTracker : ObiShapeTracker
	{
		// Token: 0x06002CE3 RID: 11491 RVA: 0x00063104 File Offset: 0x00061304
		[Token(Token = "0x6002CE3")]
		[Address(RVA = "0xE641D0", Offset = "0xE631D0", VA = "0x180E641D0")]
		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: 0x06002CE4 RID: 11492 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CE4")]
		[Address(RVA = "0xE63D80", Offset = "0xE62D80", VA = "0x180E63D80")]
		public void UpdateHeightData()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CE5 RID: 11493 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002CE5")]
		[Address(RVA = "0xE63F90", Offset = "0xE62F90", VA = "0x180E63F90", Slot = "5")]
		public override void UpdateIfNeeded()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002CE6 RID: 11494 RVA: 0x00063148 File Offset: 0x00061348
		[Token(Token = "0x6002CE6")]
		[Address(RVA = "0xE63D30", Offset = "0xE62D30", VA = "0x180E63D30", Slot = "4")]
		public override void Destroy()
		{
			Oni.DestroyShape(this.oniShape);
			GCHandle gchandle = this.dataHandle;
			this.oniShape = (IntPtr)((ulong)0L);
			Oni.UnpinMemory(gchandle);
		}

		// Token: 0x04003603 RID: 13827
		[Cpp2IlInjected.FieldOffset(Offset = "0x60")]
		[Token(Token = "0x4003603")]
		private Vector3 size;

		// Token: 0x04003604 RID: 13828
		[Cpp2IlInjected.FieldOffset(Offset = "0x6C")]
		[Token(Token = "0x4003604")]
		private int resolutionU;

		// Token: 0x04003605 RID: 13829
		[Cpp2IlInjected.FieldOffset(Offset = "0x70")]
		[Token(Token = "0x4003605")]
		private int resolutionV;

		// Token: 0x04003606 RID: 13830
		[Cpp2IlInjected.FieldOffset(Offset = "0x74")]
		[Token(Token = "0x4003606")]
		private GCHandle dataHandle;

		// Token: 0x04003607 RID: 13831
		[Cpp2IlInjected.FieldOffset(Offset = "0x78")]
		[Token(Token = "0x4003607")]
		private bool heightmapDataHasChanged;
	}
}
