3D Math And Collision Complete

Posted by CodeRedd on April 2, 2014

Today I kicked off my return from my short break with significant progress, polishing off the 3D mathematics library with classes for polygons and quaternions. Along the way, I had a couple noteworthy learning moments, plus some further observation of the book...

Firstly, as the title of my post suggests, I realized that what I have been building here isn't just a set of math and clipping/culling utilities to make life easier once the true engine work begins. These functions I've been creating are quite likely the complete collision system for the engine. I thought I hadn't truly started building the engine yet, but here I am with a working collision system!

Additionally, thanks to a great deal of explanation from 3D Game Engine Programming, I'm happy to say that I finally have a grasp on how quaternion mathematics works! I'd encountered quaternions before, of course, as part of my use of Unity3D on previous projects, but given the tight time constraints I was working under I didn't really take the time to learn to use them outside of adjusting their 3D-space components from time to time. Now that I understand the mathematical meaning behind the four parameters of a quaternion, I suspect I will have a much easier time dealing with rotation in the future!

Finally, another note on the quality of this book's writing: as I was reading through Zerbst and Duvel's introduction to their polygon class, imagine my surprise to find them admitting in the very text of their book that this class was an unplanned feature that was added after much of the book had already been written. The authors fully acknowledge that they only added a full polygon representation after they tried to get along without it when writing the section on scene management. While I've read a fair share of textbooks during my time in school, never before have I seen one that makes the revision process so transparent. If you're wondering why I'm giving such respect to what may seem a small (if unusual) addition, then perhaps I should express it another way. In this small segment, we can see clearly where the authors have made and solved a mistake on behalf of the reader, and promptly exposed that mistake for scrutiny and reflection. And isn't that the entire purpose of an instructional book in the first place?

Progress So Far: Added classes for polygons and quaternions to the engine, completing the 3D math and collision library.


Leave a Reply

(Your email will not be publicly displayed.)

Captcha Code

Click the image to see another captcha.

Follow @CodeRedd11 View Culver  Redd's LinkedIn profileView Culver Redd's profile