|
| 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_type & | operator= (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_type & | operator*= (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
|
|
T | trace () const |
| returns the trace
|
|
void | transpose () |
| transpose matrix
|
|
T | frobenius_norm () const |
| returns the frobenius norm of matrix m
|
|
void | identity () |
| set identity matrix
|
|
iterator | begin () |
|
const_iterator | begin () const |
|
iterator | end () |
|
const_iterator | end () const |
|
reverse_iterator | rbegin () |
|
const_reverse_iterator | rbegin () const |
|
reverse_iterator | rend () |
|
const_reverse_iterator | rend () const |
| reverse iterator pointing to the end of reverse iteration
|
|
| fvec () |
| creates a vector not initialized
|
|
| fvec (const T &a) |
| creates a vector, where all N components are initialized to the constant value a
|
|
| fvec (const T &x, const T &y) |
| construct and init first two coordinates to the given values
|
|
| fvec (const T &x, const T &y, const T &z) |
| construct and init first three coordinates to the given values
|
|
| fvec (const T &x, const T &y, const T &z, const T &w) |
| construct and init first four coordinates to the given values
|
|
| fvec (cgv::type::uint32_type n, const T *a) |
| creates a vector from a n-element array a, if n < N remaining N-n elements are set to zero
|
|
| fvec (cgv::type::uint32_type n, const S *a) |
| creates a column vector initialized to array of a different type with zeros filled to not copied components
|
|
| fvec (const fvec< T, N > &rhs) |
| copy constructor
|
|
| fvec (const fvec< S, N > &fv) |
| copies a column vector of a different type
|
|
| fvec (const fvec< S1, N - 1 > &fv, S2 w) |
| construct from vector of one dimension less plus a scalar
|
|
| fvec (const fvec< S, N+1 > &fv) |
| construct from vector of one dimension higher by cutting of the highest dimension
|
|
| fvec (const std::array< T, N > &arr) |
| construct from std::array of same size
|
|
fvec & | operator= (const fvec< T, N > &rhs) |
| assign vector rhs, if vector and rhs have different sizes, vector has been resized to match the size of
|
|
fvec & | operator= (const T &a) |
| set all components of vector to constant value a
|
|
void | assign (const std::array< T, N > &arr) |
| set to the contents of the given std::array with same size
|
|
void | set (const T &x, const T &y) |
| set the first two components
|
|
void | set (const T &x, const T &y, const T &z) |
| set the first three components
|
|
void | set (const T &x, const T &y, const T &z, const T &w) |
| set the first four components
|
|
void | fill (const T &a) |
| fill elements of vector with scalar v
|
|
void | zeros () |
| fill the vector with zeros
|
|
void | zerosh () |
| fill the vector with zeros except for the last component, which will be set to one
|
|
void | ones () |
| fill the vector with ones
|
|
fvec< T, N+1 > | lift () const |
| convert to homogeneous version by adding a 1
|
|
vec< T > | to_vec () const |
| conversion to vector type
|
|
T & | x () |
| first element
|
|
const T & | x () const |
| first element of const vector
|
|
T & | y () |
| second element
|
|
const T & | y () const |
| second element of const vector
|
|
T & | z () |
| third element
|
|
const T & | z () const |
| third element of const vector
|
|
T & | w () |
| fourth element
|
|
const T & | w () const |
| fourth element of const vector
|
|
T & | operator() (const int i) |
| access i'th element
|
|
const T & | operator() (const int i) const |
| access i'th element of const vector
|
|
T & | operator[] (const int i) |
| access i'th element
|
|
const T & | operator[] (const int i) const |
| access i'th element of const vector
|
|
T * | data () |
| cast into array. This allows calls like glVertex<N><T>v(p.data()) instead of glVertex<N><T,N>(p.x(),p.y(),....)
|
|
const T * | data () const |
| cast into const array
|
|
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 T &s) const |
| componentwise subtraction of scalar
|
|
fvec< T, N > | operator- (const fvec< S, N > &v) const |
| vector subtraction
|
|
fvec< T, N > | operator- (void) const |
| negates 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 |
| divides 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
|
|
T | 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
|
|
T | sqr_length () const |
| square length of vector
|
|
T | normalize () |
| normalize the vector using the L2-Norm and return the length
|
|
T | safe_normalize () |
| normalize the vector if length is not zero using the L2-Norm and return the length
|
|
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.