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

179 lines
6.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using Cpp2IlInjected;
using UnityEngine;
namespace Obi
{
// Token: 0x020004BA RID: 1210
[Token(Token = "0x20004BA")]
[Serializable]
public class ObiTetherConstraintBatch : ObiConstraintBatch
{
// Token: 0x06002ACF RID: 10959 RVA: 0x0005CFD8 File Offset: 0x0005B1D8
[Token(Token = "0x6002ACF")]
[Address(RVA = "0xE82350", Offset = "0xE80B50", VA = "0x180E82350")]
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: 0x06002AD0 RID: 10960 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AD0")]
[Address(RVA = "0xE821E0", Offset = "0xE809E0", VA = "0x180E821E0")]
public ObiTetherConstraintBatch(bool cooked, bool sharesParticles, float minYoungModulus, float maxYoungModulus)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002AD1 RID: 10961 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AD1")]
[Address(RVA = "0x2E8FA0", Offset = "0x2E77A0", VA = "0x1802E8FA0", Slot = "4")]
public override Oni.ConstraintType GetConstraintType()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002AD2 RID: 10962 RVA: 0x0005D024 File Offset: 0x0005B224
[Token(Token = "0x6002AD2")]
[Address(RVA = "0xE81670", Offset = "0xE7FE70", VA = "0x180E81670", Slot = "5")]
public override void Clear()
{
this.activeConstraints.Clear();
this.tetherIndices.Clear();
this.maxLengthsScales.Clear();
this.stiffnesses.Clear();
this.constraintCount = (int)((ulong)0L);
}
// Token: 0x06002AD3 RID: 10963 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AD3")]
[Address(RVA = "0xE81560", Offset = "0xE7FD60", VA = "0x180E81560")]
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: 0x06002AD4 RID: 10964 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AD4")]
[Address(RVA = "0xE82030", Offset = "0xE80830", VA = "0x180E82030")]
public void RemoveConstraint(int index)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002AD5 RID: 10965 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AD5")]
[Address(RVA = "0xE81A60", Offset = "0xE80260", VA = "0x180E81A60", Slot = "11")]
public override List<int> GetConstraintsInvolvingParticle(int particleIndex)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002AD6 RID: 10966 RVA: 0x0005D06C File Offset: 0x0005B26C
[Token(Token = "0x6002AD6")]
[Address(RVA = "0xE81720", Offset = "0xE7FF20", VA = "0x180E81720", 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: 0x06002AD7 RID: 10967 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AD7")]
[Address(RVA = "0xE81B80", Offset = "0xE80380", VA = "0x180E81B80", Slot = "7")]
protected override void OnAddToSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002AD8 RID: 10968 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AD8")]
[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: 0x06002AD9 RID: 10969 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AD9")]
[Address(RVA = "0xE81D80", Offset = "0xE80580", VA = "0x180E81D80", Slot = "9")]
public override void PushDataToSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002ADA RID: 10970 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002ADA")]
[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: 0x040033A4 RID: 13220
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40033A4")]
[HideInInspector]
public List<int> tetherIndices;
// Token: 0x040033A5 RID: 13221
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40033A5")]
[HideInInspector]
public List<Vector2> maxLengthsScales;
// Token: 0x040033A6 RID: 13222
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x40033A6")]
[HideInInspector]
public List<float> stiffnesses;
// Token: 0x040033A7 RID: 13223
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x40033A7")]
private int[] solverIndices;
}
}