Skip to Main Content
3D Game Engine Design, 2nd Edition
book

3D Game Engine Design, 2nd Edition

by David Eberly
November 2006
Intermediate to advanced content levelIntermediate to advanced
1040 pages
26h 31m
English
CRC Press
Content preview from 3D Game Engine Design, 2nd Edition
132 Chapter 2 The Graphics System
{
Vector2 P; // P[2] = 0 and P[3] = 0 are set by the constructor
P[0] = row0.Dot(V);
P[1] = row1.Dot(V);
return P;
}
};
In this implementation, the classes use additional memory that is always zeroed out,
but takes advantage of hardware-assisted computations. The vectors are stored in
linear memory as
v0 v1 0 0
and the matrices are stored in linear memory as
m00 m01 0 0 m10 m11 0 0
In all three implementations, the outputs of a matrix-vector operation all represent
the same 2-tuple.
Generally, for 4-tuples and 4 × 4 matrices, the 16-byte alignment is achieved
without padding. Essentially, we have four possibilities for storing the matrices and
representing the vector-matrix product. The vector is either on the right or on
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.
Start your free trial

You might also like

3D Game Engine Architecture

3D Game Engine Architecture

David Eberly
Blender 3D By Example - Second Edition

Blender 3D By Example - Second Edition

Oscar Baechler, Xury Greer
Computer Graphics

Computer Graphics

Alexey Boreskov, Evgeniy Shikin

Publisher Resources

ISBN: 9781482267303