Classes | |
| class | Mat2 |
| A linear algebra matrix class of fixed type and size 2. More... | |
| class | Mat3 |
| A linear algebra matrix class of fixed type and size 3. More... | |
| class | Mat4 |
| A linear algebra matrix class of fixed type and size 4. More... | |
| class | Transform2 |
| A 2D affine transformation represented as a 3x3 matrix. More... | |
| class | Transform3 |
| A 3D affine transformation represented as a 4x4 matrix. More... | |
| class | Vec2 |
| A linear algebra vector class of fixed type and size 2. More... | |
| class | Vec3 |
| A linear algebra vector class of fixed type and size 3. More... | |
| class | Vec4 |
| A linear algebra vector class of fixed type and size 4. More... | |
3D-specific operators. | |
| template<typename T> T | dot (const Vec3< T > &v, const Vec3< T > &w) |
| Return the dot product of two 3D vectors. | |
| template<typename T> Vec3< T > | cross (const Vec3< T > &v, const Vec3< T > &w) |
| Return the cross product of two 3D vectors. | |
Typedefs | |
| typedef Mat2< float > | Mat2f |
| A float matrix. | |
| typedef Mat2< double > | Mat2d |
| A double matrix. | |
| typedef Mat2< int > | Mat2i |
| A int matrix. | |
| typedef Mat2< unsigned > | Mat2u |
| An unsigned int matrix. | |
| typedef Mat3< float > | Mat3f |
| A float matrix. | |
| typedef Mat3< double > | Mat3d |
| A double matrix. | |
| typedef Mat3< int > | Mat3i |
| A int matrix. | |
| typedef Mat3< unsigned > | Mat3u |
| An unsigned int matrix. | |
| typedef Mat4< float > | Mat4f |
| A float matrix. | |
| typedef Mat4< double > | Mat4d |
| A double matrix. | |
| typedef Mat4< int > | Mat4i |
| A int matrix. | |
| typedef Mat4< unsigned > | Mat4u |
| An unsigned int matrix. | |
| typedef Transform2< float > | Transform2f |
| A 2D float transform. | |
| typedef Transform2< double > | Transform2d |
| A 2D double transform. | |
| typedef Transform2< int > | Transform2i |
| A 2D int transform. | |
| typedef Transform2< unsigned > | Transform2u |
| A 2D unsigned transform. | |
| typedef Transform3< float > | Transform3f |
| A 3D float transform. | |
| typedef Transform3< double > | Transform3d |
| A 3D double transform. | |
| typedef Transform3< int > | Transform3i |
| A 3D int transform. | |
| typedef Transform3< unsigned > | Transform3u |
| A 3D unsigned transform. | |
| typedef Vec2< float > | Vec2f |
| A float vector. | |
| typedef Vec2< double > | Vec2d |
| A double vector. | |
| typedef Vec2< int > | Vec2i |
| A int vector. | |
| typedef Vec2< unsigned > | Vec2u |
| An unsigned int vector. | |
| typedef Vec3< float > | Vec3f |
| A float vector. | |
| typedef Vec3< double > | Vec3d |
| A double vector. | |
| typedef Vec3< int > | Vec3i |
| A int vector. | |
| typedef Vec3< unsigned > | Vec3u |
| An unsigned int vector. | |
| typedef Vec4< float > | Vec4f |
| A float vector. | |
| typedef Vec4< double > | Vec4d |
| A double vector. | |
| typedef Vec4< int > | Vec4i |
| A int vector. | |
| typedef Vec4< unsigned > | Vec4u |
| An unsigned int vector. | |
Functions | |
| template<typename T> Mat2< T > | operator- (const Mat2< T > &u) |
| Return the negation of a matrix. | |
| template<typename T> Mat2< T > | operator+ (const Mat2< T > &u, const Mat2< T > &v) |
| Add two matrices together. | |
| template<typename T> Mat2< T > | operator- (const Mat2< T > &u, const Mat2< T > &v) |
| Subtract two matrices. | |
| template<typename T> Mat2< T > | operator * (const Mat2< T > &u, const Mat2< T > &v) |
| Multiply two matrices. | |
| template<typename T> Mat2< T > | operator * (const Mat2< T > &u, const T s) |
| Right-multiply a matrix by a scalar. | |
| template<typename T> Mat2< T > | operator * (const T s, const Mat2< T > &u) |
| Left-multiply a matrix by a scalar. | |
| template<typename T> Mat2< T > | operator/ (const Mat2< T > &u, const T s) |
| Divide a matrix by a scalar. | |
| template<typename T> Vec2< T > | operator * (const Mat2< T > &u, const Vec2< T > &v) |
| Multiply a vector by a matrix. | |
| template<typename T> bool | operator== (const Mat2< T > &u, const Mat2< T > &v) |
| Exact equality -- use with caution on floating-point base types. | |
| template<typename T> bool | operator!= (const Mat2< T > &u, const Mat2< T > &v) |
| Exact inequality -- use with caution on floating-point base types. | |
| template<typename T> Mat2< T > | min (const Mat2< T > &u, const Mat2< T > &v) |
| Per-element minimum. | |
| template<typename T> Mat2< T > | max (const Mat2< T > &u, const Mat2< T > &v) |
| Per-element maximum. | |
| template<typename T> std::ostream & | operator<< (std::ostream &o, const Mat2< T > &m) |
| Print a matrix to an output stream. | |
| template<typename T> Mat3< T > | operator- (const Mat3< T > &u) |
| Return the negation of a matrix. | |
| template<typename T> Mat3< T > | operator+ (const Mat3< T > &u, const Mat3< T > &v) |
| Add two matrices together. | |
| template<typename T> Mat3< T > | operator- (const Mat3< T > &u, const Mat3< T > &v) |
| Subtract two matrices. | |
| template<typename T> Mat3< T > | operator * (const Mat3< T > &u, const Mat3< T > &v) |
| Multiply two matrices. | |
| template<typename T> Mat3< T > | operator * (const Mat3< T > &u, const T s) |
| Right-multiply a matrix by a scalar. | |
| template<typename T> Mat3< T > | operator * (const T s, const Mat3< T > &u) |
| Left-multiply a matrix by a scalar. | |
| template<typename T> Mat3< T > | operator/ (const Mat3< T > &u, const T s) |
| Divide a matrix by a scalar. | |
| template<typename T> Vec3< T > | operator * (const Mat3< T > &u, const Vec3< T > &v) |
| Multiply a vector by a matrix. | |
| template<typename T> bool | operator== (const Mat3< T > &u, const Mat3< T > &v) |
| Exact equality -- use with caution on floating-point base types. | |
| template<typename T> bool | operator!= (const Mat3< T > &u, const Mat3< T > &v) |
| Exact inequality -- use with caution on floating-point base types. | |
| template<typename T> Mat3< T > | min (const Mat3< T > &u, const Mat3< T > &v) |
| Per-element minimum. | |
| template<typename T> Mat3< T > | max (const Mat3< T > &u, const Mat3< T > &v) |
| Per-element maximum. | |
| template<typename T> std::ostream & | operator<< (std::ostream &o, const Mat3< T > &m) |
| Print a matrix to an output stream. | |
| template<typename T> Mat4< T > | operator- (const Mat4< T > &u) |
| Return the negation of a matrix. | |
| template<typename T> Mat4< T > | operator+ (const Mat4< T > &u, const Mat4< T > &v) |
| Add two matrices together. | |
| template<typename T> Mat4< T > | operator- (const Mat4< T > &u, const Mat4< T > &v) |
| Subtract two matrices. | |
| template<typename T> Mat4< T > | operator * (const Mat4< T > &u, const Mat4< T > &v) |
| Multiply two matrices. | |
| template<typename T> Mat4< T > | operator * (const Mat4< T > &u, const T s) |
| Right-multiply a matrix by a scalar. | |
| template<typename T> Mat4< T > | operator * (const T s, const Mat4< T > &u) |
| Left-multiply a matrix by a scalar. | |
| template<typename T> Mat4< T > | operator/ (const Mat4< T > &u, const T s) |
| Divide a matrix by a scalar. | |
| template<typename T> Vec4< T > | operator * (const Mat4< T > &u, const Vec4< T > &v) |
| Multiply a vector by a matrix. | |
| template<typename T> bool | operator== (const Mat4< T > &u, const Mat4< T > &v) |
| Exact equality -- use with caution on floating-point base types. | |
| template<typename T> bool | operator!= (const Mat4< T > &u, const Mat4< T > &v) |
| Exact inequality -- use with caution on floating-point base types. | |
| template<typename T> Mat4< T > | min (const Mat4< T > &u, const Mat4< T > &v) |
| Per-element minimum. | |
| template<typename T> Mat4< T > | max (const Mat4< T > &u, const Mat4< T > &v) |
| Per-element maximum. | |
| template<typename T> std::ostream & | operator<< (std::ostream &o, const Mat4< T > &m) |
| Print a matrix to an output stream. | |
| template<typename T> Vec2< T > | operator- (const Vec2< T > &u) |
| Negate a vector. | |
| template<typename T> Vec2< T > | operator+ (const Vec2< T > &u, const Vec2< T > &v) |
| Add two vectors. | |
| template<typename T> Vec2< T > | operator- (const Vec2< T > &u, const Vec2< T > &v) |
| Subtract two vectors. | |
| template<typename T> Vec2< T > | operator * (const Vec2< T > &u, const T s) |
| Right-multiply a vector by a scalar. | |
| template<typename T> Vec2< T > | operator * (const T s, const Vec2< T > &u) |
| Left-multiply a vector by a scalar. | |
| template<typename T> Vec2< T > | operator/ (const Vec2< T > &u, const T s) |
| Right-divide a vector by a scalar. | |
| template<typename T> bool | operator== (const Vec2< T > &u, const Vec2< T > &v) |
| Exact equality -- use with caution on floating-point base types. | |
| template<typename T> bool | operator!= (const Vec2< T > &u, const Vec2< T > &v) |
| Exact inequality -- use with caution on floating-point base types. | |
| template<typename T> T | inner (const Vec2< T > &u, const Vec2< T > &v) |
The inner (dot) product of u and v. | |
| template<typename T> Vec2< T > | proj (const Vec2< T > &u, const Vec2< T > &v) |
Return the projection of u onto v. | |
| template<typename T> Vec2< T > | min (const Vec2< T > &u, const Vec2< T > &v) |
| Per-element minimum. | |
| template<typename T> Vec2< T > | max (const Vec2< T > &u, const Vec2< T > &v) |
| Per-element maximum. | |
| template<typename T> Vec2< T > | normalized (const Vec2< T > &u) |
Unit vector in direction of u. Does not check for u.length() == 0. | |
| template<typename T> std::ostream & | operator<< (std::ostream &o, const Vec2< T > &v) |
| Print a vector to the output stream. | |
| template<typename T> Vec3< T > | operator- (const Vec3< T > &u) |
| Negate a vector. | |
| template<typename T> Vec3< T > | operator+ (const Vec3< T > &u, const Vec3< T > &v) |
| Add two vectors. | |
| template<typename T> Vec3< T > | operator- (const Vec3< T > &u, const Vec3< T > &v) |
| Subtract two vectors. | |
| template<typename T> Vec3< T > | operator * (const Vec3< T > &u, const T s) |
| Right-multiply a vector by a scalar. | |
| template<typename T> Vec3< T > | operator * (const T s, const Vec3< T > &u) |
| Left-multiply a vector by a scalar. | |
| template<typename T> Vec3< T > | operator/ (const Vec3< T > &u, const T s) |
| Right-divide a vector by a scalar. | |
| template<typename T> bool | operator== (const Vec3< T > &u, const Vec3< T > &v) |
| Exact equality -- use with caution on floating-point base types. | |
| template<typename T> bool | operator!= (const Vec3< T > &u, const Vec3< T > &v) |
| Exact inequality -- use with caution on floating-point base types. | |
| template<typename T> T | inner (const Vec3< T > &u, const Vec3< T > &v) |
The inner (dot) product of u and v. | |
| template<typename T> Vec3< T > | proj (const Vec3< T > &u, const Vec3< T > &v) |
Return the projection of u onto v. | |
| template<typename T> Vec3< T > | min (const Vec3< T > &u, const Vec3< T > &v) |
| Per-element minimum. | |
| template<typename T> Vec3< T > | max (const Vec3< T > &u, const Vec3< T > &v) |
| Per-element maximum. | |
| template<typename T> Vec3< T > | normalized (const Vec3< T > &u) |
Unit vector in direction of u. Does not check for u.length() == 0. | |
| template<typename T> std::ostream & | operator<< (std::ostream &o, const Vec3< T > &v) |
| Print a vector to the output stream. | |
| template<typename T> Vec4< T > | operator- (const Vec4< T > &u) |
| Negate a vector. | |
| template<typename T> Vec4< T > | operator+ (const Vec4< T > &u, const Vec4< T > &v) |
| Add two vectors. | |
| template<typename T> Vec4< T > | operator- (const Vec4< T > &u, const Vec4< T > &v) |
| Subtract two vectors. | |
| template<typename T> Vec4< T > | operator * (const Vec4< T > &u, const T s) |
| Right-multiply a vector by a scalar. | |
| template<typename T> Vec4< T > | operator * (const T s, const Vec4< T > &u) |
| Left-multiply a vector by a scalar. | |
| template<typename T> Vec4< T > | operator/ (const Vec4< T > &u, const T s) |
| Right-divide a vector by a scalar. | |
| template<typename T> bool | operator== (const Vec4< T > &u, const Vec4< T > &v) |
| Exact equality -- use with caution on floating-point base types. | |
| template<typename T> bool | operator!= (const Vec4< T > &u, const Vec4< T > &v) |
| Exact inequality -- use with caution on floating-point base types. | |
| template<typename T> T | inner (const Vec4< T > &u, const Vec4< T > &v) |
The inner (dot) product of u and v. | |
| template<typename T> Vec4< T > | proj (const Vec4< T > &u, const Vec4< T > &v) |
Return the projection of u onto v. | |
| template<typename T> Vec4< T > | min (const Vec4< T > &u, const Vec4< T > &v) |
| Per-element minimum. | |
| template<typename T> Vec4< T > | max (const Vec4< T > &u, const Vec4< T > &v) |
| Per-element maximum. | |
| template<typename T> Vec4< T > | normalized (const Vec4< T > &u) |
Unit vector in direction of u. Does not check for u.length() == 0. | |
| template<typename T> std::ostream & | operator<< (std::ostream &o, const Vec4< T > &v) |
| Print a vector to the output stream. | |
© 2005-2008 Adrian Secord.