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
262 GPGPU Programming for Games and Science
template <int N, typename Real>
Vector <N, Real> Cr os s ( Vector<N, Real> const& v0 , Vector <N, Real> const&v1);
template <int N, typename Real>
Vector <N, Real> UnitCross ( Vector <N, Real> const&v0,
Vector <N, Real> const&v1);
template <int N, typename Real>
Real DotCross ( Vector<N, Real> const& v0 , Vector <N, Real> const&v1,
Vector <N, Real> const&v2);
LISTING 6.7: The vector interface for cross products and dot-cross, where
N is three or four.
The function
Cross computes the cross product of the inputs. If you require a
unit-length orthogonal vector, the cross product can be normalized, a result
returned by function
UnitCross. If the cross product is zero, the function re-
turns the zero vector. Simila
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