238 lines
8.7 KiB
C#
238 lines
8.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
namespace Obi
|
|
{
|
|
// Token: 0x020004B9 RID: 1209
|
|
[Token(Token = "0x20004B9")]
|
|
[Serializable]
|
|
public class ObiSkinConstraintBatch : ObiConstraintBatch
|
|
{
|
|
// Token: 0x06002AC1 RID: 10945 RVA: 0x0005CC9C File Offset: 0x0005AE9C
|
|
[Token(Token = "0x6002AC1")]
|
|
[Address(RVA = "0xE777C0", Offset = "0xE75FC0", VA = "0x180E777C0")]
|
|
public ObiSkinConstraintBatch(bool cooked, bool sharesParticles)
|
|
{
|
|
List<int> list = new List();
|
|
this.skinIndices = list;
|
|
List<Vector4> list2 = new List();
|
|
this.skinPoints = list2;
|
|
List<Vector4> list3 = new List();
|
|
this.skinNormals = list3;
|
|
List<float> list4 = new List();
|
|
this.skinRadiiBackstop = list4;
|
|
List<float> list5 = new List();
|
|
this.skinStiffnesses = list5;
|
|
int[] array = new int[0];
|
|
this.solverIndices = array;
|
|
base..ctor(cooked, sharesParticles);
|
|
}
|
|
|
|
// Token: 0x06002AC2 RID: 10946 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AC2")]
|
|
[Address(RVA = "0xE77970", Offset = "0xE76170", VA = "0x180E77970")]
|
|
public ObiSkinConstraintBatch(bool cooked, bool sharesParticles, float minYoungModulus, float maxYoungModulus)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AC3 RID: 10947 RVA: 0x0005CD04 File Offset: 0x0005AF04
|
|
[Token(Token = "0x6002AC3")]
|
|
[Address(RVA = "0xA1D290", Offset = "0xA1BA90", VA = "0x180A1D290", Slot = "4")]
|
|
public override Oni.ConstraintType GetConstraintType()
|
|
{
|
|
return Oni.ConstraintType.Skin;
|
|
}
|
|
|
|
// Token: 0x06002AC4 RID: 10948 RVA: 0x0005CD14 File Offset: 0x0005AF14
|
|
[Token(Token = "0x6002AC4")]
|
|
[Address(RVA = "0xE767B0", Offset = "0xE74FB0", VA = "0x180E767B0", Slot = "5")]
|
|
public override void Clear()
|
|
{
|
|
this.activeConstraints.Clear();
|
|
this.skinIndices.Clear();
|
|
this.skinPoints.Clear();
|
|
this.skinNormals.Clear();
|
|
this.skinRadiiBackstop.Clear();
|
|
this.skinStiffnesses.Clear();
|
|
this.constraintCount = (int)((ulong)0L);
|
|
}
|
|
|
|
// Token: 0x06002AC5 RID: 10949 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AC5")]
|
|
[Address(RVA = "0xE76640", Offset = "0xE74E40", VA = "0x180E76640")]
|
|
public void AddConstraint(int index, Vector4 point, Vector4 normal, float radius, float collisionRadius, float backstop, float stiffness)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AC6 RID: 10950 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AC6")]
|
|
[Address(RVA = "0xE775D0", Offset = "0xE75DD0", VA = "0x180E775D0")]
|
|
public void RemoveConstraint(int index)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AC7 RID: 10951 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AC7")]
|
|
[Address(RVA = "0xE76CA0", Offset = "0xE754A0", VA = "0x180E76CA0", Slot = "11")]
|
|
public override List<int> GetConstraintsInvolvingParticle(int particleIndex)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002AC8 RID: 10952 RVA: 0x0005CD74 File Offset: 0x0005AF74
|
|
[Token(Token = "0x6002AC8")]
|
|
[Address(RVA = "0xE76890", Offset = "0xE75090", VA = "0x180E76890", Slot = "6")]
|
|
public override void Cook()
|
|
{
|
|
IntPtr intPtr = Oni.CreateBatch(8, true);
|
|
List<int> list = this.skinIndices;
|
|
this.batch = intPtr;
|
|
int[] array = list.ToArray();
|
|
Vector4[] array2 = this.skinPoints.ToArray();
|
|
Vector4[] array3 = this.skinNormals.ToArray();
|
|
float[] array4 = this.skinRadiiBackstop.ToArray();
|
|
float[] array5 = this.skinStiffnesses.ToArray();
|
|
int constraintCount = this.constraintCount;
|
|
Oni.SetSkinConstraints(intPtr, array, array2, array3, array4, array5, 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[] array6 = new int[this.constraintCount];
|
|
Vector4[] array7 = new Vector4[this.constraintCount];
|
|
int constraintCount2 = this.constraintCount;
|
|
Vector4[] array8 = new Vector4[constraintCount2];
|
|
float[] array9 = new float[constraintCount2];
|
|
float[] array10 = new float[this.constraintCount];
|
|
Oni.GetSkinConstraints(this.batch, array6, array7, array8, array9, array10);
|
|
List<int> list3 = new List(array6);
|
|
this.skinIndices = list3;
|
|
List<Vector4> list4 = new List(array7);
|
|
this.skinPoints = list4;
|
|
List<Vector4> list5 = new List(array8);
|
|
this.skinNormals = list5;
|
|
List<float> list6 = new List(array9);
|
|
this.skinRadiiBackstop = list6;
|
|
List<float> list7 = new List(array10);
|
|
this.skinStiffnesses = list7;
|
|
int[] array11 = new int[Oni.GetBatchPhaseCount(this.batch)];
|
|
Oni.GetBatchPhaseSizes(this.batch, array11);
|
|
List<int> list8 = new List(array11);
|
|
this.phaseSizes = list8;
|
|
}
|
|
Oni.DestroyBatch(this.batch);
|
|
this.batch = (IntPtr)((ulong)0L);
|
|
}
|
|
|
|
// Token: 0x06002AC9 RID: 10953 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002AC9")]
|
|
[Address(RVA = "0xE76EE0", Offset = "0xE756E0", VA = "0x180E76EE0", Slot = "7")]
|
|
protected override void OnAddToSolver(ObiBatchedConstraints constraints)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002ACA RID: 10954 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002ACA")]
|
|
[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: 0x06002ACB RID: 10955 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002ACB")]
|
|
[Address(RVA = "0xE772F0", Offset = "0xE75AF0", VA = "0x180E772F0", Slot = "9")]
|
|
public override void PushDataToSolver(ObiBatchedConstraints constraints)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002ACC RID: 10956 RVA: 0x0005CF1C File Offset: 0x0005B11C
|
|
[Token(Token = "0x6002ACC")]
|
|
[Address(RVA = "0xE770E0", Offset = "0xE758E0", VA = "0x180E770E0", Slot = "10")]
|
|
public override void PullDataFromSolver(ObiBatchedConstraints constraints)
|
|
{
|
|
int num = 0;
|
|
if (!(constraints == num))
|
|
{
|
|
ObiActor actor = constraints.actor;
|
|
int num2 = 0;
|
|
if (!(actor == num2) && constraints.actor.inSolver)
|
|
{
|
|
int[] array = new int[this.constraintCount];
|
|
Vector4[] array2 = new Vector4[this.constraintCount];
|
|
int constraintCount = this.constraintCount;
|
|
Vector4[] array3 = new Vector4[constraintCount];
|
|
float[] array4 = new float[constraintCount];
|
|
float[] array5 = new float[this.constraintCount];
|
|
Oni.GetSkinConstraints(this.batch, array, array2, array3, array4, array5);
|
|
List<Vector4> list = new List(array2);
|
|
this.skinPoints = list;
|
|
List<Vector4> list2 = new List(array3);
|
|
this.skinNormals = list2;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06002ACD RID: 10957 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002ACD")]
|
|
[Address(RVA = "0xE76E40", Offset = "0xE75640", VA = "0x180E76E40")]
|
|
public Vector3 GetSkinPosition(int index)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06002ACE RID: 10958 RVA: 0x000020D3 File Offset: 0x000002D3
|
|
[Token(Token = "0x6002ACE")]
|
|
[Address(RVA = "0xE76DA0", Offset = "0xE755A0", VA = "0x180E76DA0")]
|
|
public Vector3 GetSkinNormal(int index)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x0400339E RID: 13214
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x400339E")]
|
|
[HideInInspector]
|
|
public List<int> skinIndices;
|
|
|
|
// Token: 0x0400339F RID: 13215
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400339F")]
|
|
[HideInInspector]
|
|
public List<Vector4> skinPoints;
|
|
|
|
// Token: 0x040033A0 RID: 13216
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x40033A0")]
|
|
[HideInInspector]
|
|
public List<Vector4> skinNormals;
|
|
|
|
// Token: 0x040033A1 RID: 13217
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x40033A1")]
|
|
[HideInInspector]
|
|
public List<float> skinRadiiBackstop;
|
|
|
|
// Token: 0x040033A2 RID: 13218
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x40033A2")]
|
|
[HideInInspector]
|
|
public List<float> skinStiffnesses;
|
|
|
|
// Token: 0x040033A3 RID: 13219
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x40033A3")]
|
|
private int[] solverIndices;
|
|
}
|
|
}
|