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

207 lines
7.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using Cpp2IlInjected;
using UnityEngine;
namespace Obi
{
// Token: 0x020004AA RID: 1194
[Token(Token = "0x20004AA")]
[Serializable]
public class ObiBendConstraintBatch : ObiConstraintBatch
{
// Token: 0x06002A50 RID: 10832 RVA: 0x0005C144 File Offset: 0x0005A344
[Token(Token = "0x6002A50")]
[Address(RVA = "0xFFE4E0", Offset = "0xFFD2E0", VA = "0x180FFE4E0")]
public ObiBendConstraintBatch(bool cooked, bool sharesParticles)
{
List<int> list = new List();
this.bendingIndices = list;
List<float> list2 = new List();
this.restBends = list2;
List<Vector2> list3 = new List();
this.bendingStiffnesses = list3;
int[] array = new int[0];
this.solverIndices = array;
base..ctor(cooked, sharesParticles);
}
// Token: 0x06002A51 RID: 10833 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A51")]
[Address(RVA = "0xFFE630", Offset = "0xFFD430", VA = "0x180FFE630")]
public ObiBendConstraintBatch(bool cooked, bool sharesParticles, float minYoungModulus, float maxYoungModulus)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002A52 RID: 10834 RVA: 0x0005C190 File Offset: 0x0005A390
[Token(Token = "0x6002A52")]
[Address(RVA = "0x51C1D0", Offset = "0x51AFD0", VA = "0x18051C1D0", Slot = "4")]
public override Oni.ConstraintType GetConstraintType()
{
return Oni.ConstraintType.Bending;
}
// Token: 0x06002A53 RID: 10835 RVA: 0x0005C1A0 File Offset: 0x0005A3A0
[Token(Token = "0x6002A53")]
[Address(RVA = "0xFFD530", Offset = "0xFFC330", VA = "0x180FFD530", Slot = "5")]
public override void Clear()
{
this.activeConstraints.Clear();
this.bendingIndices.Clear();
this.restBends.Clear();
this.bendingStiffnesses.Clear();
this.constraintCount = (int)((ulong)0L);
}
// Token: 0x06002A54 RID: 10836 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A54")]
[Address(RVA = "0xFFD400", Offset = "0xFFC200", VA = "0x180FFD400")]
public void AddConstraint(int index1, int index2, int index3, float restBend, float bending, float stiffness)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002A55 RID: 10837 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A55")]
[Address(RVA = "0xFFDA70", Offset = "0xFFC870", VA = "0x180FFDA70")]
public void InsertConstraint(int constraintIndex, int index1, int index2, int index3, float restBend, float bending, float stiffness)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002A56 RID: 10838 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A56")]
[Address(RVA = "0xFFE410", Offset = "0xFFD210", VA = "0x180FFE410")]
public void SetParticleIndex(int constraintIndex, int particleIndex, ObiBendConstraintBatch.BendIndexType type, bool wraparound)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002A57 RID: 10839 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A57")]
[Address(RVA = "0xFFE260", Offset = "0xFFD060", VA = "0x180FFE260")]
public void RemoveConstraint(int index)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002A58 RID: 10840 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A58")]
[Address(RVA = "0xFFD920", Offset = "0xFFC720", VA = "0x180FFD920", Slot = "11")]
public override List<int> GetConstraintsInvolvingParticle(int particleIndex)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002A59 RID: 10841 RVA: 0x0005C1E8 File Offset: 0x0005A3E8
[Token(Token = "0x6002A59")]
[Address(RVA = "0xFFD5E0", Offset = "0xFFC3E0", VA = "0x180FFD5E0", Slot = "6")]
public override void Cook()
{
IntPtr intPtr = Oni.CreateBatch(3, true);
List<int> list = this.bendingIndices;
this.batch = intPtr;
int[] array = list.ToArray();
float[] array2 = this.restBends.ToArray();
Vector2[] array3 = this.bendingStiffnesses.ToArray();
int constraintCount = this.constraintCount;
Oni.SetBendingConstraints(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[] array4 = new int[list2];
float[] array5 = new float[this.constraintCount];
Vector2[] array6 = new Vector2[this.constraintCount];
Oni.GetBendingConstraints(this.batch, array4, array5, array6);
List<int> list3 = new List(array4);
this.bendingIndices = list3;
List<float> list4 = new List(array5);
this.restBends = list4;
List<Vector2> list5 = new List(array6);
this.bendingStiffnesses = 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: 0x06002A5A RID: 10842 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A5A")]
[Address(RVA = "0xFFDC90", Offset = "0xFFCA90", VA = "0x180FFDC90", Slot = "7")]
protected override void OnAddToSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002A5B RID: 10843 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A5B")]
[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "8")]
protected override void OnRemoveFromSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002A5C RID: 10844 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A5C")]
[Address(RVA = "0xFFDF50", Offset = "0xFFCD50", VA = "0x180FFDF50", Slot = "9")]
public override void PushDataToSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002A5D RID: 10845 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002A5D")]
[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "10")]
public override void PullDataFromSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0400333E RID: 13118
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x400333E")]
[HideInInspector]
public List<int> bendingIndices;
// Token: 0x0400333F RID: 13119
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x400333F")]
[HideInInspector]
public List<float> restBends;
// Token: 0x04003340 RID: 13120
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x4003340")]
[HideInInspector]
public List<Vector2> bendingStiffnesses;
// Token: 0x04003341 RID: 13121
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x4003341")]
private int[] solverIndices;
// Token: 0x020004AB RID: 1195
[Token(Token = "0x20004AB")]
public enum BendIndexType
{
// Token: 0x04003343 RID: 13123
[Token(Token = "0x4003343")]
First,
// Token: 0x04003344 RID: 13124
[Token(Token = "0x4003344")]
Second,
// Token: 0x04003345 RID: 13125
[Token(Token = "0x4003345")]
Pivot
}
}
}