1
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
//}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user