GEL  2
GEL is a library for Geometry and Linear Algebra
Public Types | Public Member Functions
CGLA::ArithSqMat4x4Float< VT, M > Class Template Reference

4 by 4 float matrix template. More...

#include <ArithSqMat4x4Float.h>

Inherits CGLA::ArithSqMatFloat< VT, M, 4 >.

List of all members.

Public Types

typedef VT VectorType
 Vector type.
typedef VT::ScalarType ScalarType
 The type of a matrix element.

Public Member Functions

 ArithSqMat4x4Float (VT a, VT b, VT c, VT d)
 Construct a Mat4x4f from four V vectors.
 ArithSqMat4x4Float ()
 Construct the NAN matrix.
 ArithSqMat4x4Float (ScalarType _a)
 Construct matrix where all values are equal to constructor argument.
template<class T , class VecT >
const VecT mul_3D_vector (const ArithVec3Float< T, VecT > &v_in) const
template<class T , class VecT >
const VecT mul_3D_point (const ArithVec3Float< T, VecT > &v_in) const
template<class T , class VecT >
const VecT project_3D_point (const ArithVec3Float< T, VecT > &v_in) const

Detailed Description

template<class VT, class M>
class CGLA::ArithSqMat4x4Float< VT, M >

4 by 4 float matrix template.

this class template is useful for transformations such as perspective projections or translation where 3x3 matrices do not suffice.


Member Function Documentation

template<class VT, class M>
template<class T , class VecT >
const VecT CGLA::ArithSqMat4x4Float< VT, M >::mul_3D_point ( const ArithVec3Float< T, VecT > &  v_in) const [inline]

Multiply 3D point onto matrix. Here the fourth coordinate becomes 1 to ensure that the point is translated. Note that the vector is converted back into a Vec3f without any division by w. This is deliberate: Typically, w=1 except for projections. If we are doing projection, we can use project_3D_point instead

template<class VT, class M>
template<class T , class VecT >
const VecT CGLA::ArithSqMat4x4Float< VT, M >::mul_3D_vector ( const ArithVec3Float< T, VecT > &  v_in) const [inline]

Multiply vector onto matrix. Here the fourth coordinate is se to 0. This removes any translation from the matrix. Useful if one wants to transform a vector which does not represent a point but a direction. Note that this is not correct for transforming normal vectors if the matric contains anisotropic scaling.

template<class VT, class M>
template<class T , class VecT >
const VecT CGLA::ArithSqMat4x4Float< VT, M >::project_3D_point ( const ArithVec3Float< T, VecT > &  v_in) const [inline]

Multiply 3D point onto matrix. We set w=1 before multiplication and divide by w after multiplication.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations