Adding a Geometry Class
We now have a good idea of what we need to build a puck and a mallet: for the puck, we need one triangle fan for the top and one triangle strip for the side; for the mallet, we need two triangle fans and two triangle strips. To make it easier to build these objects, we’ll define a Geometry class to hold some basic shape definitions and an ObjectBuilder to do the actual building.
Get OpenGL ES 2 for Android now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.