O'Reilly logo

3D Math Primer for Graphics and Game Development by Ian Parberry, Fletcher Dunn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6

A Simple 3D Vector Class

This chapter puts theory into practice with a simple C++ vector class, Vector3.Itis divided into three main sections.

image  Section 6.1 discusses the operations we want to implement in Vector3.

image  Section 6.2 contains the complete code listing for Vector3.

image  Section 6.3 discusses some of the design decisions embodied in class Vector3 (and all of the other C++ classes in this book).

The preceding chapters have focused ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required