Ok, let me explain how this project is used.
That’s exactly right, this project is accepting lines from the scanner on an infinite loop, updating things in the program according to structured strings put into the console.
The actual use of this is to read data from a microsoft kinect. Once again, this is only a pet project, so I didn’t want to get bogged down in confusing libraries.
I found a program online that outputs data from the kinect into lines on the command prompt. So for example, if two people are walking around a room, the output can look like this, where a new line is written every fraction of a second or so:
user 1: head at (444, 444, 444)
user 2: head at (1001, 1000, 1000)
user 1: head at (444, 445, 444)
user 2: head at (1002, 1000, 1000)
user 1: head at (444, 446, 444)
user 2: head at (1003, 1000, 1000)
user 1: head at (444, 447, 444)
user 2: head at (1004, 1000, 1000)
By piping this data into my Jar in the command line, I can very easily pipe all this data into my program.
For example, I can do this like this in the command line:
NISimpleSkeleton.exe | java -jar project.jar
where NISimpleSkeleton.exe is the program that outputs the data from the kinect into the command line. My JAR reads this data in real time and updates the program accordingly.
This method of organization works very well. The only problems came from when I changed the “engine” of this project to the LWJGL, at which point it stopped working for the simple reason that it stopped being able to accept the data from the command line.
That is how I am using the scanner, I hope that brings light to the issue.