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.

Joe asks:
Joe asks:
Why Not Just Use a Library?

There are decent 3D libraries for Android out there, ranging from libgdx,[36] a thin open-source wrapper, to more advanced commercial frameworks such as Unity3D.[37] These libraries can help improve your productivity, ...

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.