[정영민] 아즈텍 프로젝트 OCTOPUS TWIN 템플릿 적용
26.02.26 - XRLib 추가 및 적용 - 아즈텍 프로젝트 OCTOPUS TWIN 템플릿 적용
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using AZTECHWB.Core;
|
||||
using AZTECHWB.Management;
|
||||
using AZTECHWB.UI;
|
||||
using UVC.UI.Commands;
|
||||
|
||||
namespace AZTECHWB.Command
|
||||
{
|
||||
public class SelectedMachineCommand : ICommand
|
||||
{
|
||||
private bool isSimulation;
|
||||
|
||||
Machine machine;
|
||||
|
||||
public SelectedMachineCommand(Machine machine, bool isSimulation)
|
||||
{
|
||||
this.machine = machine;
|
||||
this.isSimulation = isSimulation;
|
||||
}
|
||||
|
||||
public async void Execute(object? parameter = null)
|
||||
{
|
||||
if (isSimulation)
|
||||
{
|
||||
var aiSimulationManager = AZTECHSceneMain.Instance.GetManager<AISimulationManager>();
|
||||
var data = await aiSimulationManager.SetSimulationResult(machine);
|
||||
|
||||
var InfoPanel = AZTECHSceneMain.Instance.GetManager<AZTECHUIManager>().GetCanvas<PopupCanvas>().GetPanel<AISimulationInfoPanel>();
|
||||
InfoPanel.SetDataInfo(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
var controller = AZTECHAppMain.Instance.cameraController;
|
||||
|
||||
if (controller.viewMode != ViewMode.PerspectiveView)
|
||||
{
|
||||
controller.SetViewMode(ViewMode.PerspectiveView);
|
||||
}
|
||||
|
||||
var centerPos = machine.centerPos;
|
||||
|
||||
controller.currentAzimuth = machine.focusAzimuth;
|
||||
controller.currentElevation = machine.focusElevation;
|
||||
controller.currentDistance = machine.focusDistance;
|
||||
controller.SetTargetPos(centerPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b2157e63c66d8b4eb2aa55b66c2791f
|
||||
Reference in New Issue
Block a user