Files
NobetaSource/Cpp2IL/Assembly-CSharp/Obi/ObiTetherConstraintBatch.cs
2023-09-06 22:19:13 +02:00

179 lines
6.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using Cpp2IlInjected;
using UnityEngine;
namespace Obi
{
// Token: 0x02000509 RID: 1289
[Token(Token = "0x2000509")]
[Serializable]
public class ObiTetherConstraintBatch : ObiConstraintBatch
{
// Token: 0x06002D66 RID: 11622 RVA: 0x00063F20 File Offset: 0x00062120
[Token(Token = "0x6002D66")]
[Address(RVA = "0xE65040", Offset = "0xE64040", VA = "0x180E65040")]
public ObiTetherConstraintBatch(bool cooked, bool sharesParticles)
{
List<int> list = new List();
this.tetherIndices = list;
List<Vector2> list2 = new List();
this.maxLengthsScales = list2;
List<float> list3 = new List();
this.stiffnesses = list3;
int[] array = new int[0];
this.solverIndices = array;
base..ctor(cooked, sharesParticles);
}
// Token: 0x06002D67 RID: 11623 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D67")]
[Address(RVA = "0xE64ED0", Offset = "0xE63ED0", VA = "0x180E64ED0")]
public ObiTetherConstraintBatch(bool cooked, bool sharesParticles, float minYoungModulus, float maxYoungModulus)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D68 RID: 11624 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D68")]
[Address(RVA = "0x2FF2E0", Offset = "0x2FE2E0", VA = "0x1802FF2E0", Slot = "4")]
public override Oni.ConstraintType GetConstraintType()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D69 RID: 11625 RVA: 0x00063F6C File Offset: 0x0006216C
[Token(Token = "0x6002D69")]
[Address(RVA = "0xE64360", Offset = "0xE63360", VA = "0x180E64360", Slot = "5")]
public override void Clear()
{
this.activeConstraints.Clear();
this.tetherIndices.Clear();
this.maxLengthsScales.Clear();
this.stiffnesses.Clear();
this.constraintCount = (int)((ulong)0L);
}
// Token: 0x06002D6A RID: 11626 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D6A")]
[Address(RVA = "0xE64250", Offset = "0xE63250", VA = "0x180E64250")]
public void AddConstraint(int index1, int index2, float maxLength, float scale, float stiffness)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D6B RID: 11627 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D6B")]
[Address(RVA = "0xE64D20", Offset = "0xE63D20", VA = "0x180E64D20")]
public void RemoveConstraint(int index)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D6C RID: 11628 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D6C")]
[Address(RVA = "0xE64750", Offset = "0xE63750", VA = "0x180E64750", Slot = "11")]
public override List<int> GetConstraintsInvolvingParticle(int particleIndex)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D6D RID: 11629 RVA: 0x00063FB4 File Offset: 0x000621B4
[Token(Token = "0x6002D6D")]
[Address(RVA = "0xE64410", Offset = "0xE63410", VA = "0x180E64410", Slot = "6")]
public override void Cook()
{
ulong num;
IntPtr intPtr = Oni.CreateBatch(0, num != 0UL);
List<int> list = this.tetherIndices;
this.batch = intPtr;
int[] array = list.ToArray();
Vector2[] array2 = this.maxLengthsScales.ToArray();
float[] array3 = this.stiffnesses.ToArray();
int constraintCount = this.constraintCount;
Oni.SetTetherConstraints(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];
Vector2[] array5 = new Vector2[this.constraintCount];
float[] array6 = new float[this.constraintCount];
Oni.GetTetherConstraints(this.batch, array4, array5, array6);
List<int> list3 = new List(array4);
this.tetherIndices = list3;
List<Vector2> list4 = new List(array5);
this.maxLengthsScales = list4;
List<float> 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: 0x06002D6E RID: 11630 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D6E")]
[Address(RVA = "0xE64870", Offset = "0xE63870", VA = "0x180E64870", Slot = "7")]
protected override void OnAddToSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D6F RID: 11631 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D6F")]
[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "8")]
protected override void OnRemoveFromSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D70 RID: 11632 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D70")]
[Address(RVA = "0xE64A70", Offset = "0xE63A70", VA = "0x180E64A70", Slot = "9")]
public override void PushDataToSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D71 RID: 11633 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D71")]
[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "10")]
public override void PullDataFromSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0400364C RID: 13900
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x400364C")]
[HideInInspector]
public List<int> tetherIndices;
// Token: 0x0400364D RID: 13901
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x400364D")]
[HideInInspector]
public List<Vector2> maxLengthsScales;
// Token: 0x0400364E RID: 13902
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x400364E")]
[HideInInspector]
public List<float> stiffnesses;
// Token: 0x0400364F RID: 13903
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x400364F")]
private int[] solverIndices;
}
}