This commit is contained in:
MuHua-123
2024-11-29 18:10:02 +08:00
parent 84243e75a8
commit 698464b9d7
81 changed files with 3073 additions and 671 deletions
+9 -9
View File
@@ -3,30 +3,30 @@ using System.Collections.Generic;
using UnityEngine;
public static class DataSideTool {
public static void SetBezierPositionA(this DataSide side, Vector3 position) {
public static void SetBezierPositionA(this DataPlateSide side, Vector3 position) {
if (side.bezier == Bezier.) { return; }
if (side.bezier == Bezier.) { side.bBezier = position; }
side.aBezier = position;
}
public static void SetBezierPositionB(this DataSide side, Vector3 position) {
public static void SetBezierPositionB(this DataPlateSide side, Vector3 position) {
if (side.bezier == Bezier.) { return; }
if (side.bezier == Bezier.) { side.aBezier = position; }
side.bBezier = position;
}
public static void OneRankBezier(this DataSide side) {
public static void OneRankBezier(this DataPlateSide side) {
side.bezier = Bezier.;
}
public static void TwoRankBezier(this DataSide side) {
public static void TwoRankBezier(this DataPlateSide side) {
side.bezier = Bezier.;
DataPoint a = side.aPoint;
DataPoint b = side.bPoint;
DataPlatePoint a = side.aPoint;
DataPlatePoint b = side.bPoint;
side.aBezier = a.position + (b.position - a.position) * 0.5f;
side.bBezier = a.position + (b.position - a.position) * 0.5f;
}
public static void ThreeRankBezier(this DataSide side) {
public static void ThreeRankBezier(this DataPlateSide side) {
side.bezier = Bezier.;
DataPoint a = side.aPoint;
DataPoint b = side.bPoint;
DataPlatePoint a = side.aPoint;
DataPlatePoint b = side.bPoint;
side.aBezier = a.position + (b.position - a.position) * 0.3f;
side.bBezier = a.position + (b.position - a.position) * 0.7f;
}
+6 -6
View File
@@ -3,10 +3,10 @@ using System.Collections.Generic;
using UnityEngine;
public static class DataSutureTool {
public static float SutureLength(this DataSuture suture) {
if (suture.a.MaxLength < suture.b.MaxLength) {
return suture.a.MaxLength;
}
else { return suture.b.MaxLength; }
}
//public static float SutureLength(this DataSuture suture) {
// if (suture.a.MaxLength < suture.b.MaxLength) {
// return suture.a.MaxLength;
// }
// else { return suture.b.MaxLength; }
//}
}