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

123 lines
4.1 KiB
C#

using System;
using System.Collections.Generic;
using Cpp2IlInjected;
using UnityEngine;
namespace Obi
{
// Token: 0x020004BC RID: 1212
[Token(Token = "0x20004BC")]
[DisallowMultipleComponent]
public class ObiAerodynamicConstraints : ObiBatchedConstraints
{
// Token: 0x06002AE5 RID: 10981 RVA: 0x0005D28C File Offset: 0x0005B48C
[Token(Token = "0x6002AE5")]
[Address(RVA = "0x47E530", Offset = "0x47CD30", VA = "0x18047E530", Slot = "8")]
public override Oni.ConstraintType GetConstraintType()
{
return Oni.ConstraintType.Aerodynamics;
}
// Token: 0x06002AE6 RID: 10982 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AE6")]
[Address(RVA = "0x10C2430", Offset = "0x10C0C30", VA = "0x1810C2430", Slot = "9")]
public override List<ObiConstraintBatch> GetBatches()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002AE7 RID: 10983 RVA: 0x0005D29C File Offset: 0x0005B49C
[Token(Token = "0x6002AE7")]
[Address(RVA = "0x10C2810", Offset = "0x10C1010", VA = "0x1810C2810")]
public void OnValidate()
{
float num = this.airDensity;
float num2 = Mathf.Max((float)0, num);
float num3 = this.dragCoefficient;
this.airDensity = num2;
float num4 = Mathf.Max((float)0, num3);
float num5 = this.liftCoefficient;
this.dragCoefficient = num4;
float num6 = Mathf.Max((float)0, num5);
this.liftCoefficient = num6;
}
// Token: 0x06002AE8 RID: 10984 RVA: 0x0005D2F0 File Offset: 0x0005B4F0
[Token(Token = "0x6002AE8")]
[Address(RVA = "0x10C23D0", Offset = "0x10C0BD0", VA = "0x1810C23D0", Slot = "10")]
public override void Clear()
{
int num = 0;
bool flag = base.RemoveFromSolver(num);
this.batches.Clear();
}
// Token: 0x06002AE9 RID: 10985 RVA: 0x0005D318 File Offset: 0x0005B518
[Token(Token = "0x6002AE9")]
[Address(RVA = "0x10C2330", Offset = "0x10C0B30", VA = "0x1810C2330")]
public void AddBatch(ObiAerodynamicConstraintBatch batch)
{
if (batch != 0)
{
int constraintType = (int)batch.GetConstraintType();
Oni.ConstraintType constraintType2 = this.GetConstraintType();
if (constraintType == (int)constraintType2)
{
this.batches.Add(batch);
}
}
}
// Token: 0x06002AEA RID: 10986 RVA: 0x0005D350 File Offset: 0x0005B550
[Token(Token = "0x6002AEA")]
[Address(RVA = "0x10C2860", Offset = "0x10C1060", VA = "0x1810C2860")]
public void RemoveBatch(ObiAerodynamicConstraintBatch batch)
{
bool flag = this.batches.Remove(batch);
}
// Token: 0x06002AEB RID: 10987 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002AEB")]
[Address(RVA = "0x10C2560", Offset = "0x10C0D60", VA = "0x1810C2560")]
public void OnDrawGizmosSelected()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002AEC RID: 10988 RVA: 0x0005D370 File Offset: 0x0005B570
[Token(Token = "0x6002AEC")]
[Address(RVA = "0x10C28C0", Offset = "0x10C10C0", VA = "0x1810C28C0")]
public ObiAerodynamicConstraints()
{
List<ObiAerodynamicConstraintBatch> list = new List();
this.batches = list;
base..ctor();
}
// Token: 0x040033AE RID: 13230
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40033AE")]
[Tooltip("Air density in kg/m3. Higher densities will make both drag and lift forces stronger.")]
public float airDensity = 1.225f;
// Token: 0x040033AF RID: 13231
[FieldOffset(Offset = "0x34")]
[Token(Token = "0x40033AF")]
[Tooltip("How much is the cloth affected by drag forces. Extreme values can cause the cloth to behave unrealistically, so use with care.")]
public float dragCoefficient = 0.05f;
// Token: 0x040033B0 RID: 13232
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40033B0")]
[Tooltip("How much is the cloth affected by lift forces. Extreme values can cause the cloth to behave unrealistically, so use with care.")]
public float liftCoefficient = 0.05f;
// Token: 0x040033B1 RID: 13233
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40033B1")]
[HideInInspector]
[SerializeField]
private List<ObiAerodynamicConstraintBatch> batches;
}
}