/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kinectintruderalarm;

import java.util.logging.Level;
import java.util.logging.Logger;

/**An example application that connects to a kinectTCP server and shows
 * all data: depth, rgb, point cloud, skeleton, audio. Double clicking the
 * executable jar file executes this file.
 *
 * @author Rolf Lakaemper
 */
public class Utils {
    // ------------------------------------------------------------------------

    public Utils() {
    }

    // ------------------------------------------------------------------------
    public static void showData(){
        KinectOutputLIGHT ko = new KinectOutputLIGHT();
        ko.depthXYZ.setViewParameters(45, 55, 1500);
        // start loop
        int count = 0;
        while (true) {
            if (true) {
                int[][] depthXYZ = null;
                String filename = "DATA/DepthFile" + count + ".txt";
                depthXYZ = KinectTCPClientLIGHT.readDepthFileTo2DArray(filename);
                if (depthXYZ != null) {

                    ko.displayDepthXYZ(depthXYZ);
                    count++;
                } else {
                    break;
                }
            }
            try {
                Thread.sleep(20);
            } catch (InterruptedException ex) {
            }
        }
    }
}
