The key event may be key pressed, Key released or key typed.
The key event is passed to the registered Key Listener.
I feel like it would be very difficult to use the vertex array directly, so I have a simple class to represent a triangle using a This just makes a spiky jumbled mess of triangles that is extremely laggy to render.
Also, during rendering, the triangles are converted back into a float array of vertices.
is a byte stream so you can't read from it directly if you want to read character strings, which is what you normally want to do.
Hence you must wrap a Scanner object around to handle string oriented IO.
There a lots of variations on this problem but lets start with a simple case and then have a look at some possible variations.
Probably the simplest case is a left aligned triangle of stars that looks like this: Then we need to work out how to print each line.
(Validating triangles) Write a program that reads three edges for a triangle and determines whether the input is valid.
My meshes are created / loaded using a VBO, so the vertex data is stored in a very large float array as ?
Would I need to convert this data into a more usable data structure such as a list of faces, or would it be possible to use this directly?
The following statement accomplishes this task: If you want to treat directly as a character stream, use the Console class instead, which is discussed below.
Oftentimes you will want to read a line of user input and then break it into typed fields.