Fermat
Classes | Typedefs | Functions

Detailed Description

Classes

struct  cugar::Matrix< T, N, M >
 
struct  cugar::GenericOuterProduct
 
struct  cugar::OuterProduct< T, N, M >
 
struct  cugar::OuterProduct< T, 1, 1 >
 

Typedefs

typedef Matrix< float, 2, 2 > cugar::Matrix2x2f
 
typedef Matrix< double, 2, 2 > cugar::Matrix2x2d
 
typedef Matrix< float, 3, 3 > cugar::Matrix3x3f
 
typedef Matrix< double, 3, 3 > cugar::Matrix3x3d
 
typedef Matrix< float, 4, 4 > cugar::Matrix4x4f
 
typedef Matrix< double, 4, 4 > cugar::Matrix4x4d
 
typedef Matrix< float, 2, 3 > cugar::Matrix2x3f
 
typedef Matrix< float, 3, 2 > cugar::Matrix3x2f
 
typedef Matrix< double, 2, 3 > cugar::Matrix2x3d
 
typedef Matrix< double, 3, 2 > cugar::Matrix3x2d
 
typedef OuterProduct< float, 2, 2 > cugar::OuterProduct2x2f
 
typedef OuterProduct< float, 3, 3 > cugar::OuterProduct3x3f
 
typedef OuterProduct< float, 4, 4 > cugar::OuterProduct4x4f
 
typedef OuterProduct< float, 2, 3 > cugar::OuterProduct2x3f
 
typedef OuterProduct< float, 3, 2 > cugar::OuterProduct3x2f
 
typedef OuterProduct< double, 2, 2 > cugar::OuterProduct2x2d
 
typedef OuterProduct< double, 3, 3 > cugar::OuterProduct3x3d
 
typedef OuterProduct< double, 4, 4 > cugar::OuterProduct4x4d
 
typedef OuterProduct< double, 2, 3 > cugar::OuterProduct2x3d
 
typedef OuterProduct< double, 3, 2 > cugar::OuterProduct3x2d
 

Functions

template<typename T , int N>
Vector< T, N > cugar::scale_factor (const Matrix< T, N, N > &A)
 
template<typename T , int N>
bool cugar::pivot_partial (Matrix< T, N, N > &A, const Vector< T, N > &S, Vector< T, N > &B)
 
template<typename T , int N>
bool cugar::forward_elimination (Matrix< T, N, N > &A, Vector< T, N > &B)
 
template<typename T , int N>
Vector< T, N > cugar::back_substitution (Matrix< T, N, N > &A, Vector< T, N > &B)
 
template<typename T , int N>
Vector< T, N > cugar::gaussian_elimination (Matrix< T, N, N > A, Vector< T, N > B)
 
template<typename T , int N, int M, int Q>
CUGAR_HOST_DEVICE Matrix< T, N, Q > & cugar::multiply (const Matrix< T, N, M > &, const Matrix< T, M, Q > &, Matrix< T, N, Q > &)
 
template<typename T , int N, int M, int Q>
CUGAR_HOST_DEVICE Matrix< T, N, Q > cugar::operator* (const Matrix< T, N, M > &, const Matrix< T, M, Q > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE Vector< T, M > & cugar::multiply (const Vector< T, N > &, const Matrix< T, N, M > &, Vector< T, M > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE Vector< T, N > & cugar::multiply (const Matrix< T, N, M > &, const Vector< T, M > &, Vector< T, N > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE Matrix< T, M, N > cugar::transpose (const Matrix< T, N, M > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE Matrix< T, M, N > & cugar::transpose (const Matrix< T, N, M > &, Matrix< T, M, N > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE bool cugar::invert (const Matrix< T, N, M > &, Matrix< T, M, N > &)
 
template<typename T , int N, int M>
CUGAR_HOST_DEVICE T cugar::det (const Matrix< T, N, M > &)
 
template<typename T >
CUGAR_HOST_DEVICE void cugar::cholesky (const Matrix< T, 2, 2 > &, Matrix< T, 2, 2 > &)
 
template<typename T , uint32 N, uint32 M>
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix< T, N, M > cugar::outer_product (const Vector< T, N > op1, const Vector< T, M > op2)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::translate (const Vector< T, 3 > &vec)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::scale (const Vector< T, 3 > &vec)
 build a 3d scaling matrix More...
 
template<typename T >
Matrix< T, 4, 4 > cugar::perspective (T fovy, T aspect, T zNear, T zFar)
 
template<typename T >
Matrix< T, 4, 4 > cugar::look_at (const Vector< T, 3 > &eye, const Vector< T, 3 > &center, const Vector< T, 3 > &up, bool flip_sign=false)
 
template<typename T >
Matrix< T, 4, 4 > cugar::inverse_look_at (const Vector< T, 3 > &eye, const Vector< T, 3 > &center, const Vector< T, 3 > &up, bool flip_sign=false)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::rotation_around_X (const T q)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::rotation_around_Y (const T q)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::rotation_around_Z (const T q)
 
template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::rotation_around_axis (const T q, const Vector3f &axis)
 
CUGAR_HOST_DEVICE Vector3f cugar::ptrans (const Matrix4x4f &m, const Vector3f &v)
 
CUGAR_HOST_DEVICE Vector3f cugar::vtrans (const Matrix4x4f &m, const Vector3f &v)
 
CUGAR_HOST_DEVICE Vector2f cugar::eigen_values (const Matrix2x2f &m)
 
CUGAR_HOST_DEVICE Vector2f cugar::singular_values (const Matrix2x2f &m)
 
CUGAR_HOST_DEVICE void cugar::svd (const Matrix2x2f &m, Matrix2x2f &u, Vector2f &s, Matrix2x2f &v)
 

Function Documentation

◆ back_substitution()

template<typename T , int N>
Vector<T,N> cugar::back_substitution ( Matrix< T, N, N > &  A,
Vector< T, N > &  B 
)

Back substitution for a small linear system

◆ eigen_values()

CUGAR_HOST_DEVICE Vector2f cugar::eigen_values ( const Matrix2x2f m)
inline

get the eigenvalues of a matrix

◆ forward_elimination()

template<typename T , int N>
bool cugar::forward_elimination ( Matrix< T, N, N > &  A,
Vector< T, N > &  B 
)

Forward elimination for a small linear system

◆ gaussian_elimination()

template<typename T , int N>
Vector<T,N> cugar::gaussian_elimination ( Matrix< T, N, N >  A,
Vector< T, N >  B 
)

Gaussian elimination of a small linear system

◆ inverse_look_at()

template<typename T >
Matrix< T, 4, 4 > cugar::inverse_look_at ( const Vector< T, 3 > &  eye,
const Vector< T, 3 > &  center,
const Vector< T, 3 > &  up,
bool  flip_sign = false 
)

build the inverse of a 3d look at matrix

◆ look_at()

template<typename T >
Matrix< T, 4, 4 > cugar::look_at ( const Vector< T, 3 > &  eye,
const Vector< T, 3 > &  center,
const Vector< T, 3 > &  up,
bool  flip_sign = false 
)

build a 3d look at matrix

◆ outer_product()

template<typename T , uint32 N, uint32 M>
CUGAR_API_CS CUGAR_HOST_DEVICE Matrix< T, N, M > cugar::outer_product ( const Vector< T, N >  op1,
const Vector< T, M >  op2 
)
inline

Outer product of two vectors

◆ perspective()

template<typename T >
Matrix< T, 4, 4 > cugar::perspective ( fovy,
aspect,
zNear,
zFar 
)

build a 3d perspective matrix

◆ pivot_partial()

template<typename T , int N>
bool cugar::pivot_partial ( Matrix< T, N, N > &  A,
const Vector< T, N > &  S,
Vector< T, N > &  B 
)

Partial pivoting for a small linear system

◆ ptrans()

CUGAR_HOST_DEVICE Vector3f cugar::ptrans ( const Matrix4x4f m,
const Vector3f v 
)
inline

transform a 3d point with a perspective transform

◆ rotation_around_axis()

template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::rotation_around_axis ( const T  q,
const Vector3f axis 
)

build a 3d rotation around an arbitrary axis

◆ rotation_around_X()

template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::rotation_around_X ( const T  q)

build a 3d rotation around the X axis

◆ rotation_around_Y()

template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::rotation_around_Y ( const T  q)

build a 3d rotation around the Y axis

◆ rotation_around_Z()

template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::rotation_around_Z ( const T  q)

build a 3d rotation around the Z axis

◆ scale()

template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::scale ( const Vector< T, 3 > &  vec)

build a 3d scaling matrix

build a 3d scaling matrix

◆ scale_factor()

template<typename T , int N>
Vector<T,N> cugar::scale_factor ( const Matrix< T, N, N > &  A)

Return the scale factor for a small linear system

◆ singular_values()

CUGAR_HOST_DEVICE Vector2f cugar::singular_values ( const Matrix2x2f m)
inline

get the singular values of a matrix

◆ svd()

CUGAR_HOST_DEVICE void cugar::svd ( const Matrix2x2f m,
Matrix2x2f u,
Vector2f s,
Matrix2x2f v 
)
inline

get the singular value decomposition of a matrix

◆ translate()

template<typename T >
CUGAR_HOST_DEVICE Matrix< T, 4, 4 > cugar::translate ( const Vector< T, 3 > &  vec)

build a 3d translation matrix

◆ vtrans()

CUGAR_HOST_DEVICE Vector3f cugar::vtrans ( const Matrix4x4f m,
const Vector3f v 
)
inline

transform a 3d vector with a perspective transform