2019-11-04 21:39:02 +00:00
|
|
|
|
using UnityEngine;
|
2020-03-04 20:47:24 +00:00
|
|
|
|
using UnityEngine.VFX;
|
2019-11-04 21:39:02 +00:00
|
|
|
|
|
|
|
|
|
namespace cylvester
|
|
|
|
|
{
|
|
|
|
|
public class KinectPointCloud : MonoBehaviour
|
|
|
|
|
{
|
2019-11-07 22:52:03 +00:00
|
|
|
|
[SerializeField] private VisualEffect visualEffect;
|
2019-11-04 21:39:02 +00:00
|
|
|
|
|
2019-11-09 15:51:15 +00:00
|
|
|
|
public void OnDepthImageReceived(Texture2D texture)
|
2019-11-04 21:39:02 +00:00
|
|
|
|
{
|
2019-11-07 22:52:03 +00:00
|
|
|
|
visualEffect.SetTexture("DepthImage", texture);
|
2019-11-04 21:39:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-11-09 15:51:15 +00:00
|
|
|
|
public void OnMovementImageReceived(Texture2D texture)
|
2019-11-04 21:39:02 +00:00
|
|
|
|
{
|
2019-11-07 22:52:03 +00:00
|
|
|
|
visualEffect.SetTexture("MovementImage", texture);
|
2019-11-04 21:39:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|