2026-01-26 18:56:53 +09:00

56 lines
1.9 KiB
C#

/*
* Copyright (c) 2025 LG Electronics Inc.
* SPDX-License-Identifier: LicenseRef-LGE-Proprietary
*/
using Aurora.View;
using Newtonsoft.Json;
using System;
namespace VisionCommon {
public enum eStaticCenterType {
Center, LL
}
/// <summary>
/// 자재 좌표계 구성을 위한 레시피
/// </summary>
public class CalRecipe : ICloneCopy<CalRecipe> {
/// <summary>
/// 기준 좌표계 대비 자재 좌표계의 방향을 설정
/// </summary>
public CoordSystem CoordSystem { get; set; } = new CoordSystem();
/// <summary>
/// FOV 간의 X, Y축 방향으로의 거리
/// </summary>
public StaticPoint FovDistance { get; set; } = new StaticPoint();
/// <summary>
/// 얼라인 보정량 계산과 보정량 적용을 위한 회전 중심
/// </summary>
public StaticPoint ThetaOrigin { get; set; } = new StaticPoint(); // [mm]
public eStaticCenterType StaticCenterType { get; set; } = eStaticCenterType.Center;
/// <summary>
/// 깊은 복사
/// </summary>
/// <returns></returns>
public CalRecipe Clone() {
return ((ICloneable)this).Clone() as CalRecipe;
}
/// <summary>
/// 데이터 복사 (this -> target)
/// </summary>
/// <param name="target"></param>
public void CopyTo(CalRecipe target) {
target.CoordSystem = this.CoordSystem.Clone() as CoordSystem;
target.ThetaOrigin = this.ThetaOrigin.Clone() as StaticPoint;
target.FovDistance = this.FovDistance.Clone() as StaticPoint;
target.StaticCenterType = this.StaticCenterType;
}
object ICloneable.Clone() {
var cloneObj = new CalRecipe();
CopyTo(cloneObj);
return cloneObj;
}
}
}