using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppSystem;
using UnityEngine;

namespace Obi
{
	// Token: 0x02000537 RID: 1335
	public class ObiEmitterMaterial : ScriptableObject
	{
		// Token: 0x060097EB RID: 38891 RVA: 0x00271C94 File Offset: 0x0026FE94
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 643759, RefRangeEnd = 643762, XrefRangeStart = 643750, XrefRangeEnd = 643759, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void add_OnChangesMade(EventHandler<ObiEmitterMaterial.MaterialChangeEventArgs> value)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(value);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiEmitterMaterial.NativeMethodInfoPtr_add_OnChangesMade_Public_add_Void_EventHandler_1_MaterialChangeEventArgs_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x060097EC RID: 38892 RVA: 0x00271CF0 File Offset: 0x0026FEF0
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 643767, RefRangeEnd = 643769, XrefRangeStart = 643762, XrefRangeEnd = 643767, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void remove_OnChangesMade(EventHandler<ObiEmitterMaterial.MaterialChangeEventArgs> value)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(value);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiEmitterMaterial.NativeMethodInfoPtr_remove_OnChangesMade_Public_rem_Void_EventHandler_1_MaterialChangeEventArgs_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x060097ED RID: 38893 RVA: 0x00271D4C File Offset: 0x0026FF4C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 643769, XrefRangeEnd = 643776, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void CommitChanges(ObiEmitterMaterial.MaterialChanges changes)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref changes;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiEmitterMaterial.NativeMethodInfoPtr_CommitChanges_Public_Void_MaterialChanges_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

		// Token: 0x060097EE RID: 38894 RVA: 0x00271DA0 File Offset: 0x0026FFA0
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 643776, XrefRangeEnd = 643778, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe float GetParticleSize(Oni.SolverParameters.Mode mode)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref mode;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiEmitterMaterial.NativeMethodInfoPtr_GetParticleSize_Public_Single_Mode_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x060097EF RID: 38895 RVA: 0x00271E04 File Offset: 0x00270004
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 643781, RefRangeEnd = 643783, XrefRangeStart = 643778, XrefRangeEnd = 643781, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe float GetParticleMass(Oni.SolverParameters.Mode mode)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref mode;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiEmitterMaterial.NativeMethodInfoPtr_GetParticleMass_Public_Single_Mode_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x060097F0 RID: 38896 RVA: 0x00271E68 File Offset: 0x00270068
		[CallerCount(0)]
		public unsafe virtual Oni.FluidMaterial GetEquivalentOniMaterial(Oni.SolverParameters.Mode mode)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref mode;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IL2CPP.il2cpp_object_get_virtual_method(IL2CPP.Il2CppObjectBaseToPtr(this), ObiEmitterMaterial.NativeMethodInfoPtr_GetEquivalentOniMaterial_Public_Abstract_Virtual_New_FluidMaterial_Mode_0), IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return *IL2CPP.il2cpp_object_unbox(intPtr);
			}
		}

		// Token: 0x060097F1 RID: 38897 RVA: 0x00271ED8 File Offset: 0x002700D8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 643783, XrefRangeEnd = 643784, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe ObiEmitterMaterial()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiEmitterMaterial.NativeMethodInfoPtr__ctor_Protected_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x060097F2 RID: 38898 RVA: 0x00271F24 File Offset: 0x00270124
		// Note: this type is marked as 'beforefieldinit'.
		static ObiEmitterMaterial()
		{
			Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "Obi", "ObiEmitterMaterial");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr);
			ObiEmitterMaterial.NativeFieldInfoPtr_resolution = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, "resolution");
			ObiEmitterMaterial.NativeFieldInfoPtr_restDensity = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, "restDensity");
			ObiEmitterMaterial.NativeFieldInfoPtr_onChangesMade = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, "onChangesMade");
			ObiEmitterMaterial.NativeMethodInfoPtr_add_OnChangesMade_Public_add_Void_EventHandler_1_MaterialChangeEventArgs_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100675131);
			ObiEmitterMaterial.NativeMethodInfoPtr_remove_OnChangesMade_Public_rem_Void_EventHandler_1_MaterialChangeEventArgs_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100675132);
			ObiEmitterMaterial.NativeMethodInfoPtr_CommitChanges_Public_Void_MaterialChanges_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100675133);
			ObiEmitterMaterial.NativeMethodInfoPtr_GetParticleSize_Public_Single_Mode_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100675134);
			ObiEmitterMaterial.NativeMethodInfoPtr_GetParticleMass_Public_Single_Mode_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100675135);
			ObiEmitterMaterial.NativeMethodInfoPtr_GetEquivalentOniMaterial_Public_Abstract_Virtual_New_FluidMaterial_Mode_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100675136);
			ObiEmitterMaterial.NativeMethodInfoPtr__ctor_Protected_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100675137);
		}

		// Token: 0x060097F3 RID: 38899 RVA: 0x00009E64 File Offset: 0x00008064
		public ObiEmitterMaterial(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x1700335B RID: 13147
		// (get) Token: 0x060097F4 RID: 38900 RVA: 0x0027201C File Offset: 0x0027021C
		// (set) Token: 0x060097F5 RID: 38901 RVA: 0x00272044 File Offset: 0x00270244
		public unsafe float resolution
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ObiEmitterMaterial.NativeFieldInfoPtr_resolution);
				return *intPtr;
			}
			set
			{
				*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ObiEmitterMaterial.NativeFieldInfoPtr_resolution)) = value;
			}
		}

		// Token: 0x1700335C RID: 13148
		// (get) Token: 0x060097F6 RID: 38902 RVA: 0x00272068 File Offset: 0x00270268
		// (set) Token: 0x060097F7 RID: 38903 RVA: 0x00272090 File Offset: 0x00270290
		public unsafe float restDensity
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ObiEmitterMaterial.NativeFieldInfoPtr_restDensity);
				return *intPtr;
			}
			set
			{
				*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ObiEmitterMaterial.NativeFieldInfoPtr_restDensity)) = value;
			}
		}

		// Token: 0x1700335D RID: 13149
		// (get) Token: 0x060097F8 RID: 38904 RVA: 0x002720B4 File Offset: 0x002702B4
		// (set) Token: 0x060097F9 RID: 38905 RVA: 0x002720E8 File Offset: 0x002702E8
		public unsafe EventHandler<ObiEmitterMaterial.MaterialChangeEventArgs> onChangesMade
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ObiEmitterMaterial.NativeFieldInfoPtr_onChangesMade);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new EventHandler<ObiEmitterMaterial.MaterialChangeEventArgs>(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(ObiEmitterMaterial.NativeFieldInfoPtr_onChangesMade), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04006559 RID: 25945
		private static readonly IntPtr NativeFieldInfoPtr_resolution;

		// Token: 0x0400655A RID: 25946
		private static readonly IntPtr NativeFieldInfoPtr_restDensity;

		// Token: 0x0400655B RID: 25947
		private static readonly IntPtr NativeFieldInfoPtr_onChangesMade;

		// Token: 0x0400655C RID: 25948
		private static readonly IntPtr NativeMethodInfoPtr_add_OnChangesMade_Public_add_Void_EventHandler_1_MaterialChangeEventArgs_0;

		// Token: 0x0400655D RID: 25949
		private static readonly IntPtr NativeMethodInfoPtr_remove_OnChangesMade_Public_rem_Void_EventHandler_1_MaterialChangeEventArgs_0;

		// Token: 0x0400655E RID: 25950
		private static readonly IntPtr NativeMethodInfoPtr_CommitChanges_Public_Void_MaterialChanges_0;

		// Token: 0x0400655F RID: 25951
		private static readonly IntPtr NativeMethodInfoPtr_GetParticleSize_Public_Single_Mode_0;

		// Token: 0x04006560 RID: 25952
		private static readonly IntPtr NativeMethodInfoPtr_GetParticleMass_Public_Single_Mode_0;

		// Token: 0x04006561 RID: 25953
		private static readonly IntPtr NativeMethodInfoPtr_GetEquivalentOniMaterial_Public_Abstract_Virtual_New_FluidMaterial_Mode_0;

		// Token: 0x04006562 RID: 25954
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Protected_Void_0;

		// Token: 0x02000538 RID: 1336
		public class MaterialChangeEventArgs : EventArgs
		{
			// Token: 0x060097FA RID: 38906 RVA: 0x00272110 File Offset: 0x00270310
			[CallerCount(2)]
			[CachedScanResults(RefRangeStart = 643748, RefRangeEnd = 643750, XrefRangeStart = 643744, XrefRangeEnd = 643748, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			public unsafe MaterialChangeEventArgs(ObiEmitterMaterial.MaterialChanges changes)
				: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<ObiEmitterMaterial.MaterialChangeEventArgs>.NativeClassPtr))
			{
				checked
				{
					IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
					*ptr = ref changes;
					IntPtr intPtr2;
					IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(ObiEmitterMaterial.MaterialChangeEventArgs.NativeMethodInfoPtr__ctor_Public_Void_MaterialChanges_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
					Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				}
			}

			// Token: 0x060097FB RID: 38907 RVA: 0x00272170 File Offset: 0x00270370
			// Note: this type is marked as 'beforefieldinit'.
			static MaterialChangeEventArgs()
			{
				Il2CppClassPointerStore<ObiEmitterMaterial.MaterialChangeEventArgs>.NativeClassPtr = IL2CPP.GetIl2CppNestedType(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, "MaterialChangeEventArgs");
				IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<ObiEmitterMaterial.MaterialChangeEventArgs>.NativeClassPtr);
				ObiEmitterMaterial.MaterialChangeEventArgs.NativeFieldInfoPtr_changes = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<ObiEmitterMaterial.MaterialChangeEventArgs>.NativeClassPtr, "changes");
				ObiEmitterMaterial.MaterialChangeEventArgs.NativeMethodInfoPtr__ctor_Public_Void_MaterialChanges_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial.MaterialChangeEventArgs>.NativeClassPtr, 100675138);
			}

			// Token: 0x060097FC RID: 38908 RVA: 0x0025A573 File Offset: 0x00258773
			public MaterialChangeEventArgs(IntPtr pointer)
				: base(pointer)
			{
			}

			// Token: 0x1700335E RID: 13150
			// (get) Token: 0x060097FD RID: 38909 RVA: 0x002721C4 File Offset: 0x002703C4
			// (set) Token: 0x060097FE RID: 38910 RVA: 0x002721EC File Offset: 0x002703EC
			public unsafe ObiEmitterMaterial.MaterialChanges changes
			{
				get
				{
					IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ObiEmitterMaterial.MaterialChangeEventArgs.NativeFieldInfoPtr_changes);
					return *intPtr;
				}
				set
				{
					*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(ObiEmitterMaterial.MaterialChangeEventArgs.NativeFieldInfoPtr_changes)) = value;
				}
			}

			// Token: 0x04006563 RID: 25955
			private static readonly IntPtr NativeFieldInfoPtr_changes;

			// Token: 0x04006564 RID: 25956
			private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_MaterialChanges_0;
		}

		// Token: 0x02000539 RID: 1337
		[Flags]
		public enum MaterialChanges
		{
			// Token: 0x04006566 RID: 25958
			PER_MATERIAL_DATA = 0,
			// Token: 0x04006567 RID: 25959
			PER_PARTICLE_DATA = 1
		}
	}
}
