-
Notifications
You must be signed in to change notification settings - Fork 38
/
ArucoCameraCalibrationGeneric.cs
39 lines (34 loc) · 1.04 KB
/
ArucoCameraCalibrationGeneric.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using ArucoUnity.Cameras;
using UnityEngine;
namespace ArucoUnity.Calibration
{
public abstract class ArucoCameraCalibrationGeneric<T, U> : ArucoCameraCalibration
where T : ArucoCamera
where U : CalibrationFlags
{
// Editor fields
[SerializeField]
[Tooltip("The camera system to use.")]
private T arucoCamera;
[SerializeField]
[Tooltip("The flags for the cameras calibration.")]
protected U calibrationFlags;
// MonoBehaviour methods
/// <summary>
/// Sets <see cref="ArucoCameraController.ArucoCamera"/> and <see cref="ArucoCameraCalibration.CalibrationFlags"/>
/// with editor fields if not nulls.
/// </summary>
protected override void Awake()
{
base.Awake();
if (arucoCamera != null)
{
ArucoCamera = arucoCamera;
}
if (calibrationFlags != null)
{
CalibrationFlags = calibrationFlags;
}
}
}
}