1
This commit is contained in:
@@ -2,45 +2,45 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class VisualBaking : ModuleVisual<DataPlate> {
|
||||
public Transform viewSpace;
|
||||
public Transform platePrefab;//板片
|
||||
public Transform suturePrefab;//缝合
|
||||
public Transform sutureSidePrefab;//缝合边
|
||||
//public class VisualBaking : ModuleVisual<DataPlate> {
|
||||
// public Transform viewSpace;
|
||||
// public Transform platePrefab;//板片
|
||||
// public Transform suturePrefab;//缝合
|
||||
// public Transform sutureSidePrefab;//缝合边
|
||||
|
||||
protected override void Awake() => ModuleCore.VisualBaking = this;
|
||||
// protected override void Awake() => ModuleCore.VisualBaking = this;
|
||||
|
||||
public override void UpdateVisual(DataPlate plate) {
|
||||
//更新板片
|
||||
Create(ref plate.baking, platePrefab, viewSpace);
|
||||
plate.baking.UpdateVisual(plate);
|
||||
//子数据父对象
|
||||
Transform parent = plate.design.transform;
|
||||
//更新线段
|
||||
plate.sides.ForEach(obj => UpdateVisual(obj, parent));
|
||||
}
|
||||
public override void ReleaseVisual(DataPlate data) {
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
// public override void UpdateVisual(DataPlate plate) {
|
||||
// //更新板片
|
||||
// Create(ref plate.baking, platePrefab, viewSpace);
|
||||
// plate.baking.UpdateVisual(plate);
|
||||
// //子数据父对象
|
||||
// Transform parent = plate.design.transform;
|
||||
// //更新线段
|
||||
// plate.sides.ForEach(obj => UpdateVisual(obj, parent));
|
||||
// }
|
||||
// public override void ReleaseVisual(DataPlate data) {
|
||||
// throw new System.NotImplementedException();
|
||||
// }
|
||||
|
||||
private void UpdateVisual(DataSide side, Transform parent) {
|
||||
//Create(ref side.design, sidePrefab, parent);
|
||||
//side.design.UpdateVisual(side);
|
||||
//更新缝合线
|
||||
if (side.suture == null) { return; }
|
||||
//side.suture.Update();
|
||||
UpdateVisual(side.suture, viewSpace);
|
||||
}
|
||||
/// <summary> 更新缝合数据 </summary>
|
||||
private void UpdateVisual(DataSuture suture, Transform parent) {
|
||||
Create(ref suture.baking, suturePrefab, parent);
|
||||
UpdateVisual(suture.a, suture.baking.transform);
|
||||
UpdateVisual(suture.b, suture.baking.transform);
|
||||
suture.baking.UpdateVisual(suture);
|
||||
}
|
||||
/// <summary> 更新缝合边 </summary>
|
||||
private void UpdateVisual(DataSutureSide sutureSide, Transform parent) {
|
||||
Create(ref sutureSide.baking, sutureSidePrefab, parent);
|
||||
sutureSide.baking.UpdateVisual(sutureSide);
|
||||
}
|
||||
}
|
||||
// private void UpdateVisual(DataSide side, Transform parent) {
|
||||
// //Create(ref side.design, sidePrefab, parent);
|
||||
// //side.design.UpdateVisual(side);
|
||||
// //更新缝合线
|
||||
// if (side.suture == null) { return; }
|
||||
// //side.suture.Update();
|
||||
// UpdateVisual(side.suture, viewSpace);
|
||||
// }
|
||||
// /// <summary> 更新缝合数据 </summary>
|
||||
// private void UpdateVisual(DataSuture suture, Transform parent) {
|
||||
// Create(ref suture.baking, suturePrefab, parent);
|
||||
// UpdateVisual(suture.a, suture.baking.transform);
|
||||
// UpdateVisual(suture.b, suture.baking.transform);
|
||||
// suture.baking.UpdateVisual(suture);
|
||||
// }
|
||||
// /// <summary> 更新缝合边 </summary>
|
||||
// private void UpdateVisual(DataSutureSide sutureSide, Transform parent) {
|
||||
// Create(ref sutureSide.baking, sutureSidePrefab, parent);
|
||||
// sutureSide.baking.UpdateVisual(sutureSide);
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -5,53 +5,53 @@ using UnityEngine;
|
||||
/// <summary>
|
||||
/// 版片可视化模块
|
||||
/// </summary>
|
||||
public class VisualDesign : ModuleVisual<DataPlate> {
|
||||
public Transform viewSpace;
|
||||
public Transform platePrefab;//板片
|
||||
public Transform pointPrefab;//点
|
||||
public Transform sidePrefab;//边
|
||||
public Transform suturePrefab;//缝合
|
||||
public Transform sutureSidePrefab;//缝合边
|
||||
//public class VisualDesign : ModuleVisual<DataPlate> {
|
||||
// public Transform viewSpace;
|
||||
// public Transform platePrefab;//板片
|
||||
// public Transform pointPrefab;//点
|
||||
// public Transform sidePrefab;//边
|
||||
// public Transform suturePrefab;//缝合
|
||||
// public Transform sutureSidePrefab;//缝合边
|
||||
|
||||
protected override void Awake() => ModuleCore.VisualDesign = this;
|
||||
// protected override void Awake() => ModuleCore.VisualDesign = this;
|
||||
|
||||
public override void UpdateVisual(DataPlate plate) {
|
||||
//更新板片
|
||||
Create(ref plate.design, platePrefab, viewSpace);
|
||||
plate.design.UpdateVisual(plate);
|
||||
//子数据父对象
|
||||
Transform parent = plate.design.transform;
|
||||
//更新点
|
||||
plate.points.ForEach(obj => UpdateVisual(obj, parent));
|
||||
//更新线段
|
||||
plate.sides.ForEach(obj => UpdateVisual(obj, parent));
|
||||
}
|
||||
public override void ReleaseVisual(DataPlate data) {
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
// public override void UpdateVisual(DataPlate plate) {
|
||||
// //更新板片
|
||||
// Create(ref plate.design, platePrefab, viewSpace);
|
||||
// plate.design.UpdateVisual(plate);
|
||||
// //子数据父对象
|
||||
// Transform parent = plate.design.transform;
|
||||
// //更新点
|
||||
// plate.points.ForEach(obj => UpdateVisual(obj, parent));
|
||||
// //更新线段
|
||||
// plate.sides.ForEach(obj => UpdateVisual(obj, parent));
|
||||
// }
|
||||
// public override void ReleaseVisual(DataPlate data) {
|
||||
// throw new System.NotImplementedException();
|
||||
// }
|
||||
|
||||
private void UpdateVisual(DataPoint point, Transform parent) {
|
||||
Create(ref point.visual, pointPrefab, parent);
|
||||
point.visual.UpdateVisual(point);
|
||||
}
|
||||
private void UpdateVisual(DataSide side, Transform parent) {
|
||||
Create(ref side.design, sidePrefab, parent);
|
||||
side.design.UpdateVisual(side);
|
||||
//更新缝合线
|
||||
if (side.suture == null) { return; }
|
||||
side.suture.Update();
|
||||
UpdateVisual(side.suture, viewSpace);
|
||||
}
|
||||
/// <summary> 更新缝合数据 </summary>
|
||||
private void UpdateVisual(DataSuture suture, Transform parent) {
|
||||
Create(ref suture.design, suturePrefab, parent);
|
||||
UpdateVisual(suture.a, suture.design.transform);
|
||||
UpdateVisual(suture.b, suture.design.transform);
|
||||
suture.design.UpdateVisual(suture);
|
||||
}
|
||||
/// <summary> 更新缝合边 </summary>
|
||||
private void UpdateVisual(DataSutureSide sutureSide, Transform parent) {
|
||||
Create(ref sutureSide.design, sutureSidePrefab, parent);
|
||||
sutureSide.design.UpdateVisual(sutureSide);
|
||||
}
|
||||
}
|
||||
// private void UpdateVisual(DataPoint point, Transform parent) {
|
||||
// Create(ref point.visual, pointPrefab, parent);
|
||||
// point.visual.UpdateVisual(point);
|
||||
// }
|
||||
// private void UpdateVisual(DataSide side, Transform parent) {
|
||||
// Create(ref side.design, sidePrefab, parent);
|
||||
// side.design.UpdateVisual(side);
|
||||
// //更新缝合线
|
||||
// if (side.suture == null) { return; }
|
||||
// side.suture.Update();
|
||||
// UpdateVisual(side.suture, viewSpace);
|
||||
// }
|
||||
// /// <summary> 更新缝合数据 </summary>
|
||||
// private void UpdateVisual(DataSuture suture, Transform parent) {
|
||||
// Create(ref suture.design, suturePrefab, parent);
|
||||
// UpdateVisual(suture.a, suture.design.transform);
|
||||
// UpdateVisual(suture.b, suture.design.transform);
|
||||
// suture.design.UpdateVisual(suture);
|
||||
// }
|
||||
// /// <summary> 更新缝合边 </summary>
|
||||
// private void UpdateVisual(DataSutureSide sutureSide, Transform parent) {
|
||||
// Create(ref sutureSide.design, sutureSidePrefab, parent);
|
||||
// sutureSide.design.UpdateVisual(sutureSide);
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class VisualPlateBaking : ModuleVisual<DataPlate> {
|
||||
public Transform viewSpace;
|
||||
public Transform platePrefab;//板片
|
||||
public Transform suturePrefab;//缝合
|
||||
public Transform sutureSidePrefab;//缝合边
|
||||
|
||||
protected override void Awake() => ModuleCore.VisualPlateBaking = this;
|
||||
|
||||
public override void UpdateVisual(DataPlate plate) {
|
||||
//更新板片
|
||||
Create(ref plate.bakingPrefab, platePrefab, viewSpace);
|
||||
plate.bakingPrefab.UpdateVisual(plate);
|
||||
//子数据父对象
|
||||
Transform parent = plate.designPrefab.transform;
|
||||
//更新线段
|
||||
plate.plateSides.ForEach(obj => UpdateVisual(obj, parent));
|
||||
}
|
||||
public override void ReleaseVisual(DataPlate data) {
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
private void UpdateVisual(DataPlateSide side, Transform parent) {
|
||||
//Create(ref side.design, sidePrefab, parent);
|
||||
//side.design.UpdateVisual(side);
|
||||
//更新缝合线
|
||||
//if (side.suture == null) { return; }
|
||||
//side.suture.Update();
|
||||
//UpdateVisual(side.suture, viewSpace);
|
||||
}
|
||||
/// <summary> 更新缝合数据 </summary>
|
||||
private void UpdateVisual(DataSuture suture, Transform parent) {
|
||||
Create(ref suture.baking, suturePrefab, parent);
|
||||
UpdateVisual(suture.a, suture.baking.transform);
|
||||
UpdateVisual(suture.b, suture.baking.transform);
|
||||
suture.baking.UpdateVisual(suture);
|
||||
}
|
||||
/// <summary> 更新缝合边 </summary>
|
||||
private void UpdateVisual(DataSutureSide sutureSide, Transform parent) {
|
||||
Create(ref sutureSide.baking, sutureSidePrefab, parent);
|
||||
sutureSide.baking.UpdateVisual(sutureSide);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef4a839345dfb344382e257d374ca3ed
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 版片可视化模块
|
||||
/// </summary>
|
||||
public class VisualPlateDesign : ModuleVisual<DataPlate> {
|
||||
public Transform viewSpace;
|
||||
public Transform platePrefab;//板片
|
||||
public Transform pointPrefab;//点
|
||||
public Transform sidePrefab;//边
|
||||
|
||||
protected override void Awake() => ModuleCore.VisualPlateDesign = this;
|
||||
|
||||
public override void UpdateVisual(DataPlate plate) {
|
||||
//更新板片
|
||||
Create(ref plate.designPrefab, platePrefab, viewSpace);
|
||||
plate.designPrefab.UpdateVisual(plate);
|
||||
//子数据父对象
|
||||
Transform parent = plate.designPrefab.transform;
|
||||
//更新点
|
||||
plate.platePoints.ForEach(obj => UpdateVisual(obj, parent));
|
||||
//更新线段
|
||||
plate.plateSides.ForEach(obj => UpdateVisual(obj, parent));
|
||||
}
|
||||
public override void ReleaseVisual(DataPlate data) {
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
private void UpdateVisual(DataPlatePoint point, Transform parent) {
|
||||
Create(ref point.visual, pointPrefab, parent);
|
||||
point.visual.UpdateVisual(point);
|
||||
}
|
||||
private void UpdateVisual(DataPlateSide side, Transform parent) {
|
||||
Create(ref side.designPrefab, sidePrefab, parent);
|
||||
side.designPrefab.UpdateVisual(side);
|
||||
//更新缝合线
|
||||
if (side.suture != null) { side.suture.UpdateVisual(); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f9827f83f79c2af42b2a06bdc3c80719
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 缝合烘焙可视化模块
|
||||
/// </summary>
|
||||
public class VisualSutureBaking : ModuleVisual<DataSuture> {
|
||||
public Transform viewSpace;
|
||||
public Transform suturePrefab;//缝合
|
||||
public Transform sutureSidePrefab;//缝合边
|
||||
|
||||
protected override void Awake() => ModuleCore.VisualSutureBaking = this;
|
||||
|
||||
public override void UpdateVisual(DataSuture suture) {
|
||||
Create(ref suture.baking, suturePrefab, viewSpace);
|
||||
suture.baking.UpdateVisual(suture);
|
||||
|
||||
UpdateVisual(suture.a, suture.baking.transform);
|
||||
UpdateVisual(suture.b, suture.baking.transform);
|
||||
}
|
||||
public override void ReleaseVisual(DataSuture data) {
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary> 更新缝合边 </summary>
|
||||
private void UpdateVisual(DataSutureSide sutureSide, Transform parent) {
|
||||
Create(ref sutureSide.baking, sutureSidePrefab, parent);
|
||||
sutureSide.baking.UpdateVisual(sutureSide);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06ff2a0f351be2d41aa7c8dfc23798e0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// 缝合设计可视化模块
|
||||
/// </summary>
|
||||
public class VisualSutureDesign : ModuleVisual<DataSuture> {
|
||||
public Transform viewSpace;
|
||||
public Transform suturePrefab;//缝合
|
||||
public Transform sutureSidePrefab;//缝合边
|
||||
|
||||
protected override void Awake() => ModuleCore.VisualSutureDesign = this;
|
||||
|
||||
public override void UpdateVisual(DataSuture suture) {
|
||||
Create(ref suture.design, suturePrefab, viewSpace);
|
||||
suture.design.UpdateVisual(suture);
|
||||
|
||||
UpdateVisual(suture.a, suture.design.transform);
|
||||
UpdateVisual(suture.b, suture.design.transform);
|
||||
}
|
||||
public override void ReleaseVisual(DataSuture data) {
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary> 更新缝合边 </summary>
|
||||
private void UpdateVisual(DataSutureSide sutureSide, Transform parent) {
|
||||
Create(ref sutureSide.design, sutureSidePrefab, parent);
|
||||
sutureSide.design.UpdateVisual(sutureSide);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a43eabbe6a52df943b5157da8933dd33
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user