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: 0x020004B3 RID: 1203
|
|
[Token(Token = "0x20004B3")]
|
|
[Serializable]
|
|
public class ObiBendConstraintBatch : ObiConstraintBatch
|
|
{
|
|
// Token: 0x06002A82 RID: 10882 RVA: 0x0005C518 File Offset: 0x0005A718
|
|
[Token(Token = "0x6002A82")]
|
|
[Address(RVA = "0x10C5630", Offset = "0x10C3E30", VA = "0x1810C5630")]
|
|
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: 0x06002A83 RID: 10883 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A83")]
|
|
[Address(RVA = "0x10C5780", Offset = "0x10C3F80", VA = "0x1810C5780")]
|
|
public ObiBendConstraintBatch(bool cooked, bool sharesParticles, float minYoungModulus, float maxYoungModulus)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002A84 RID: 10884 RVA: 0x0005C564 File Offset: 0x0005A764
|
|
[Token(Token = "0x6002A84")]
|
|
[Address(RVA = "0x54B9A0", Offset = "0x54A1A0", VA = "0x18054B9A0", Slot = "4")]
|
|
public override Oni.ConstraintType GetConstraintType()
|
|
{
|
|
return Oni.ConstraintType.Bending;
|
|
}
|
|
|
|
// Token: 0x06002A85 RID: 10885 RVA: 0x0005C574 File Offset: 0x0005A774
|
|
[Token(Token = "0x6002A85")]
|
|
[Address(RVA = "0x10C4680", Offset = "0x10C2E80", VA = "0x1810C4680", Slot = "5")]
|
|
public override void Clear()
|
|
{
|
|
this.activeConstraints.Clear();
|
|
this.bendingIndices.Clear();
|
|
this.restBends.Clear();
|
|
this.bendingStiffnesses.Clear();
|
|
this.constraintCount = (int)((ulong)0L);
|
|
}
|
|
|
|
// Token: 0x06002A86 RID: 10886 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A86")]
|
|
[Address(RVA = "0x10C4550", Offset = "0x10C2D50", VA = "0x1810C4550")]
|
|
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: 0x06002A87 RID: 10887 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A87")]
|
|
[Address(RVA = "0x10C4BC0", Offset = "0x10C33C0", VA = "0x1810C4BC0")]
|
|
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: 0x06002A88 RID: 10888 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A88")]
|
|
[Address(RVA = "0x10C5560", Offset = "0x10C3D60", VA = "0x1810C5560")]
|
|
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: 0x06002A89 RID: 10889 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A89")]
|
|
[Address(RVA = "0x10C53B0", Offset = "0x10C3BB0", VA = "0x1810C53B0")]
|
|
public void RemoveConstraint(int index)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002A8A RID: 10890 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A8A")]
|
|
[Address(RVA = "0x10C4A70", Offset = "0x10C3270", VA = "0x1810C4A70", Slot = "11")]
|
|
public override List<int> GetConstraintsInvolvingParticle(int particleIndex)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002A8B RID: 10891 RVA: 0x0005C5BC File Offset: 0x0005A7BC
|
|
[Token(Token = "0x6002A8B")]
|
|
[Address(RVA = "0x10C4730", Offset = "0x10C2F30", VA = "0x1810C4730", 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: 0x06002A8C RID: 10892 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A8C")]
|
|
[Address(RVA = "0x10C4DE0", Offset = "0x10C35E0", VA = "0x1810C4DE0", Slot = "7")]
|
|
protected override void OnAddToSolver(ObiBatchedConstraints constraints)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002A8D RID: 10893 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A8D")]
|
|
[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: 0x06002A8E RID: 10894 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A8E")]
|
|
[Address(RVA = "0x10C50A0", Offset = "0x10C38A0", VA = "0x1810C50A0", Slot = "9")]
|
|
public override void PushDataToSolver(ObiBatchedConstraints constraints)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002A8F RID: 10895 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002A8F")]
|
|
[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: 0x04003380 RID: 13184
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4003380")]
|
|
[HideInInspector]
|
|
public List<int> bendingIndices;
|
|
|
|
// Token: 0x04003381 RID: 13185
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4003381")]
|
|
[HideInInspector]
|
|
public List<float> restBends;
|
|
|
|
// Token: 0x04003382 RID: 13186
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x4003382")]
|
|
[HideInInspector]
|
|
public List<Vector2> bendingStiffnesses;
|
|
|
|
// Token: 0x04003383 RID: 13187
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4003383")]
|
|
private int[] solverIndices;
|
|
|
|
// Token: 0x020004B4 RID: 1204
|
|
[Token(Token = "0x20004B4")]
|
|
public enum BendIndexType
|
|
{
|
|
// Token: 0x04003385 RID: 13189
|
|
[Token(Token = "0x4003385")]
|
|
First,
|
|
// Token: 0x04003386 RID: 13190
|
|
[Token(Token = "0x4003386")]
|
|
Second,
|
|
// Token: 0x04003387 RID: 13191
|
|
[Token(Token = "0x4003387")]
|
|
Pivot
|
|
}
|
|
}
|
|
}
|