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

namespace Obi
{
	// Token: 0x020004DF RID: 1247
	public class ObiEmitterMaterial : ScriptableObject
	{
		// Token: 0x06008F98 RID: 36760 RVA: 0x0024EF58 File Offset: 0x0024D158
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 611449, RefRangeEnd = 611452, XrefRangeStart = 611440, XrefRangeEnd = 611449, 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: 0x06008F99 RID: 36761 RVA: 0x0024EFB4 File Offset: 0x0024D1B4
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 611457, RefRangeEnd = 611459, XrefRangeStart = 611452, XrefRangeEnd = 611457, 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: 0x06008F9A RID: 36762 RVA: 0x0024F010 File Offset: 0x0024D210
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 611459, XrefRangeEnd = 611466, 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: 0x06008F9B RID: 36763 RVA: 0x0024F064 File Offset: 0x0024D264
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 611466, XrefRangeEnd = 611468, 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: 0x06008F9C RID: 36764 RVA: 0x0024F0C8 File Offset: 0x0024D2C8
		[CallerCount(2)]
		[CachedScanResults(RefRangeStart = 611471, RefRangeEnd = 611473, XrefRangeStart = 611468, XrefRangeEnd = 611471, 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: 0x06008F9D RID: 36765 RVA: 0x0024F12C File Offset: 0x0024D32C
		[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: 0x06008F9E RID: 36766 RVA: 0x0024F19C File Offset: 0x0024D39C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 611473, XrefRangeEnd = 611474, 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: 0x06008F9F RID: 36767 RVA: 0x0024F1E8 File Offset: 0x0024D3E8
		// 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, 100674418);
			ObiEmitterMaterial.NativeMethodInfoPtr_remove_OnChangesMade_Public_rem_Void_EventHandler_1_MaterialChangeEventArgs_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100674419);
			ObiEmitterMaterial.NativeMethodInfoPtr_CommitChanges_Public_Void_MaterialChanges_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100674420);
			ObiEmitterMaterial.NativeMethodInfoPtr_GetParticleSize_Public_Single_Mode_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100674421);
			ObiEmitterMaterial.NativeMethodInfoPtr_GetParticleMass_Public_Single_Mode_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100674422);
			ObiEmitterMaterial.NativeMethodInfoPtr_GetEquivalentOniMaterial_Public_Abstract_Virtual_New_FluidMaterial_Mode_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100674423);
			ObiEmitterMaterial.NativeMethodInfoPtr__ctor_Protected_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<ObiEmitterMaterial>.NativeClassPtr, 100674424);
		}

		// Token: 0x06008FA0 RID: 36768 RVA: 0x00009DEC File Offset: 0x00007FEC
		public ObiEmitterMaterial(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170030C0 RID: 12480
		// (get) Token: 0x06008FA1 RID: 36769 RVA: 0x0024F2E0 File Offset: 0x0024D4E0
		// (set) Token: 0x06008FA2 RID: 36770 RVA: 0x0024F308 File Offset: 0x0024D508
		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: 0x170030C1 RID: 12481
		// (get) Token: 0x06008FA3 RID: 36771 RVA: 0x0024F32C File Offset: 0x0024D52C
		// (set) Token: 0x06008FA4 RID: 36772 RVA: 0x0024F354 File Offset: 0x0024D554
		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: 0x170030C2 RID: 12482
		// (get) Token: 0x06008FA5 RID: 36773 RVA: 0x0024F378 File Offset: 0x0024D578
		// (set) Token: 0x06008FA6 RID: 36774 RVA: 0x0024F3AC File Offset: 0x0024D5AC
		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: 0x04005FB0 RID: 24496
		private static readonly IntPtr NativeFieldInfoPtr_resolution;

		// Token: 0x04005FB1 RID: 24497
		private static readonly IntPtr NativeFieldInfoPtr_restDensity;

		// Token: 0x04005FB2 RID: 24498
		private static readonly IntPtr NativeFieldInfoPtr_onChangesMade;

		// Token: 0x04005FB3 RID: 24499
		private static readonly IntPtr NativeMethodInfoPtr_add_OnChangesMade_Public_add_Void_EventHandler_1_MaterialChangeEventArgs_0;

		// Token: 0x04005FB4 RID: 24500
		private static readonly IntPtr NativeMethodInfoPtr_remove_OnChangesMade_Public_rem_Void_EventHandler_1_MaterialChangeEventArgs_0;

		// Token: 0x04005FB5 RID: 24501
		private static readonly IntPtr NativeMethodInfoPtr_CommitChanges_Public_Void_MaterialChanges_0;

		// Token: 0x04005FB6 RID: 24502
		private static readonly IntPtr NativeMethodInfoPtr_GetParticleSize_Public_Single_Mode_0;

		// Token: 0x04005FB7 RID: 24503
		private static readonly IntPtr NativeMethodInfoPtr_GetParticleMass_Public_Single_Mode_0;

		// Token: 0x04005FB8 RID: 24504
		private static readonly IntPtr NativeMethodInfoPtr_GetEquivalentOniMaterial_Public_Abstract_Virtual_New_FluidMaterial_Mode_0;

		// Token: 0x04005FB9 RID: 24505
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Protected_Void_0;

		// Token: 0x020004E0 RID: 1248
		public class MaterialChangeEventArgs : EventArgs
		{
			// Token: 0x06008FA7 RID: 36775 RVA: 0x0024F3D4 File Offset: 0x0024D5D4
			[CallerCount(2)]
			[CachedScanResults(RefRangeStart = 611438, RefRangeEnd = 611440, XrefRangeStart = 611434, XrefRangeEnd = 611438, 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: 0x06008FA8 RID: 36776 RVA: 0x0024F434 File Offset: 0x0024D634
			// 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, 100674425);
			}

			// Token: 0x06008FA9 RID: 36777 RVA: 0x00237837 File Offset: 0x00235A37
			public MaterialChangeEventArgs(IntPtr pointer)
				: base(pointer)
			{
			}

			// Token: 0x170030C3 RID: 12483
			// (get) Token: 0x06008FAA RID: 36778 RVA: 0x0024F488 File Offset: 0x0024D688
			// (set) Token: 0x06008FAB RID: 36779 RVA: 0x0024F4B0 File Offset: 0x0024D6B0
			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: 0x04005FBA RID: 24506
			private static readonly IntPtr NativeFieldInfoPtr_changes;

			// Token: 0x04005FBB RID: 24507
			private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_MaterialChanges_0;
		}

		// Token: 0x020004E1 RID: 1249
		[Flags]
		public enum MaterialChanges
		{
			// Token: 0x04005FBD RID: 24509
			PER_MATERIAL_DATA = 0,
			// Token: 0x04005FBE RID: 24510
			PER_PARTICLE_DATA = 1
		}
	}
}
