207 lines
7.7 KiB
C#
207 lines
7.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
namespace Obi
|
|
{
|
|
// Token: 0x020004B6 RID: 1206
|
|
[Token(Token = "0x20004B6")]
|
|
[Serializable]
|
|
public class ObiDistanceConstraintBatch : ObiConstraintBatch
|
|
{
|
|
// Token: 0x06002AA7 RID: 10919 RVA: 0x0005C9B8 File Offset: 0x0005ABB8
|
|
[Token(Token = "0x6002AA7")]
|
|
[Address(RVA = "0x10D5380", Offset = "0x10D3B80", VA = "0x1810D5380")]
|
|
public ObiDistanceConstraintBatch(bool cooked, bool sharesParticles)
|
|
{
|
|
List<int> list = new List();
|
|
this.springIndices = list;
|
|
List<float> list2 = new List();
|
|
this.restLengths = list2;
|
|
List<Vector2> list3 = new List();
|
|
this.stiffnesses = list3;
|
|
int[] array = new int[0];
|
|
this.solverIndices = array;
|
|
base..ctor(cooked, sharesParticles);
|
|
}
|
|
|
|
// Token: 0x06002AA8 RID: 10920 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AA8")]
|
|
[Address(RVA = "0x10D54D0", Offset = "0x10D3CD0", VA = "0x1810D54D0")]
|
|
public ObiDistanceConstraintBatch(bool cooked, bool sharesParticles, float minYoungModulus, float maxYoungModulus)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AA9 RID: 10921 RVA: 0x0005CA04 File Offset: 0x0005AC04
|
|
[Token(Token = "0x6002AA9")]
|
|
[Address(RVA = "0x54BDE0", Offset = "0x54A5E0", VA = "0x18054BDE0", Slot = "4")]
|
|
public override Oni.ConstraintType GetConstraintType()
|
|
{
|
|
return Oni.ConstraintType.Distance;
|
|
}
|
|
|
|
// Token: 0x06002AAA RID: 10922 RVA: 0x0005CA14 File Offset: 0x0005AC14
|
|
[Token(Token = "0x6002AAA")]
|
|
[Address(RVA = "0x10D4420", Offset = "0x10D2C20", VA = "0x1810D4420", Slot = "5")]
|
|
public override void Clear()
|
|
{
|
|
this.activeConstraints.Clear();
|
|
this.springIndices.Clear();
|
|
this.restLengths.Clear();
|
|
this.stiffnesses.Clear();
|
|
this.constraintCount = (int)((ulong)0L);
|
|
}
|
|
|
|
// Token: 0x06002AAB RID: 10923 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AAB")]
|
|
[Address(RVA = "0x10D4310", Offset = "0x10D2B10", VA = "0x1810D4310")]
|
|
public void AddConstraint(int index1, int index2, float restLength, float stretchStiffness, float compressionStiffness)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AAC RID: 10924 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AAC")]
|
|
[Address(RVA = "0x10D4930", Offset = "0x10D3130", VA = "0x1810D4930")]
|
|
public void InsertConstraint(int constraintIndex, int index1, int index2, float restLength, float stretchStiffness, float compressionStiffness)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AAD RID: 10925 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AAD")]
|
|
[Address(RVA = "0x10D52B0", Offset = "0x10D3AB0", VA = "0x1810D52B0")]
|
|
public void SetParticleIndex(int constraintIndex, int particleIndex, ObiDistanceConstraintBatch.DistanceIndexType type, bool wraparound)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AAE RID: 10926 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AAE")]
|
|
[Address(RVA = "0x10D5100", Offset = "0x10D3900", VA = "0x1810D5100")]
|
|
public void RemoveConstraint(int index)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AAF RID: 10927 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AAF")]
|
|
[Address(RVA = "0x10D4810", Offset = "0x10D3010", VA = "0x1810D4810", Slot = "11")]
|
|
public override List<int> GetConstraintsInvolvingParticle(int particleIndex)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AB0 RID: 10928 RVA: 0x0005CA5C File Offset: 0x0005AC5C
|
|
[Token(Token = "0x6002AB0")]
|
|
[Address(RVA = "0x10D44D0", Offset = "0x10D2CD0", VA = "0x1810D44D0", Slot = "6")]
|
|
public override void Cook()
|
|
{
|
|
ulong num;
|
|
IntPtr intPtr = Oni.CreateBatch(4, num != 0UL);
|
|
List<int> list = this.springIndices;
|
|
this.batch = intPtr;
|
|
int[] array = list.ToArray();
|
|
float[] array2 = this.restLengths.ToArray();
|
|
Vector2[] array3 = this.stiffnesses.ToArray();
|
|
int constraintCount = this.constraintCount;
|
|
Oni.SetDistanceConstraints(intPtr, array, array2, array3, constraintCount);
|
|
if (Oni.CookBatch(this.batch))
|
|
{
|
|
int batchConstraintCount = Oni.GetBatchConstraintCount(this.batch);
|
|
this.constraintCount = batchConstraintCount;
|
|
List<int> list2 = Enumerable.ToList<int>(Enumerable.Range(0, batchConstraintCount));
|
|
this.activeConstraints = list2;
|
|
int num2 = this.constraintCount;
|
|
num2 += num2;
|
|
int[] array4 = new int[num2];
|
|
float[] array5 = new float[this.constraintCount];
|
|
Vector2[] array6 = new Vector2[this.constraintCount];
|
|
Oni.GetDistanceConstraints(this.batch, array4, array5, array6);
|
|
List<int> list3 = new List(array4);
|
|
this.springIndices = list3;
|
|
List<float> list4 = new List(array5);
|
|
this.restLengths = list4;
|
|
List<Vector2> list5 = new List(array6);
|
|
this.stiffnesses = list5;
|
|
int[] array7 = new int[Oni.GetBatchPhaseCount(this.batch)];
|
|
Oni.GetBatchPhaseSizes(this.batch, array7);
|
|
List<int> list6 = new List(array7);
|
|
this.phaseSizes = list6;
|
|
}
|
|
Oni.DestroyBatch(this.batch);
|
|
this.batch = (IntPtr)((ulong)0L);
|
|
}
|
|
|
|
// Token: 0x06002AB1 RID: 10929 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AB1")]
|
|
[Address(RVA = "0x10D4B30", Offset = "0x10D3330", VA = "0x1810D4B30", Slot = "7")]
|
|
protected override void OnAddToSolver(ObiBatchedConstraints constraints)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AB2 RID: 10930 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AB2")]
|
|
[Address(RVA = "0x29E8B0", Offset = "0x29D0B0", VA = "0x18029E8B0", Slot = "8")]
|
|
protected override void OnRemoveFromSolver(ObiBatchedConstraints constraints)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AB3 RID: 10931 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AB3")]
|
|
[Address(RVA = "0x10D4D50", Offset = "0x10D3550", VA = "0x1810D4D50", Slot = "9")]
|
|
public override void PushDataToSolver(ObiBatchedConstraints constraints)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AB4 RID: 10932 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AB4")]
|
|
[Address(RVA = "0x29E8B0", Offset = "0x29D0B0", VA = "0x18029E8B0", Slot = "10")]
|
|
public override void PullDataFromSolver(ObiBatchedConstraints constraints)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x04003390 RID: 13200
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4003390")]
|
|
[HideInInspector]
|
|
public List<int> springIndices;
|
|
|
|
// Token: 0x04003391 RID: 13201
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4003391")]
|
|
[HideInInspector]
|
|
public List<float> restLengths;
|
|
|
|
// Token: 0x04003392 RID: 13202
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x4003392")]
|
|
[HideInInspector]
|
|
public List<Vector2> stiffnesses;
|
|
|
|
// Token: 0x04003393 RID: 13203
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4003393")]
|
|
private int[] solverIndices;
|
|
|
|
// Token: 0x020004B7 RID: 1207
|
|
[Token(Token = "0x20004B7")]
|
|
public enum DistanceIndexType
|
|
{
|
|
// Token: 0x04003395 RID: 13205
|
|
[Token(Token = "0x4003395")]
|
|
First,
|
|
// Token: 0x04003396 RID: 13206
|
|
[Token(Token = "0x4003396")]
|
|
Second
|
|
}
|
|
}
|
|
}
|