From 22891bf59032ba88262824255a706d652031384b Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 10 Mar 2022 14:07:40 +0800 Subject: * move folder --- .../XWeaponTrail/Scripts/SplineControlPoint.cs | 123 --------------------- 1 file changed, 123 deletions(-) delete mode 100644 Assets/ThirdParty/XWeaponTrail/Scripts/SplineControlPoint.cs (limited to 'Assets/ThirdParty/XWeaponTrail/Scripts/SplineControlPoint.cs') diff --git a/Assets/ThirdParty/XWeaponTrail/Scripts/SplineControlPoint.cs b/Assets/ThirdParty/XWeaponTrail/Scripts/SplineControlPoint.cs deleted file mode 100644 index 9f8602c6..00000000 --- a/Assets/ThirdParty/XWeaponTrail/Scripts/SplineControlPoint.cs +++ /dev/null @@ -1,123 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace XftWeapon { - public class SplineControlPoint - { - public Vector3 Position; - public Vector3 Normal; - - public int ControlPointIndex = -1; - public int SegmentIndex = -1; - - public float Dist; - - protected Spline mSpline; - - - public SplineControlPoint NextControlPoint - { - get - { - return mSpline.NextControlPoint(this); - } - } - - public SplineControlPoint PreviousControlPoint - { - get - { - return mSpline.PreviousControlPoint(this); - } - } - - public Vector3 NextPosition - { - get - { - return mSpline.NextPosition(this); - } - } - - - public Vector3 PreviousPosition - { - get - { - return mSpline.PreviousPosition(this); - - } - } - - - public Vector3 NextNormal - { - get - { - return mSpline.NextNormal(this); - } - } - - - public Vector3 PreviousNormal - { - get { return mSpline.PreviousNormal(this); } - } - - public bool IsValid - { - get - { - return (NextControlPoint != null); - } - } - - - Vector3 GetNext2Position() - { - SplineControlPoint cp = NextControlPoint; - if (cp != null) - return cp.NextPosition; - return NextPosition; - } - - - Vector3 GetNext2Normal() - { - SplineControlPoint cp = NextControlPoint; - if (cp != null) - return cp.NextNormal; - - - return Normal; - } - - - public Vector3 Interpolate(float localF) - { - localF = Mathf.Clamp01(localF); - - return Spline.CatmulRom(PreviousPosition, Position, NextPosition, GetNext2Position(), localF); - - } - - - public Vector3 InterpolateNormal(float localF) - { - localF = Mathf.Clamp01(localF); - - return Spline.CatmulRom(PreviousNormal, Normal, NextNormal, GetNext2Normal(), localF); - } - - - public void Init(Spline owner) - { - mSpline = owner; - SegmentIndex = -1; - } - - } -} - - -- cgit v1.1-26-g67d0