Vectors
You've seen vectors already within this book, and it's possible you think that they are simply a representation of a point in space, such as a vertex. Although it's true that the vector can store this information, it does so in the DirectX API mainly for a convenience. The mathematical definition of a vector is an object that denotes both direction and velocity (or magnitude). For example, if you fire a bullet out of a tank (for which you will write code in the next game), that bullet has both a direction and a velocity. They are stored in one vector, which incidentally has the same members as a vertex, namely x, y, and z components. You're probably thinking, wait, how can you specify these two things with a single set of three coordinates? ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access