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

203 lines
7.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using Cpp2IlInjected;
using UnityEngine;
namespace Obi
{
// Token: 0x02000502 RID: 1282
[Token(Token = "0x2000502")]
[Serializable]
public class ObiBendConstraintBatch : ObiConstraintBatch
{
// Token: 0x06002D19 RID: 11545 RVA: 0x00063508 File Offset: 0x00061708
[Token(Token = "0x6002D19")]
[Address(RVA = "0x1091810", Offset = "0x1090810", VA = "0x181091810")]
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: 0x06002D1A RID: 11546 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D1A")]
[Address(RVA = "0x1091960", Offset = "0x1090960", VA = "0x181091960")]
public ObiBendConstraintBatch(bool cooked, bool sharesParticles, float minYoungModulus, float maxYoungModulus)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D1B RID: 11547 RVA: 0x00063554 File Offset: 0x00061754
[Token(Token = "0x6002D1B")]
[Address(RVA = "0x5474F0", Offset = "0x5464F0", VA = "0x1805474F0", Slot = "4")]
public override Oni.ConstraintType GetConstraintType()
{
return Oni.ConstraintType.Bending;
}
// Token: 0x06002D1C RID: 11548 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D1C")]
[Address(RVA = "0x1090860", Offset = "0x108F860", VA = "0x181090860", Slot = "5")]
public override void Clear()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D1D RID: 11549 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D1D")]
[Address(RVA = "0x1090730", Offset = "0x108F730", VA = "0x181090730")]
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: 0x06002D1E RID: 11550 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D1E")]
[Address(RVA = "0x1090DA0", Offset = "0x108FDA0", VA = "0x181090DA0")]
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: 0x06002D1F RID: 11551 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D1F")]
[Address(RVA = "0x1091740", Offset = "0x1090740", VA = "0x181091740")]
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: 0x06002D20 RID: 11552 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D20")]
[Address(RVA = "0x1091590", Offset = "0x1090590", VA = "0x181091590")]
public void RemoveConstraint(int index)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D21 RID: 11553 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D21")]
[Address(RVA = "0x1090C50", Offset = "0x108FC50", VA = "0x181090C50", Slot = "11")]
public override List<int> GetConstraintsInvolvingParticle(int particleIndex)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D22 RID: 11554 RVA: 0x00063564 File Offset: 0x00061764
[Token(Token = "0x6002D22")]
[Address(RVA = "0x1090910", Offset = "0x108F910", VA = "0x181090910", 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: 0x06002D23 RID: 11555 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D23")]
[Address(RVA = "0x1090FC0", Offset = "0x108FFC0", VA = "0x181090FC0", Slot = "7")]
protected override void OnAddToSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D24 RID: 11556 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D24")]
[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: 0x06002D25 RID: 11557 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D25")]
[Address(RVA = "0x1091280", Offset = "0x1090280", VA = "0x181091280", Slot = "9")]
public override void PushDataToSolver(ObiBatchedConstraints constraints)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002D26 RID: 11558 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002D26")]
[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: 0x04003628 RID: 13864
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4003628")]
[HideInInspector]
public List<int> bendingIndices;
// Token: 0x04003629 RID: 13865
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x4003629")]
[HideInInspector]
public List<float> restBends;
// Token: 0x0400362A RID: 13866
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x400362A")]
[HideInInspector]
public List<Vector2> bendingStiffnesses;
// Token: 0x0400362B RID: 13867
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x400362B")]
private int[] solverIndices;
// Token: 0x02000503 RID: 1283
[Token(Token = "0x2000503")]
public enum BendIndexType
{
// Token: 0x0400362D RID: 13869
[Token(Token = "0x400362D")]
First,
// Token: 0x0400362E RID: 13870
[Token(Token = "0x400362E")]
Second,
// Token: 0x0400362F RID: 13871
[Token(Token = "0x400362F")]
Pivot
}
}
}