Skip to Content
GPGPU Programming for Games and Science
book

GPGPU Programming for Games and Science

by David H. Eberly
August 2014
Intermediate to advanced
469 pages
16h 30m
English
A K Peters/CRC Press
Content preview from GPGPU Programming for Games and Science
282 GPGPU Programming for Games and Science
// special matrices
static Matrix4x4 Zero ();
static Matrix4x4 Identity ();
} ;
LISTING 6.25: The class interface for 4 × 4 matrices.
The constructors are for the specific size four. The constructor and assignment
operator for the base class are provided to allow implicit conversions. Static
functions are implemented to return the zero matrix and the identity matrix.
We use functions to avoid the standard template dilemma of declaring static
members that might be instantiated in multiple modules.
Geometric operations are implemented outside the class; see Listing 6.26.
template <typename Real>
Matrix4x4<Real> Inverse (Matrix4x4<Real> const&M);
template <typename Real>
Matrix4x4<Real> Adjoint (Matrix4x4<Real> co ...
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

Graphics Gems V (IBM Version)

Graphics Gems V (IBM Version)

Alan W. Paeth
GPU Pro 6

GPU Pro 6

Wolfgang Engel

Publisher Resources

ISBN: 9781466595354