June 2013
Intermediate to advanced
346 pages
8h 42m
English
We’ll start off by separating our vertex data into separate classes, with one class to represent each type of physical object. We’ll create one class for our table and another for our mallet. We won’t need one for the line, since there’s already a line on our texture.
We’ll also create a separate class to encapsulate the actual vertex array and to reduce code duplication. Our class structure will look as follows:

We’ll create Mallet to manage the mallet data and Table to manage the table data; and each class will have an instance of VertexArray, which will encapsulate the FloatBuffer storing ...
Read now
Unlock full access