You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.5 KiB
68 lines
1.5 KiB
using System;
|
|
using System.Runtime.InteropServices;
|
|
using UnityEngine;
|
|
|
|
namespace MU3
|
|
{
|
|
// Token: 0x020004E3 RID: 1251
|
|
public abstract class SwingJointCollider : MonoBehaviour
|
|
{
|
|
// Token: 0x06001EE7 RID: 7911
|
|
public abstract void updateCache(ref SwingJointColliderInformation information);
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
|
public struct SwingJointColliderInformation
|
|
{
|
|
// Token: 0x06001EE4 RID: 7908 RVA: 0x000C32E8 File Offset: 0x000C32E8
|
|
public bool getCollisionPointWithSphere(ref Vector3 collision, ref Vector3 center, float radius)
|
|
{
|
|
Vector3 vector = center - this.position_;
|
|
float num = this.radius_ + radius;
|
|
float sqrMagnitude = vector.sqrMagnitude;
|
|
if (sqrMagnitude >= num * num)
|
|
{
|
|
return false;
|
|
}
|
|
if (1E-05f < sqrMagnitude)
|
|
{
|
|
vector *= num / Mathf.Sqrt(sqrMagnitude);
|
|
}
|
|
else
|
|
{
|
|
vector *= num;
|
|
}
|
|
collision = this.position_ + vector;
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x06001EE5 RID: 7909 RVA: 0x000C3360 File Offset: 0x000C3360
|
|
public int getSideOfPlane(ref Plane palne)
|
|
{
|
|
float num = palne.dot(this.position_);
|
|
if (0f <= num)
|
|
{
|
|
return (num > this.radius_) ? 2 : 1;
|
|
}
|
|
return (-this.radius_ > num) ? 0 : 1;
|
|
}
|
|
|
|
// Token: 0x040048FA RID: 18682
|
|
public const int Side_Back = 0;
|
|
|
|
// Token: 0x040048FB RID: 18683
|
|
public const int Side_Cross = 1;
|
|
|
|
// Token: 0x040048FC RID: 18684
|
|
public const int Side_Front = 2;
|
|
|
|
// Token: 0x040048FD RID: 18685
|
|
public Vector3 position_;
|
|
|
|
// Token: 0x040048FE RID: 18686
|
|
public float radius_;
|
|
}
|
|
}
|