using System.Collections; using System.Collections.Generic; using Unity.Collections; using UnityEngine; public enum Bezier { 一阶 = 0, 二阶 = 1, 三阶 = 2 } /// public class DataPlateSide { /// 绑定的板片 public readonly DataPlate plate; /// 初始化 public DataPlateSide(DataPlate plate) => this.plate = plate; #region 核心数据 /// 贝塞尔曲线阶数 public Bezier bezier; /// 起点 public DataPlatePoint aPoint; /// 终点 public DataPlatePoint bPoint; /// 贝塞尔曲线前(-) public Vector3 aBezier; /// 贝塞尔曲线后(+) public Vector3 bBezier; #endregion #region 次要数据 /// 缝合数据 public DataSuture suture; /// 设计缓存数据 public DataPlateSideDesign dataDesign = new DataPlateSideDesign(); /// 烘焙缓存数据 public DataPlateSideBaking dataBaking = new DataPlateSideBaking(); #endregion #region 可视化内容 /// 可视化边缘线 public ModulePrefab designPrefab; #endregion } /// 设计缓存数据 public class DataPlateSideDesign { /// 总长度 public float length; /// public Vector3[] positions = new Vector3[0]; /// 线 public DataPlateLine[] lines = new DataPlateLine[0]; } /// 烘焙缓存数据 public class DataPlateSideBaking { /// 总长度 public float length; /// public Vector3[] positions = new Vector3[0]; /// 线 public DataPlateLine[] lines = new DataPlateLine[0]; /// 关联的网格顶点 public DataPlateVertex[] vertexs = new DataPlateVertex[0]; }