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 ...

Get 3D Math Primer for Graphics and Game Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.