Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3: From 2D to 3D: Adding One Ext... > Back to the Fun Stuff: Going Beyond ...

Back to the Fun Stuff: Going Beyond the Bouncy Square

Now we can go back to the example that was used in Chapter 1. Now that we're getting seriously 3D, several things will need to be added to handle the Z-dimension, including a larger dataset for the cube's geometry and color, methods of handing off that data to OpenGL, a more complex frustum definition, any face-culling techniques if needed, and rotations instead of just the translations.

NOTE: Translation means to move an object around in your world up/down, left/right, and forward/backward, while rotation means to rotate the object around any arbitrary axis. And both are considered transformations.

Adding the Geometry

From Chapter 1, you'll remember the data as defined in Listing 3–1. First is the location of the four corners, the vertices, how the vertices connect together, and how they are colored.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint