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; }
|
|
|
|
ref Rect Selection { get; }
|
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;
|
|
|
|
private Rect selection_;
|
|
|
|
|
|
|
|
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; }
|
|
|
|
public ref Rect Selection => ref selection_;
|
2019-09-29 17:47:17 +00:00
|
|
|
public int Energy { get; set; }
|
2019-09-29 10:00:16 +00:00
|
|
|
}
|
|
|
|
}
|