cgv
Loading...
Searching...
No Matches
cgv::math::fmat< T, N, M > Class Template Reference

matrix of fixed size dimensions More...

#include <fmat.h>

Inheritance diagram for cgv::math::fmat< T, N, M >:
cgv::math::fvec< T, N *M >

Public Types

typedef fvec< T, N *M > base_type
 base type is a vector with sufficent number of elements
 
typedef fmat< T, N, M > this_type
 base type is a vector with sufficent number of elements
 
- Public Types inherited from cgv::math::fvec< T, N *M >
enum  
 compile-time constant indicating the dimensionality of the vector More...
 
typedef T value_type
 
typedef T & reference
 
typedef const T & const_reference
 
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef T * pointer
 
typedef const T * const_pointer
 
typedef T * iterator
 
typedef const T * const_iterator
 
typedef std::reverse_iterator< iterator > reverse_iterator
 
typedef std::reverse_iterator< const_iterator > const_reverse_iterator
 

Public Member Functions

 fmat ()
 standard constructor
 
 fmat (std::initializer_list< T > components)
 construct from individual components using list-initialization syntax
 
 fmat (std::initializer_list< fvec< T, N > > cols)
 construct from column vectors using list-initialization syntax
 
 fmat (const T &c)
 construct a matrix with all elements set to c
 
 fmat (cgv::type::uint32_type n, cgv::type::uint32_type m, const T *a, bool column_major=true)
 creates a matrix from an array a of given dimensions - by default in column major format - and fills missing entries from identity matrix
 
template<typename S >
 fmat (cgv::type::uint32_type n, cgv::type::uint32_type m, const S *a, bool column_major=true)
 creates a matrix from an array a of given dimensions but different type - by default in column major format
 
template<typename S >
 fmat (const fmat< S, N, M > &m)
 copy constructor for matrix with different element type
 
template<typename T1 , typename T2 >
 fmat (const fvec< T1, N > &v, const fvec< T2, M > &w)
 construct from outer product of vector v and w
 
template<typename S >
fmat< T, N, M > & operator= (const fmat< S, N, M > &m)
 assignment of a matrix with a different element type
 
this_typeoperator= (const T &s)
 assignment of a scalar s to each element of the matrix
 
bool is_square () const
 returns true if matrix is a square matrix
 
T & operator() (unsigned i, unsigned j)
 access to the element in the ith row in column j
 
const T & operator() (unsigned i, unsigned j) const
 const access to the element in the ith row on column j
 
this_typeoperator*= (const T &s)
 
this_type operator* (const T &s) const
 scalar multiplication

 
fmat< T, N, M > & operator/= (const T &s)
 in place division by a scalar
 
const fmat< T, N, M > operator/ (const T &s) const
 division by a scalar
 
fmat< T, N, M > & operator+= (const T &s)
 in place addition by a scalar
 
const fmat< T, N, M > operator+ (const T &s)
 componentwise addition of a scalar
 
fmat< T, N, M > & operator-= (const T &s)
 in place substraction of a scalar
 
const fmat< T, N, M > operator- (const T &s)
 componentwise subtraction of a scalar
 
const fmat< T, N, M > operator- () const
 negation operator
 
template<typename S >
fmat< T, N, M > & operator+= (const fmat< S, N, M > &m)
 in place addition of matrix
 
template<typename S >
fmat< T, N, M > & operator-= (const fmat< S, N, M > &m)
 in place subtraction of matrix
 
template<typename S >
const fmat< T, N, M > operator+ (const fmat< S, N, M > m2) const
 matrix addition
 
template<typename S >
const fmat< T, N, M > operator- (const fmat< S, N, M > m2) const
 matrix subtraction
 
template<typename S >
const fmat< T, N, M > operator*= (const fmat< S, N, N > &m2)
 in place matrix multiplication with a ncols x ncols matrix m2
 
template<typename S , cgv::type::uint32_type L>
const fmat< T, N, L > operator* (const fmat< S, M, L > &m2) const
 multiplication with a ncols x M matrix m2
 
template<typename S >
const fmat< T, N, N > mul_h (const fmat< S, N-1, N-1 > &m2) const
 multiplication with (N-1)x(N-1) matrix, assuming the first operand represents an affine or perspective transformation to be combined with the linear transformation represented by the second operand (which will be treated as if lifted to a homogenous transformation matrix)
 
template<typename S >
const fvec< S, N > operator* (const fvec< S, M > &v) const
 matrix vector multiplication
 
template<typename S >
const fvec< S, N > mul_pos (const fvec< S, M-1 > &v) const
 multiplication with M-1 dimensional position vector which will be implicitly homogenized
 
template<typename S >
const fvec< S, N > mul_dir (const fvec< S, M-1 > &v) const
 multiplication with M-1 dimensional direction vector which will be implicitly homogenized
 
fvec< T, M > row (unsigned i) const
 extract a row from the matrix as a vector, this takes time linear in the number of columns
 
void set_row (unsigned i, const fvec< T, M > &v)
 set row i of the matrix to vector v
 
fvec< T, N > & col (unsigned j)
 reference a column of the matrix as a vector
 
const fvec< T, N > & col (unsigned j) const
 read-only reference a column of the matrix as a vector
 
void set_col (unsigned j, const fvec< T, N > &v)
 set column j of the matrix to vector v
 
trace () const
 returns the trace
 
void transpose ()
 transpose matrix
 
frobenius_norm () const
 returns the frobenius norm of matrix m
 
void identity ()
 set identity matrix
 
- Public Member Functions inherited from cgv::math::fvec< T, N *M >
 fvec ()
 create an uninitialized vector
 
 fvec (const T &x)
 create a vector where all N components are initialized to the constant value x
 
int int S2 fvec (const fvec< S1, N - 1 > &other, S2 s)
 
 fvec (const fvec< S, N+1 > &other)
 construct from vector of one dimension higher by dropping the highest dimension
 
 fvec (const std::array< T, N > &a)
 construct from std::array of same size
 
void assign (const std::array< T, N > &a)
 set to the contents of the given std::array with same size
 
int int N lift () const
 
vec< T > to_vec () const
 conversion to vector type
 
T & x ()
 return first component
 
const T & x () const
 return first component
 
T & y ()
 return second component
 
const T & y () const
 return second component
 
T & z ()
 return third component
 
const T & z () const
 return third component
 
T & w ()
 return fourth component
 
const T & w () const
 return fourth component
 
T & operator[] (int i)
 return a reference to the component at specified index i
 
const T & operator[] (int i) const
 return a reference to the component at specified index i
 
T & operator() (int i)
 return a reference to the component at specified index i
 
const T & operator() (int i) const
 return a reference to the component at specified index i
 
T * data ()
 return a pointer to the underlying array serving as component storage
 
const T * data () const
 return a pointer to the underlying array serving as component storage
 
iterator begin ()
 return an iterator to the first component of *this
 
const_iterator begin () const
 return an iterator to the first component of *this
 
iterator end ()
 return an iterator past the last component of *this
 
const_iterator end () const
 return an iterator past the last component of *this
 
reverse_iterator rbegin ()
 return a reverse iterator to the first component of the reversed *this that corresponds to the last component of the non-reversed *this
 
const_reverse_iterator rbegin () const
 return a reverse iterator to the first component of the reversed *this that corresponds to the last component of the non-reversed *this
 
reverse_iterator rend ()
 return a reverse iterator past the last component of the reversed *this that corresponds to the component preceding the first component of the non-reversed *this
 
const_reverse_iterator rend () const
 return a reverse iterator past the last component of the reversed *this that corresponds to the component preceding the first component of the non-reversed *this
 
fvec< T, N > & operator+= (const T &s)
 in place addition of a scalar s
 
fvec< T, N > & operator+= (const fvec< S, N > &v)
 in place vector addition
 
fvec< T, N > & operator-= (const T &s)
 in place subtraction by scalar s
 
fvec< T, N > & operator-= (const fvec< S, N > &v)
 in place vector subtraction
 
fvec< T, N > & operator*= (const T &s)
 in place multiplication with s
 
fvec< T, N > & operator*= (const fvec< S, N > &v)
 in place componentwise vector multiplication
 
fvec< T, N > & operator/= (const T &s)
 in place division by scalar s
 
fvec< T, N > & operator/= (const fvec< S, N > &v)
 in place componentwise vector division
 
fvec< T, N > operator+ (const fvec< S, N > &v) const
 vector addition
 
fvec< T, N > operator+ (const T &s) const
 componentwise addition of scalar
 
fvec< T, N > operator- (const fvec< S, N > &v) const
 vector subtraction
 
fvec< T, N > operator- (const T &s) const
 componentwise subtraction of scalar
 
fvec< T, N > operator- () const
 negate the vector
 
fvec< T, N > operator* (const fvec< S, N > &v) const
 componentwise vector multiplication
 
fvec< T, N > operator* (const T &s) const
 multiplication with scalar s
 
fvec< T, N > operator/ (const fvec< S, N > &v) const
 componentwise vector division
 
fvec< T, N > operator/ (const T &s) const
 divide vector by scalar s
 
bool operator== (const fvec< S, N > &v) const
 test for equality
 
bool operator!= (const fvec< S, N > &v) const
 test for inequality
 
sqr_length () const
 square length of vector
 
length () const
 length of the vector L2-Norm
 
void sign ()
 componentwise sign values
 
void step (const fvec< T, N > &r)
 componentwise sign values
 
void abs ()
 componentwise absolute values
 
void ceil ()
 ceil componentwise
 
void floor ()
 floor componentwise
 
void round ()
 round componentwise
 
normalize ()
 normalize the vector using the L2-Norm and return the length
 
safe_normalize ()
 normalize the vector using the L2-Norm and return the length; if length is zero the vector remains unchanged
 

Static Public Member Functions

static constexpr unsigned nrows ()
 number of rows
 
static constexpr unsigned ncols ()
 number of columns
 
- Static Public Member Functions inherited from cgv::math::fvec< T, N *M >
static fvec< T, N > zeroh ()
 constuct a homogeneous zero-vector (yields same result as calling fvec<T, N-1>(0).lift() but is faster)
 
static fvec< T, N > from_vec (const vec< T > &)
 conversion from vector
 
static cgv::type::uint32_type size ()
 return number of components
 

Additional Inherited Members

- Protected Attributes inherited from cgv::math::fvec< T, N *M >
v [N]
 

Detailed Description

template<typename T, cgv::type::uint32_type N, cgv::type::uint32_type M>
class cgv::math::fmat< T, N, M >

matrix of fixed size dimensions

Template arguments are

  • T ... coordinate type
  • N ... number of rows
  • M ... number of columns Matrix elements can be accessed with the (i,j)-operator with 0-based indices. For example A(i,j) accesses the matrix element in the (i+1)th row and the (j+1)th column.

The matrix inherits the functionality of a N*M dimensional vector and is stored in column major format. This means that A(i,j)=A(j*M+i).

Definition at line 22 of file fmat.h.

Member Typedef Documentation

◆ base_type

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
typedef fvec<T,N*M> cgv::math::fmat< T, N, M >::base_type

base type is a vector with sufficent number of elements

Definition at line 26 of file fmat.h.

◆ this_type

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
typedef fmat<T,N,M> cgv::math::fmat< T, N, M >::this_type

base type is a vector with sufficent number of elements

Definition at line 28 of file fmat.h.

Constructor & Destructor Documentation

◆ fmat() [1/8]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
cgv::math::fmat< T, N, M >::fmat ( )
inline

standard constructor

Definition at line 30 of file fmat.h.

◆ fmat() [2/8]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
cgv::math::fmat< T, N, M >::fmat ( std::initializer_list< T >  components)
inline

construct from individual components using list-initialization syntax

Definition at line 32 of file fmat.h.

◆ fmat() [3/8]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
cgv::math::fmat< T, N, M >::fmat ( std::initializer_list< fvec< T, N > >  cols)
inline

construct from column vectors using list-initialization syntax

Definition at line 34 of file fmat.h.

◆ fmat() [4/8]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
cgv::math::fmat< T, N, M >::fmat ( const T &  c)
inline

construct a matrix with all elements set to c

Definition at line 36 of file fmat.h.

◆ fmat() [5/8]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
cgv::math::fmat< T, N, M >::fmat ( cgv::type::uint32_type  n,
cgv::type::uint32_type  m,
const T *  a,
bool  column_major = true 
)
inline

creates a matrix from an array a of given dimensions - by default in column major format - and fills missing entries from identity matrix

Definition at line 38 of file fmat.h.

◆ fmat() [6/8]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
cgv::math::fmat< T, N, M >::fmat ( cgv::type::uint32_type  n,
cgv::type::uint32_type  m,
const S *  a,
bool  column_major = true 
)
inline

creates a matrix from an array a of given dimensions but different type - by default in column major format

Definition at line 53 of file fmat.h.

◆ fmat() [7/8]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
cgv::math::fmat< T, N, M >::fmat ( const fmat< S, N, M > &  m)
inline

copy constructor for matrix with different element type

Definition at line 60 of file fmat.h.

◆ fmat() [8/8]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename T1 , typename T2 >
cgv::math::fmat< T, N, M >::fmat ( const fvec< T1, N > &  v,
const fvec< T2, M > &  w 
)
inline

construct from outer product of vector v and w

Definition at line 63 of file fmat.h.

References cgv::math::fvec< T, N *M >::w().

Member Function Documentation

◆ col() [1/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
fvec< T, N > & cgv::math::fmat< T, N, M >::col ( unsigned  j)
inline

◆ col() [2/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
const fvec< T, N > & cgv::math::fmat< T, N, M >::col ( unsigned  j) const
inline

read-only reference a column of the matrix as a vector

Definition at line 213 of file fmat.h.

◆ frobenius_norm()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
T cgv::math::fmat< T, N, M >::frobenius_norm ( ) const
inline

returns the frobenius norm of matrix m

Definition at line 238 of file fmat.h.

References cgv::math::fvec< T, N *M >::length().

◆ identity()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
void cgv::math::fmat< T, N, M >::identity ( )
inline

set identity matrix

Definition at line 240 of file fmat.h.

◆ is_square()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
bool cgv::math::fmat< T, N, M >::is_square ( ) const
inline

returns true if matrix is a square matrix

Definition at line 84 of file fmat.h.

◆ mul_dir()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
const fvec< S, N > cgv::math::fmat< T, N, M >::mul_dir ( const fvec< S, M-1 > &  v) const
inline

multiplication with M-1 dimensional direction vector which will be implicitly homogenized

Definition at line 189 of file fmat.h.

References cgv::math::fmat< T, N, M >::row().

◆ mul_h()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
const fmat< T, N, N > cgv::math::fmat< T, N, M >::mul_h ( const fmat< S, N-1, N-1 > &  m2) const
inline

multiplication with (N-1)x(N-1) matrix, assuming the first operand represents an affine or perspective transformation to be combined with the linear transformation represented by the second operand (which will be treated as if lifted to a homogenous transformation matrix)

Definition at line 153 of file fmat.h.

References cgv::math::fmat< T, N, M >::col(), and cgv::math::fmat< T, N, M >::row().

◆ mul_pos()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
const fvec< S, N > cgv::math::fmat< T, N, M >::mul_pos ( const fvec< S, M-1 > &  v) const
inline

multiplication with M-1 dimensional position vector which will be implicitly homogenized

Definition at line 181 of file fmat.h.

References cgv::math::fmat< T, N, M >::row().

◆ ncols()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
static constexpr unsigned cgv::math::fmat< T, N, M >::ncols ( )
inlinestaticconstexpr

number of columns

Definition at line 71 of file fmat.h.

Referenced by cgv::render::drawable::get_world_location().

◆ nrows()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
static constexpr unsigned cgv::math::fmat< T, N, M >::nrows ( )
inlinestaticconstexpr

number of rows

Definition at line 69 of file fmat.h.

◆ operator()() [1/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
T & cgv::math::fmat< T, N, M >::operator() ( unsigned  i,
unsigned  j 
)
inline

access to the element in the ith row in column j

Definition at line 86 of file fmat.h.

Referenced by cgv::math::fmat< T, N, M >::operator*(), cgv::math::fmat< T, N, M >::operator*=(), and cgv::math::fmat< T, N, M >::row().

◆ operator()() [2/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
const T & cgv::math::fmat< T, N, M >::operator() ( unsigned  i,
unsigned  j 
) const
inline

const access to the element in the ith row on column j

Definition at line 91 of file fmat.h.

◆ operator*() [1/3]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S , cgv::type::uint32_type L>
const fmat< T, N, L > cgv::math::fmat< T, N, M >::operator* ( const fmat< S, M, L > &  m2) const
inline

multiplication with a ncols x M matrix m2

Definition at line 140 of file fmat.h.

References cgv::math::fmat< T, N, M >::operator()().

◆ operator*() [2/3]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
const fvec< S, N > cgv::math::fmat< T, N, M >::operator* ( const fvec< S, M > &  v) const
inline

matrix vector multiplication

Definition at line 173 of file fmat.h.

References cgv::math::fmat< T, N, M >::row().

◆ operator*() [3/3]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
this_type cgv::math::fmat< T, N, M >::operator* ( const T &  s) const
inline

scalar multiplication

Definition at line 98 of file fmat.h.

◆ operator*=() [1/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
const fmat< T, N, M > cgv::math::fmat< T, N, M >::operator*= ( const fmat< S, N, N > &  m2)
inline

in place matrix multiplication with a ncols x ncols matrix m2

Definition at line 127 of file fmat.h.

References cgv::math::fmat< T, N, M >::operator()().

◆ operator*=() [2/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
this_type & cgv::math::fmat< T, N, M >::operator*= ( const T &  s)
inline

Definition at line 96 of file fmat.h.

◆ operator+() [1/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
const fmat< T, N, M > cgv::math::fmat< T, N, M >::operator+ ( const fmat< S, N, M >  m2) const
inline

matrix addition

Definition at line 121 of file fmat.h.

◆ operator+() [2/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
const fmat< T, N, M > cgv::math::fmat< T, N, M >::operator+ ( const T &  s)
inline

componentwise addition of a scalar

Definition at line 106 of file fmat.h.

◆ operator+=() [1/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
fmat< T, N, M > & cgv::math::fmat< T, N, M >::operator+= ( const fmat< S, N, M > &  m)
inline

in place addition of matrix

Definition at line 115 of file fmat.h.

References cgv::math::fvec< T, N *M >::operator+=().

◆ operator+=() [2/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
fmat< T, N, M > & cgv::math::fmat< T, N, M >::operator+= ( const T &  s)
inline

in place addition by a scalar

Definition at line 104 of file fmat.h.

References cgv::math::fvec< T, N *M >::operator+=().

◆ operator-() [1/3]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
const fmat< T, N, M > cgv::math::fmat< T, N, M >::operator- ( ) const
inline

negation operator

Definition at line 112 of file fmat.h.

◆ operator-() [2/3]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
const fmat< T, N, M > cgv::math::fmat< T, N, M >::operator- ( const fmat< S, N, M >  m2) const
inline

matrix subtraction

Definition at line 124 of file fmat.h.

◆ operator-() [3/3]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
const fmat< T, N, M > cgv::math::fmat< T, N, M >::operator- ( const T &  s)
inline

componentwise subtraction of a scalar

Definition at line 110 of file fmat.h.

◆ operator-=() [1/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
fmat< T, N, M > & cgv::math::fmat< T, N, M >::operator-= ( const fmat< S, N, M > &  m)
inline

in place subtraction of matrix

Definition at line 118 of file fmat.h.

References cgv::math::fvec< T, N *M >::operator-=().

◆ operator-=() [2/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
fmat< T, N, M > & cgv::math::fmat< T, N, M >::operator-= ( const T &  s)
inline

in place substraction of a scalar

Definition at line 108 of file fmat.h.

References cgv::math::fvec< T, N *M >::operator-=().

◆ operator/()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
const fmat< T, N, M > cgv::math::fmat< T, N, M >::operator/ ( const T &  s) const
inline

division by a scalar

Definition at line 102 of file fmat.h.

◆ operator/=()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
fmat< T, N, M > & cgv::math::fmat< T, N, M >::operator/= ( const T &  s)
inline

in place division by a scalar

Definition at line 100 of file fmat.h.

References cgv::math::fvec< T, N *M >::operator/=().

◆ operator=() [1/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
template<typename S >
fmat< T, N, M > & cgv::math::fmat< T, N, M >::operator= ( const fmat< S, N, M > &  m)
inline

assignment of a matrix with a different element type

Definition at line 74 of file fmat.h.

◆ operator=() [2/2]

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
this_type & cgv::math::fmat< T, N, M >::operator= ( const T &  s)
inline

assignment of a scalar s to each element of the matrix

Definition at line 79 of file fmat.h.

◆ row()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
fvec< T, M > cgv::math::fmat< T, N, M >::row ( unsigned  i) const
inline

extract a row from the matrix as a vector, this takes time linear in the number of columns

Definition at line 197 of file fmat.h.

References cgv::math::fmat< T, N, M >::operator()().

Referenced by cgv::math::fmat< T, N, M >::mul_dir(), cgv::math::fmat< T, N, M >::mul_h(), cgv::math::fmat< T, N, M >::mul_pos(), and cgv::math::fmat< T, N, M >::operator*().

◆ set_col()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
void cgv::math::fmat< T, N, M >::set_col ( unsigned  j,
const fvec< T, N > &  v 
)
inline

◆ set_row()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
void cgv::math::fmat< T, N, M >::set_row ( unsigned  i,
const fvec< T, M > &  v 
)
inline

set row i of the matrix to vector v

Definition at line 204 of file fmat.h.

Referenced by cgv::math::rigid_transform< T >::get_transposed_hmat().

◆ trace()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
T cgv::math::fmat< T, N, M >::trace ( ) const
inline

returns the trace

Definition at line 222 of file fmat.h.

◆ transpose()

template<typename T , cgv::type::uint32_type N, cgv::type::uint32_type M>
void cgv::math::fmat< T, N, M >::transpose ( )
inline

transpose matrix

Definition at line 231 of file fmat.h.

Referenced by cgv::render::view::compute_axis_and_angle().


The documentation for this class was generated from the following file: