Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

QVM: Quaternions, Vectors, Matrices


#include <boost/qvm/mat_operations.hpp>

namespace boost
    namespace qvm
        template <class T>
        perspective_lh( T fov_y, T aspect, T zn, T zf );


A 4x4 projection matrix of unspecified type of the following form:

xs             0              0                 0
0              ys             0                 0
0              0         zf/(zf-zn)   -zn*zf/(zf-zn)
0              0              1                 0

where ys=cot(fov_y/2) and xs=ys/aspect.