2019-09-29 10:00:16 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace cylvester
|
|
|
|
{
|
|
|
|
public interface IPdSpectrumBind
|
|
|
|
{
|
2019-09-29 19:53:47 +00:00
|
|
|
IPdArray GetPdArray(int index);
|
|
|
|
int Channel { get; set; }
|
2019-09-29 17:47:17 +00:00
|
|
|
int Energy { get; set; }
|
2019-09-29 10:00:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public class PdSpectrumBind : MonoBehaviour, IPdSpectrumBind
|
|
|
|
{
|
2019-09-29 19:53:47 +00:00
|
|
|
[SerializeField] private PdBackend pdBackend;
|
2019-10-01 17:30:17 +00:00
|
|
|
[SerializeField] private Rect selection;
|
2019-09-29 19:53:47 +00:00
|
|
|
|
|
|
|
public IPdArray GetPdArray(int index)
|
2019-09-29 10:00:16 +00:00
|
|
|
{
|
2019-10-01 13:08:35 +00:00
|
|
|
return pdBackend.fftArrayContainer[index];
|
2019-09-29 10:00:16 +00:00
|
|
|
}
|
2019-09-29 19:53:47 +00:00
|
|
|
|
|
|
|
public int Channel { get; set; }
|
2019-09-29 17:47:17 +00:00
|
|
|
public int Energy { get; set; }
|
2019-09-29 10:00:16 +00:00
|
|
|
}
|
|
|
|
}
|