RUMBLE does not support other mod managers. If you want to use a manager, you must use the RUMBLE Mod Manager, a manager specifically designed for this game.
Decompiled source of StoneMatchTracker v1.1.0
Mods/StoneMatchTracker.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using EzySlice; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppRUMBLE.Managers; using Il2CppRUMBLE.Players; using Il2CppRUMBLE.Utilities; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using MatchCounterFiles; using MelonLoader; using Microsoft.CodeAnalysis; using RumbleModdingAPI; using StoneMatchTracker; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: MelonInfo(typeof(Core), "StoneMatchTracker", "1.1.0", "Roaby", null)] [assembly: MelonGame("Buckethead Entertainment", "RUMBLE")] [assembly: MelonColor(50, 168, 164, 255)] [assembly: MelonAuthorColor(50, 168, 164, 255)] [assembly: VerifyLoaderVersion(0, 6, 6, true)] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("StoneMatchTracker")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+d12300e9fe5c5c8212e56eac217a2555cf2c1315")] [assembly: AssemblyProduct("StoneMatchTracker")] [assembly: AssemblyTitle("StoneMatchTracker")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace MatchCounterFiles { [RegisterTypeInIl2Cpp] public class StoneSummoner : MonoBehaviour { public GameObject endPosition; public float upMoveDuration = 2f; private Rigidbody rb; public float stopDistance = 0.05f; public float pullForce = 4f; public bool Animating; private bool summoning; private float spinTime; private float totalSpinDuration = 1.5f; private int totalSpins = 3; private Quaternion initialRotation; private Quaternion intendedRotation; private Vector3 initialLocalPosition; private float startTime; private void Start() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) rb = ((Component)this).GetComponent<Rigidbody>(); if ((Object)(object)rb != (Object)null) { rb.isKinematic = true; rb.useGravity = false; rb.interpolation = (RigidbodyInterpolation)1; } summoning = false; Animating = false; intendedRotation = ((Component)this).transform.localRotation; startTime = Time.time; } public IEnumerator SummonStone() { Animating = true; yield return MelonCoroutines.Start(LiftTheStone()); while (summoning) { yield return null; } Animating = false; Object.Destroy((Object)(object)rb); } private IEnumerator LiftTheStone() { rb.isKinematic = false; rb.useGravity = false; float elapsed = 0f; Vector3 startPosition = ((Component)this).transform.position; Vector3 liftPosition = ((Component)this).transform.position + new Vector3(0f, 1.5f, 0f); while (elapsed < upMoveDuration) { elapsed += Time.deltaTime; float num = elapsed / upMoveDuration; float num2 = Mathf.SmoothStep(0f, 1f, num); ((Component)this).transform.position = Vector3.Lerp(startPosition, liftPosition, num2); yield return null; } yield return (object)new WaitForSeconds(0.5f); rb.isKinematic = false; summoning = true; } private void FixedUpdate() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) float num = Time.time - startTime; if (!((Object)(object)endPosition != (Object)null) || !summoning || rb.isKinematic) { return; } Vector3 val = endPosition.transform.position + endPosition.transform.up * 0.1f - ((Component)this).transform.position; float magnitude = ((Vector3)(ref val)).magnitude; if (magnitude > stopDistance && num < 10f) { float num2 = Mathf.Clamp(magnitude / 7f, 0.2f, 1f); if (magnitude < 1f) { pullForce = 2.5f; } else { pullForce = 4f; } rb.AddForce(((Vector3)(ref val)).normalized * pullForce * num2); } else { rb.interpolation = (RigidbodyInterpolation)0; rb.isKinematic = true; ((Component)this).transform.parent = endPosition.transform; initialLocalPosition = ((Component)this).transform.localPosition; initialRotation = ((Component)this).transform.localRotation; spinTime = 0f; } } private void Update() { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) if (summoning && rb.isKinematic) { if (spinTime < totalSpinDuration) { spinTime += Time.deltaTime; float num = spinTime / totalSpinDuration; float num2 = Mathf.SmoothStep(0f, 1f, num); ((Component)this).transform.localPosition = Vector3.Lerp(initialLocalPosition, Vector3.zero, num2); float num3 = Mathf.Lerp(360f * (float)totalSpins, 0f, num2); Quaternion val = Quaternion.Euler(0f, num3, 0f); Quaternion val2 = Quaternion.Slerp(initialRotation, intendedRotation, num2); ((Component)this).transform.localRotation = val * val2; } else { ((Component)this).transform.localRotation = intendedRotation; ((Component)this).transform.localPosition = Vector3.zero; summoning = false; } } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.All)] internal sealed class NullableAttribute : Attribute { public NullableAttribute(byte b) { } public NullableAttribute(byte[] b) { } } } namespace EzySlice { public sealed class IntersectionResult { private bool is_success; private readonly Triangle[] upper_hull; private readonly Triangle[] lower_hull; private readonly Vector3[] intersection_pt; private int upper_hull_count; private int lower_hull_count; private int intersection_pt_count; public Triangle[] upperHull => upper_hull; public Triangle[] lowerHull => lower_hull; public Vector3[] intersectionPoints => intersection_pt; public int upperHullCount => upper_hull_count; public int lowerHullCount => lower_hull_count; public int intersectionPointCount => intersection_pt_count; public bool isValid => is_success; public IntersectionResult() { is_success = false; upper_hull = new Triangle[2]; lower_hull = new Triangle[2]; intersection_pt = (Vector3[])(object)new Vector3[2]; upper_hull_count = 0; lower_hull_count = 0; intersection_pt_count = 0; } public IntersectionResult AddUpperHull(Triangle tri) { upper_hull[upper_hull_count++] = tri; is_success = true; return this; } public IntersectionResult AddLowerHull(Triangle tri) { lower_hull[lower_hull_count++] = tri; is_success = true; return this; } public void AddIntersectionPoint(Vector3 pt) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) intersection_pt[intersection_pt_count++] = pt; } public void Clear() { is_success = false; upper_hull_count = 0; lower_hull_count = 0; intersection_pt_count = 0; } public void OnDebugDraw() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) OnDebugDraw(Color.white); } public void OnDebugDraw(Color drawColor) { } } public sealed class Intersector { public static bool Intersect(Plane pl, Line ln, out Vector3 q) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) return Intersect(pl, ln.positionA, ln.positionB, out q); } public static bool Intersect(Plane pl, Vector3 a, Vector3 b, out Vector3 q) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) Vector3 normal = pl.normal; Vector3 val = b - a; float num = (pl.dist - Vector3.Dot(normal, a)) / Vector3.Dot(normal, val); if (num >= -1E-45f && num <= 1f) { q = a + num * val; return true; } q = Vector3.zero; return false; } public static float TriArea2D(float x1, float y1, float x2, float y2, float x3, float y3) { return (x1 - x2) * (y2 - y3) - (x2 - x3) * (y1 - y2); } public static void Intersect(Plane pl, Triangle tri, IntersectionResult result) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_0777: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07a6: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07b2: Unknown result type (might be due to invalid IL or missing references) //IL_07b3: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07bf: Unknown result type (might be due to invalid IL or missing references) //IL_07c0: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_037e: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_07d2: Unknown result type (might be due to invalid IL or missing references) //IL_07d4: Unknown result type (might be due to invalid IL or missing references) //IL_07d9: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_07f6: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_07ff: Unknown result type (might be due to invalid IL or missing references) //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_0805: Unknown result type (might be due to invalid IL or missing references) //IL_0807: Unknown result type (might be due to invalid IL or missing references) //IL_0810: Unknown result type (might be due to invalid IL or missing references) //IL_0812: Unknown result type (might be due to invalid IL or missing references) //IL_0814: Unknown result type (might be due to invalid IL or missing references) //IL_081d: Unknown result type (might be due to invalid IL or missing references) //IL_081f: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0600: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_0616: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0833: Unknown result type (might be due to invalid IL or missing references) //IL_0835: Unknown result type (might be due to invalid IL or missing references) //IL_083a: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_0849: Unknown result type (might be due to invalid IL or missing references) //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_0852: Unknown result type (might be due to invalid IL or missing references) //IL_0857: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Unknown result type (might be due to invalid IL or missing references) //IL_0860: Unknown result type (might be due to invalid IL or missing references) //IL_0864: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_0875: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_0880: Unknown result type (might be due to invalid IL or missing references) //IL_0882: Unknown result type (might be due to invalid IL or missing references) //IL_062b: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_0636: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_0641: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Unknown result type (might be due to invalid IL or missing references) //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_0660: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_0676: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Unknown result type (might be due to invalid IL or missing references) //IL_0896: Unknown result type (might be due to invalid IL or missing references) //IL_089b: Unknown result type (might be due to invalid IL or missing references) //IL_089f: Unknown result type (might be due to invalid IL or missing references) //IL_08a1: Unknown result type (might be due to invalid IL or missing references) //IL_08a6: Unknown result type (might be due to invalid IL or missing references) //IL_08aa: Unknown result type (might be due to invalid IL or missing references) //IL_08af: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Unknown result type (might be due to invalid IL or missing references) //IL_08b8: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_08c1: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08c7: Unknown result type (might be due to invalid IL or missing references) //IL_08c9: Unknown result type (might be due to invalid IL or missing references) //IL_08d2: Unknown result type (might be due to invalid IL or missing references) //IL_08d4: Unknown result type (might be due to invalid IL or missing references) //IL_08d6: Unknown result type (might be due to invalid IL or missing references) //IL_08df: Unknown result type (might be due to invalid IL or missing references) //IL_08e1: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06bd: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_06c1: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06d7: Unknown result type (might be due to invalid IL or missing references) //IL_06d9: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f8: Unknown result type (might be due to invalid IL or missing references) //IL_06fa: Unknown result type (might be due to invalid IL or missing references) //IL_06ff: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_070c: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_071e: Unknown result type (might be due to invalid IL or missing references) //IL_0720: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_072d: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_073a: Unknown result type (might be due to invalid IL or missing references) //IL_073c: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0564: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Unknown result type (might be due to invalid IL or missing references) result.Clear(); Vector3 positionA = tri.positionA; Vector3 positionB = tri.positionB; Vector3 positionC = tri.positionC; SideOfPlane sideOfPlane = pl.SideOf(positionA); SideOfPlane sideOfPlane2 = pl.SideOf(positionB); SideOfPlane sideOfPlane3 = pl.SideOf(positionC); if ((sideOfPlane == sideOfPlane2 && sideOfPlane2 == sideOfPlane3) || (sideOfPlane == SideOfPlane.ON && sideOfPlane == sideOfPlane2) || (sideOfPlane == SideOfPlane.ON && sideOfPlane == sideOfPlane3) || (sideOfPlane2 == SideOfPlane.ON && sideOfPlane2 == sideOfPlane3)) { return; } Vector3 q; Vector3 q2; if (sideOfPlane == SideOfPlane.ON) { if (Intersect(pl, positionB, positionC, out q)) { result.AddIntersectionPoint(q); result.AddIntersectionPoint(positionA); Triangle tri2 = new Triangle(positionA, positionB, q); Triangle tri3 = new Triangle(positionA, q, positionC); if (tri.hasUV) { Vector2 val = tri.GenerateUV(q); Vector2 uvA = tri.uvA; Vector2 uvB = tri.uvB; Vector2 uvC = tri.uvC; tri2.SetUV(uvA, uvB, val); tri3.SetUV(uvA, val, uvC); } if (tri.hasNormal) { Vector3 val2 = tri.GenerateNormal(q); Vector3 normalA = tri.normalA; Vector3 normalB = tri.normalB; Vector3 normalC = tri.normalC; tri2.SetNormal(normalA, normalB, val2); tri3.SetNormal(normalA, val2, normalC); } if (tri.hasTangent) { Vector4 val3 = tri.GenerateTangent(q); Vector4 tangentA = tri.tangentA; Vector4 tangentB = tri.tangentB; Vector4 tangentC = tri.tangentC; tri2.SetTangent(tangentA, tangentB, val3); tri3.SetTangent(tangentA, val3, tangentC); } switch (sideOfPlane2) { case SideOfPlane.UP: result.AddUpperHull(tri2).AddLowerHull(tri3); break; case SideOfPlane.DOWN: result.AddUpperHull(tri3).AddLowerHull(tri2); break; } } } else if (sideOfPlane2 == SideOfPlane.ON) { if (Intersect(pl, positionA, positionC, out q)) { result.AddIntersectionPoint(q); result.AddIntersectionPoint(positionB); Triangle tri4 = new Triangle(positionA, positionB, q); Triangle tri5 = new Triangle(q, positionB, positionC); if (tri.hasUV) { Vector2 val4 = tri.GenerateUV(q); Vector2 uvA2 = tri.uvA; Vector2 uvB2 = tri.uvB; Vector2 uvC2 = tri.uvC; tri4.SetUV(uvA2, uvB2, val4); tri5.SetUV(val4, uvB2, uvC2); } if (tri.hasNormal) { Vector3 val5 = tri.GenerateNormal(q); Vector3 normalA2 = tri.normalA; Vector3 normalB2 = tri.normalB; Vector3 normalC2 = tri.normalC; tri4.SetNormal(normalA2, normalB2, val5); tri5.SetNormal(val5, normalB2, normalC2); } if (tri.hasTangent) { Vector4 val6 = tri.GenerateTangent(q); Vector4 tangentA2 = tri.tangentA; Vector4 tangentB2 = tri.tangentB; Vector4 tangentC2 = tri.tangentC; tri4.SetTangent(tangentA2, tangentB2, val6); tri5.SetTangent(val6, tangentB2, tangentC2); } switch (sideOfPlane) { case SideOfPlane.UP: result.AddUpperHull(tri4).AddLowerHull(tri5); break; case SideOfPlane.DOWN: result.AddUpperHull(tri5).AddLowerHull(tri4); break; } } } else if (sideOfPlane3 == SideOfPlane.ON) { if (Intersect(pl, positionA, positionB, out q)) { result.AddIntersectionPoint(q); result.AddIntersectionPoint(positionC); Triangle tri6 = new Triangle(positionA, q, positionC); Triangle tri7 = new Triangle(q, positionB, positionC); if (tri.hasUV) { Vector2 val7 = tri.GenerateUV(q); Vector2 uvA3 = tri.uvA; Vector2 uvB3 = tri.uvB; Vector2 uvC3 = tri.uvC; tri6.SetUV(uvA3, val7, uvC3); tri7.SetUV(val7, uvB3, uvC3); } if (tri.hasNormal) { Vector3 val8 = tri.GenerateNormal(q); Vector3 normalA3 = tri.normalA; Vector3 normalB3 = tri.normalB; Vector3 normalC3 = tri.normalC; tri6.SetNormal(normalA3, val8, normalC3); tri7.SetNormal(val8, normalB3, normalC3); } if (tri.hasTangent) { Vector4 val9 = tri.GenerateTangent(q); Vector4 tangentA3 = tri.tangentA; Vector4 tangentB3 = tri.tangentB; Vector4 tangentC3 = tri.tangentC; tri6.SetTangent(tangentA3, val9, tangentC3); tri7.SetTangent(val9, tangentB3, tangentC3); } switch (sideOfPlane) { case SideOfPlane.UP: result.AddUpperHull(tri6).AddLowerHull(tri7); break; case SideOfPlane.DOWN: result.AddUpperHull(tri7).AddLowerHull(tri6); break; } } } else if (sideOfPlane != sideOfPlane2 && Intersect(pl, positionA, positionB, out q)) { result.AddIntersectionPoint(q); if (sideOfPlane == sideOfPlane3) { if (Intersect(pl, positionB, positionC, out q2)) { result.AddIntersectionPoint(q2); Triangle tri8 = new Triangle(q, positionB, q2); Triangle tri9 = new Triangle(positionA, q, q2); Triangle tri10 = new Triangle(positionA, q2, positionC); if (tri.hasUV) { Vector2 val10 = tri.GenerateUV(q); Vector2 val11 = tri.GenerateUV(q2); Vector2 uvA4 = tri.uvA; Vector2 uvB4 = tri.uvB; Vector2 uvC4 = tri.uvC; tri8.SetUV(val10, uvB4, val11); tri9.SetUV(uvA4, val10, val11); tri10.SetUV(uvA4, val11, uvC4); } if (tri.hasNormal) { Vector3 val12 = tri.GenerateNormal(q); Vector3 val13 = tri.GenerateNormal(q2); Vector3 normalA4 = tri.normalA; Vector3 normalB4 = tri.normalB; Vector3 normalC4 = tri.normalC; tri8.SetNormal(val12, normalB4, val13); tri9.SetNormal(normalA4, val12, val13); tri10.SetNormal(normalA4, val13, normalC4); } if (tri.hasTangent) { Vector4 val14 = tri.GenerateTangent(q); Vector4 val15 = tri.GenerateTangent(q2); Vector4 tangentA4 = tri.tangentA; Vector4 tangentB4 = tri.tangentB; Vector4 tangentC4 = tri.tangentC; tri8.SetTangent(val14, tangentB4, val15); tri9.SetTangent(tangentA4, val14, val15); tri10.SetTangent(tangentA4, val15, tangentC4); } if (sideOfPlane == SideOfPlane.UP) { result.AddUpperHull(tri9).AddUpperHull(tri10).AddLowerHull(tri8); } else { result.AddLowerHull(tri9).AddLowerHull(tri10).AddUpperHull(tri8); } } } else if (Intersect(pl, positionA, positionC, out q2)) { result.AddIntersectionPoint(q2); Triangle tri11 = new Triangle(positionA, q, q2); Triangle tri12 = new Triangle(q, positionB, positionC); Triangle tri13 = new Triangle(q2, q, positionC); if (tri.hasUV) { Vector2 val16 = tri.GenerateUV(q); Vector2 val17 = tri.GenerateUV(q2); Vector2 uvA5 = tri.uvA; Vector2 uvB5 = tri.uvB; Vector2 uvC5 = tri.uvC; tri11.SetUV(uvA5, val16, val17); tri12.SetUV(val16, uvB5, uvC5); tri13.SetUV(val17, val16, uvC5); } if (tri.hasNormal) { Vector3 val18 = tri.GenerateNormal(q); Vector3 val19 = tri.GenerateNormal(q2); Vector3 normalA5 = tri.normalA; Vector3 normalB5 = tri.normalB; Vector3 normalC5 = tri.normalC; tri11.SetNormal(normalA5, val18, val19); tri12.SetNormal(val18, normalB5, normalC5); tri13.SetNormal(val19, val18, normalC5); } if (tri.hasTangent) { Vector4 val20 = tri.GenerateTangent(q); Vector4 val21 = tri.GenerateTangent(q2); Vector4 tangentA5 = tri.tangentA; Vector4 tangentB5 = tri.tangentB; Vector4 tangentC5 = tri.tangentC; tri11.SetTangent(tangentA5, val20, val21); tri12.SetTangent(val20, tangentB5, tangentC5); tri13.SetTangent(val21, val20, tangentC5); } if (sideOfPlane == SideOfPlane.UP) { result.AddUpperHull(tri11).AddLowerHull(tri12).AddLowerHull(tri13); } else { result.AddLowerHull(tri11).AddUpperHull(tri12).AddUpperHull(tri13); } } } else if (Intersect(pl, positionC, positionA, out q) && Intersect(pl, positionC, positionB, out q2)) { result.AddIntersectionPoint(q); result.AddIntersectionPoint(q2); Triangle tri14 = new Triangle(q, q2, positionC); Triangle tri15 = new Triangle(positionA, q2, q); Triangle tri16 = new Triangle(positionA, positionB, q2); if (tri.hasUV) { Vector2 val22 = tri.GenerateUV(q); Vector2 val23 = tri.GenerateUV(q2); Vector2 uvA6 = tri.uvA; Vector2 uvB6 = tri.uvB; Vector2 uvC6 = tri.uvC; tri14.SetUV(val22, val23, uvC6); tri15.SetUV(uvA6, val23, val22); tri16.SetUV(uvA6, uvB6, val23); } if (tri.hasNormal) { Vector3 val24 = tri.GenerateNormal(q); Vector3 val25 = tri.GenerateNormal(q2); Vector3 normalA6 = tri.normalA; Vector3 normalB6 = tri.normalB; Vector3 normalC6 = tri.normalC; tri14.SetNormal(val24, val25, normalC6); tri15.SetNormal(normalA6, val25, val24); tri16.SetNormal(normalA6, normalB6, val25); } if (tri.hasTangent) { Vector4 val26 = tri.GenerateTangent(q); Vector4 val27 = tri.GenerateTangent(q2); Vector4 tangentA6 = tri.tangentA; Vector4 tangentB6 = tri.tangentB; Vector4 tangentC6 = tri.tangentC; tri14.SetTangent(val26, val27, tangentC6); tri15.SetTangent(tangentA6, val27, val26); tri16.SetTangent(tangentA6, tangentB6, val27); } if (sideOfPlane == SideOfPlane.UP) { result.AddUpperHull(tri15).AddUpperHull(tri16).AddLowerHull(tri14); } else { result.AddLowerHull(tri15).AddLowerHull(tri16).AddUpperHull(tri14); } } } } public struct Line { private readonly Vector3 m_pos_a; private readonly Vector3 m_pos_b; public float dist => Vector3.Distance(m_pos_a, m_pos_b); public float distSq { get { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) Vector3 val = m_pos_a - m_pos_b; return ((Vector3)(ref val)).sqrMagnitude; } } public Vector3 positionA => m_pos_a; public Vector3 positionB => m_pos_b; public Line(Vector3 pta, Vector3 ptb) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) m_pos_a = pta; m_pos_b = ptb; } } public enum SideOfPlane { UP, DOWN, ON } public struct Plane { private Vector3 m_normal; private float m_dist; public Vector3 normal => m_normal; public float dist => m_dist; public Plane(Vector3 pos, Vector3 norm) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) m_normal = norm; m_dist = Vector3.Dot(norm, pos); } public Plane(Vector3 norm, float dot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) m_normal = norm; m_dist = dot; } public void Compute(Vector3 pos, Vector3 norm) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) m_normal = norm; m_dist = Vector3.Dot(norm, pos); } public void Compute(Transform trans) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) Compute(trans.position, trans.up); } public void Compute(GameObject obj) { Compute(obj.transform); } public SideOfPlane SideOf(Vector3 pt) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) float num = Vector3.Dot(m_normal, pt) - m_dist; if (num > float.Epsilon) { return SideOfPlane.UP; } if (num < -1E-45f) { return SideOfPlane.DOWN; } return SideOfPlane.ON; } public void OnDebugDraw() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) OnDebugDraw(Color.white); } public void OnDebugDraw(Color drawColor) { } } public struct TextureRegion { private readonly float pos_start_x; private readonly float pos_start_y; private readonly float pos_end_x; private readonly float pos_end_y; public float startX => pos_start_x; public float startY => pos_start_y; public float endX => pos_end_x; public float endY => pos_end_y; public Vector2 start => new Vector2(startX, startY); public Vector2 end => new Vector2(endX, endY); public TextureRegion(float startX, float startY, float endX, float endY) { pos_start_x = startX; pos_start_y = startY; pos_end_x = endX; pos_end_y = endY; } public Vector2 Map(Vector2 uv) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return Map(uv.x, uv.y); } public Vector2 Map(float x, float y) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) float num = MAP(x, 0f, 1f, pos_start_x, pos_end_x); float num2 = MAP(y, 0f, 1f, pos_start_y, pos_end_y); return new Vector2(num, num2); } private static float MAP(float x, float in_min, float in_max, float out_min, float out_max) { return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; } } public static class TextureRegionExtension { public static TextureRegion GetTextureRegion(this Material mat, int pixX, int pixY, int pixWidth, int pixHeight) { return mat.mainTexture.GetTextureRegion(pixX, pixY, pixWidth, pixHeight); } public static TextureRegion GetTextureRegion(this Texture tex, int pixX, int pixY, int pixWidth, int pixHeight) { int width = tex.width; int height = tex.height; int num = Mathf.Min(width, pixWidth); int num2 = Mathf.Min(height, pixHeight); int num3 = Mathf.Min(Mathf.Abs(pixX), width); int num4 = Mathf.Min(Mathf.Abs(pixY), height); float startX = (float)num3 / (float)width; float startY = (float)num4 / (float)height; float endX = (float)(num3 + num) / (float)width; float endY = (float)(num4 + num2) / (float)height; return new TextureRegion(startX, startY, endX, endY); } } public struct Triangle { private readonly Vector3 m_pos_a; private readonly Vector3 m_pos_b; private readonly Vector3 m_pos_c; private bool m_uv_set; private Vector2 m_uv_a; private Vector2 m_uv_b; private Vector2 m_uv_c; private bool m_nor_set; private Vector3 m_nor_a; private Vector3 m_nor_b; private Vector3 m_nor_c; private bool m_tan_set; private Vector4 m_tan_a; private Vector4 m_tan_b; private Vector4 m_tan_c; public Vector3 positionA => m_pos_a; public Vector3 positionB => m_pos_b; public Vector3 positionC => m_pos_c; public bool hasUV => m_uv_set; public Vector2 uvA => m_uv_a; public Vector2 uvB => m_uv_b; public Vector2 uvC => m_uv_c; public bool hasNormal => m_nor_set; public Vector3 normalA => m_nor_a; public Vector3 normalB => m_nor_b; public Vector3 normalC => m_nor_c; public bool hasTangent => m_tan_set; public Vector4 tangentA => m_tan_a; public Vector4 tangentB => m_tan_b; public Vector4 tangentC => m_tan_c; public Triangle(Vector3 posa, Vector3 posb, Vector3 posc) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) m_pos_a = posa; m_pos_b = posb; m_pos_c = posc; m_uv_set = false; m_uv_a = Vector2.zero; m_uv_b = Vector2.zero; m_uv_c = Vector2.zero; m_nor_set = false; m_nor_a = Vector3.zero; m_nor_b = Vector3.zero; m_nor_c = Vector3.zero; m_tan_set = false; m_tan_a = Vector4.zero; m_tan_b = Vector4.zero; m_tan_c = Vector4.zero; } public void SetUV(Vector2 uvA, Vector2 uvB, Vector2 uvC) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) m_uv_a = uvA; m_uv_b = uvB; m_uv_c = uvC; m_uv_set = true; } public void SetNormal(Vector3 norA, Vector3 norB, Vector3 norC) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) m_nor_a = norA; m_nor_b = norB; m_nor_c = norC; m_nor_set = true; } public void SetTangent(Vector4 tanA, Vector4 tanB, Vector4 tanC) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) m_tan_a = tanA; m_tan_b = tanB; m_tan_c = tanC; m_tan_set = true; } public void ComputeTangents() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) if (m_nor_set && m_uv_set) { Vector3 pos_a = m_pos_a; Vector3 pos_b = m_pos_b; Vector3 pos_c = m_pos_c; Vector2 uv_a = m_uv_a; Vector2 uv_b = m_uv_b; Vector2 uv_c = m_uv_c; float num = pos_b.x - pos_a.x; float num2 = pos_c.x - pos_a.x; float num3 = pos_b.y - pos_a.y; float num4 = pos_c.y - pos_a.y; float num5 = pos_b.z - pos_a.z; float num6 = pos_c.z - pos_a.z; float num7 = uv_b.x - uv_a.x; float num8 = uv_c.x - uv_a.x; float num9 = uv_b.y - uv_a.y; float num10 = uv_c.y - uv_a.y; float num11 = 1f / (num7 * num10 - num8 * num9); Vector3 val = new Vector3((num10 * num - num9 * num2) * num11, (num10 * num3 - num9 * num4) * num11, (num10 * num5 - num9 * num6) * num11); Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor((num7 * num2 - num8 * num) * num11, (num7 * num4 - num8 * num3) * num11, (num7 * num6 - num8 * num5) * num11); Vector3 nor_a = m_nor_a; Vector3 val3 = val; Vector3.OrthoNormalize(ref nor_a, ref val3); Vector4 tanA = default(Vector4); ((Vector4)(ref tanA))..ctor(val3.x, val3.y, val3.z, (Vector3.Dot(Vector3.Cross(nor_a, val3), val2) < 0f) ? (-1f) : 1f); Vector3 nor_b = m_nor_b; Vector3 val4 = val; Vector3.OrthoNormalize(ref nor_b, ref val4); Vector4 tanB = default(Vector4); ((Vector4)(ref tanB))..ctor(val4.x, val4.y, val4.z, (Vector3.Dot(Vector3.Cross(nor_b, val4), val2) < 0f) ? (-1f) : 1f); Vector3 nor_c = m_nor_c; Vector3 val5 = val; Vector3.OrthoNormalize(ref nor_c, ref val5); Vector4 tanC = default(Vector4); ((Vector4)(ref tanC))..ctor(val5.x, val5.y, val5.z, (Vector3.Dot(Vector3.Cross(nor_c, val5), val2) < 0f) ? (-1f) : 1f); SetTangent(tanA, tanB, tanC); } } public Vector3 Barycentric(Vector3 p) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) Vector3 pos_a = m_pos_a; Vector3 pos_b = m_pos_b; Vector3 pos_c = m_pos_c; Vector3 val = Vector3.Cross(pos_b - pos_a, pos_c - pos_a); float num = Mathf.Abs(val.x); float num2 = Mathf.Abs(val.y); float num3 = Mathf.Abs(val.z); float num4; float num5; float num6; if (num >= num2 && num >= num3) { num4 = Intersector.TriArea2D(p.y, p.z, pos_b.y, pos_b.z, pos_c.y, pos_c.z); num5 = Intersector.TriArea2D(p.y, p.z, pos_c.y, pos_c.z, pos_a.y, pos_a.z); num6 = 1f / val.x; } else if (num2 >= num && num2 >= num3) { num4 = Intersector.TriArea2D(p.x, p.z, pos_b.x, pos_b.z, pos_c.x, pos_c.z); num5 = Intersector.TriArea2D(p.x, p.z, pos_c.x, pos_c.z, pos_a.x, pos_a.z); num6 = 1f / (0f - val.y); } else { num4 = Intersector.TriArea2D(p.x, p.y, pos_b.x, pos_b.y, pos_c.x, pos_c.y); num5 = Intersector.TriArea2D(p.x, p.y, pos_c.x, pos_c.y, pos_a.x, pos_a.y); num6 = 1f / val.z; } float num7 = num4 * num6; float num8 = num5 * num6; float num9 = 1f - num7 - num8; return new Vector3(num7, num8, num9); } public Vector2 GenerateUV(Vector3 pt) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) if (!m_uv_set) { return Vector2.zero; } Vector3 val = Barycentric(pt); return val.x * m_uv_a + val.y * m_uv_b + val.z * m_uv_c; } public Vector3 GenerateNormal(Vector3 pt) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) if (!m_nor_set) { return Vector3.zero; } Vector3 val = Barycentric(pt); return val.x * m_nor_a + val.y * m_nor_b + val.z * m_nor_c; } public Vector4 GenerateTangent(Vector3 pt) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) if (!m_nor_set) { return Vector4.zero; } Vector3 val = Barycentric(pt); return val.x * m_tan_a + val.y * m_tan_b + val.z * m_tan_c; } public bool Split(Plane pl, IntersectionResult result) { Intersector.Intersect(pl, this, result); return result.isValid; } public bool IsCW() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) return SignedSquare(m_pos_a, m_pos_b, m_pos_c) >= float.Epsilon; } public static float SignedSquare(Vector3 a, Vector3 b, Vector3 c) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) return a.x * (b.y * c.z - b.z * c.y) - a.y * (b.x * c.z - b.z * c.x) + a.z * (b.x * c.y - b.y * c.x); } public void OnDebugDraw() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) OnDebugDraw(Color.white); } public void OnDebugDraw(Color drawColor) { } } public sealed class Triangulator { internal struct Mapped2D { private readonly Vector3 original; private readonly Vector2 mapped; public Vector2 mappedValue => mapped; public Vector3 originalValue => original; public Mapped2D(Vector3 newOriginal, Vector3 u, Vector3 v) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) original = newOriginal; mapped = new Vector2(Vector3.Dot(newOriginal, u), Vector3.Dot(newOriginal, v)); } } public static bool MonotoneChain(List<Vector3> vertices, Vector3 normal, out List<Triangle> tri) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return MonotoneChain(vertices, normal, out tri, new TextureRegion(0f, 0f, 1f, 1f)); } public static bool MonotoneChain(List<Vector3> vertices, Vector3 normal, out List<Triangle> tri, TextureRegion texRegion) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) int count = vertices.Count; if (count < 3) { tri = null; return false; } Vector3 val = Vector3.Normalize(Vector3.Cross(normal, Vector3.up)); if (Vector3.zero == val) { val = Vector3.Normalize(Vector3.Cross(normal, Vector3.forward)); } Vector3 v = Vector3.Cross(val, normal); Mapped2D[] array = new Mapped2D[count]; float num = float.MinValue; float num2 = float.MinValue; float num3 = float.MaxValue; float num4 = float.MaxValue; for (int i = 0; i < count; i++) { Vector3 newOriginal = vertices[i]; Mapped2D mapped2D = new Mapped2D(newOriginal, val, v); Vector2 mappedValue = mapped2D.mappedValue; num = Mathf.Max(num, mappedValue.x); num2 = Mathf.Max(num2, mappedValue.y); num3 = Mathf.Min(num3, mappedValue.x); num4 = Mathf.Min(num4, mappedValue.y); array[i] = mapped2D; } Array.Sort(array, delegate(Mapped2D a, Mapped2D b) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) Vector2 mappedValue11 = a.mappedValue; Vector2 mappedValue12 = b.mappedValue; return (!(mappedValue11.x < mappedValue12.x) && (mappedValue11.x != mappedValue12.x || !(mappedValue11.y < mappedValue12.y))) ? 1 : (-1); }); Mapped2D[] array2 = new Mapped2D[count + 1]; int num5 = 0; for (int j = 0; j < count; j++) { while (num5 >= 2) { Vector2 mappedValue2 = array2[num5 - 2].mappedValue; Vector2 mappedValue3 = array2[num5 - 1].mappedValue; Vector2 mappedValue4 = array[j].mappedValue; if (Intersector.TriArea2D(mappedValue2.x, mappedValue2.y, mappedValue3.x, mappedValue3.y, mappedValue4.x, mappedValue4.y) > 0f) { break; } num5--; } array2[num5++] = array[j]; } int num6 = count - 2; int num7 = num5 + 1; while (num6 >= 0) { while (num5 >= num7) { Vector2 mappedValue5 = array2[num5 - 2].mappedValue; Vector2 mappedValue6 = array2[num5 - 1].mappedValue; Vector2 mappedValue7 = array[num6].mappedValue; if (Intersector.TriArea2D(mappedValue5.x, mappedValue5.y, mappedValue6.x, mappedValue6.y, mappedValue7.x, mappedValue7.y) > 0f) { break; } num5--; } array2[num5++] = array[num6]; num6--; } int num8 = num5 - 1; int num9 = (num8 - 2) * 3; if (num8 < 3) { tri = null; return false; } tri = new List<Triangle>(num9 / 3); float num10 = num - num3; float num11 = num2 - num4; int num12 = 1; for (int k = 0; k < num9; k += 3) { Mapped2D mapped2D2 = array2[0]; Mapped2D mapped2D3 = array2[num12]; Mapped2D mapped2D4 = array2[num12 + 1]; Vector2 mappedValue8 = mapped2D2.mappedValue; Vector2 mappedValue9 = mapped2D3.mappedValue; Vector2 mappedValue10 = mapped2D4.mappedValue; mappedValue8.x = (mappedValue8.x - num3) / num10; mappedValue8.y = (mappedValue8.y - num4) / num11; mappedValue9.x = (mappedValue9.x - num3) / num10; mappedValue9.y = (mappedValue9.y - num4) / num11; mappedValue10.x = (mappedValue10.x - num3) / num10; mappedValue10.y = (mappedValue10.y - num4) / num11; Triangle item = new Triangle(mapped2D2.originalValue, mapped2D3.originalValue, mapped2D4.originalValue); item.SetUV(texRegion.Map(mappedValue8), texRegion.Map(mappedValue9), texRegion.Map(mappedValue10)); item.SetNormal(normal, normal, normal); item.ComputeTangents(); tri.Add(item); num12++; } return true; } } public sealed class SlicedHull { private Mesh upper_hull; private Mesh lower_hull; public Mesh upperHull => upper_hull; public Mesh lowerHull => lower_hull; public SlicedHull(Mesh upperHull, Mesh lowerHull) { upper_hull = upperHull; lower_hull = lowerHull; } public GameObject CreateUpperHull(GameObject original) { return CreateUpperHull(original, null); } public GameObject CreateUpperHull(GameObject original, Material crossSectionMat) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) GameObject val = CreateUpperHull(); if ((Object)(object)val != (Object)null) { val.transform.localPosition = original.transform.localPosition; val.transform.localRotation = original.transform.localRotation; val.transform.localScale = original.transform.localScale; Material[] array = Il2CppArrayBase<Material>.op_Implicit((Il2CppArrayBase<Material>)(object)((Renderer)original.GetComponent<MeshRenderer>()).sharedMaterials); if (original.GetComponent<MeshFilter>().sharedMesh.subMeshCount == upper_hull.subMeshCount) { val.GetComponent<Renderer>().sharedMaterials = Il2CppReferenceArray<Material>.op_Implicit(array); return val; } Material[] array2 = (Material[])(object)new Material[array.Length + 1]; Array.Copy(array, array2, array.Length); array2[array.Length] = crossSectionMat; val.GetComponent<Renderer>().sharedMaterials = Il2CppReferenceArray<Material>.op_Implicit(array2); } return val; } public GameObject CreateLowerHull(GameObject original) { return CreateLowerHull(original, null); } public GameObject CreateLowerHull(GameObject original, Material crossSectionMat) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Un