2019-07-07 15:56:52 +00:00
|
|
|
using UnityEngine;
|
|
|
|
using VideoInput;
|
|
|
|
|
|
|
|
namespace Visualizer
|
|
|
|
{
|
|
|
|
class IRPanelBehaviour : MonoBehaviour
|
|
|
|
{
|
2019-10-04 19:58:32 +00:00
|
|
|
[SerializeField] private KinectManagerBehaviour kinectManagerBehaviour = null;
|
|
|
|
[SerializeField] private GameObject panel = null;
|
2019-07-07 15:56:52 +00:00
|
|
|
|
|
|
|
private Renderer renderer_;
|
2019-10-04 19:58:32 +00:00
|
|
|
private static readonly int BaseColorMap = Shader.PropertyToID("_BaseColorMap");
|
2019-10-04 19:52:26 +00:00
|
|
|
|
2019-07-07 15:56:52 +00:00
|
|
|
void Start()
|
|
|
|
{
|
|
|
|
renderer_ = panel.GetComponent<Renderer>();
|
2019-10-04 19:52:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Update()
|
|
|
|
{
|
2019-10-04 19:58:32 +00:00
|
|
|
renderer_.material.SetTexture(BaseColorMap, kinectManagerBehaviour.KinectSensor.InfraredCamera.Data);
|
2019-07-07 15:56:52 +00:00
|
|
|
}
|
|
|
|
}
|
2019-10-05 14:49:30 +00:00
|
|
|
}
|
|
|
|
|