|
| | qem (int d=-1) |
| | standard constructor initializes qem based on dimension
|
| |
| | qem (const vec< T > &p, const vec< T > &n) |
| | construct from point and normal
|
| |
| | qem (const vec< T > &n, T d) |
| | construct from normal and distance to origin
|
| |
| void | set (const vec< T > &n, T d) |
| | set from normal and distance to origin
|
| |
| unsigned | dim () const |
| | number of elements
|
| |
| qem< T > & | operator= (const qem< T > &v) |
| | assignment of a vector v
|
| |
| const T & | scalar_part () const |
| | return the scalar part of the qem
|
| |
| vec< T > | vector_part () const |
| | return the vector part of the qem
|
| |
| mat< T > | matrix_part () const |
| | return matrix part
|
| |
| T | evaluate (const vec< T > &p) const |
| | evaluate the quadric error metric at given location
|
| |
| vec< T > | minarg (const vec< T > &p_ref, T relative_epsilon, T max_distance=-1, T epsilon=1e-10) const |
| | compute point that minimizes distance to qem and is inside the sphere of radius max_distance around p_ref.
|
| |
| template<typename S > |
| qem< T > & | operator+= (const qem< S > &v) |
| | in place qem addition
|
| |
| template<typename S > |
| qem< T > & | operator-= (const qem< S > &v) |
| | in place qem subtraction
|
| |
| template<typename S > |
| const qem< T > | operator+ (const qem< S > &v) const |
| | qem addition
|
| |
| template<typename S > |
| qem< T > | operator- (const qem< S > &v) const |
| | qem subtraction
|
| |
| qem< T > | operator- (void) const |
| | negates the qem
|
| |
| qem< T > | operator* (const T &s) const |
| | multiplication with scalar s
|
| |
| qem< T > | operator/ (const T &s) const |
| | divides vector by scalar s
|
| |
| void | resize (unsigned d) |
| | resize the vector
|
| |
| template<typename S > |
| bool | operator== (const qem< S > &v) const |
| | test for equality
|
| |
| template<typename S > |
| bool | operator!= (const qem< S > &v) const |
| | test for inequality
|
| |
| iterator | begin () |
| |
| iterator | end () |
| |
| const_iterator | begin () const |
| |
| const_iterator | end () const |
| |
| reverse_iterator | rbegin () |
| |
| reverse_iterator | rend () |
| |
| const_reverse_iterator | rbegin () const |
| |
| const_reverse_iterator | rend () const |
| |
| unsigned | size () const |
| | number of elements
|
| |
| unsigned | dim () const |
| | number of elements
|
| |
| | vec () |
| | standard constructor
|
| |
| | vec (unsigned dim, const T &value=T(0)) |
| | creates a vector with dim elements
|
| |
| | vec (unsigned dim, const T *marray) |
| | creates a vector with dim elements from an array
|
| |
| | vec (const vec< T > &v) |
| | copy constructor for vectors with equal element type
|
| |
| template<typename S > |
| | vec (const vec< S > &v) |
| | copy constructor for vectors with different element type
|
| |
| | vec (const T &c0, const T &c1) |
| | creates a 2d vector (c0,c1)^T
|
| |
| | vec (const T &c0, const T &c1, const T &c2) |
| | creates a 3d vector (c0,c1,c2)^T
|
| |
| | vec (const T &c0, const T &c1, const T &c2, const T &c3) |
| | creates a 4d vector (c0,c1,c2,c3)^T
|
| |
| void | set (const T &c0, const T &c1) |
| | set entries of a 2d vector
|
| |
| void | set (const T &c0, const T &c1, const T &c2) |
| | set entries of a 3d vector
|
| |
| void | set (const T &c0, const T &c1, const T &c2, const T &c3) |
| | set entries of a 4d vector
|
| |
| void | set_extern_data (unsigned dim, T *data) |
| | set data pointer to an external data array
|
| |
| virtual | ~vec () |
| | destructor
|
| |
| void | destruct () |
| |
| T * | data () |
| | cast into non const array
|
| |
| const T * | data () const |
| | cast into const array
|
| |
| vec< T > & | operator= (const vec< T > &v) |
| | assignment of a vector v
|
| |
| vec< T > & | operator= (const T &s) |
| | assignment of a scalar s
|
| |
| template<typename S > |
| vec< T > & | operator= (const vec< S > &v) |
| | assignment of a vector v
|
| |
| T & | operator() (unsigned i) |
| | element accessor
|
| |
| const T & | operator() (unsigned i) const |
| | const element accessor
|
| |
| T & | operator[] (unsigned i) |
| | element accessor
|
| |
| const T & | operator[] (unsigned i) const |
| | const element accessor
|
| |
| T & | first () |
| | element accessor for the first element
|
| |
| const T & | first () const |
| | const element accessor for the first element
|
| |
| T & | last () |
| | element accessor for the flast element
|
| |
| const T & | last () const |
| | const element accessor for the last element
|
| |
| T & | x () |
| | element accessor for the first element
|
| |
| const T & | x () const |
| | const element accessor for the first element
|
| |
| T & | y () |
| | element accessor for the second element
|
| |
| const T & | y () const |
| | const element accessor for the second element
|
| |
| T & | z () |
| | element accessor for the third element
|
| |
| const T & | z () const |
| | const element accessor for the third element
|
| |
| T & | w () |
| | element accessor for the fourth element
|
| |
| const T & | w () const |
| | const element accessor for the fourth element
|
| |
| vec< T > & | operator+= (const T &s) |
| | in place addition of a scalar s
|
| |
| vec< T > & | operator-= (const T &s) |
| | in place subtraction by scalar s
|
| |
| vec< T > & | operator*= (const T &s) |
| | in place multiplication with s
|
| |
| vec< T > & | operator/= (const T &s) |
| | in place division by scalar s
|
| |
| template<typename S > |
| vec< T > & | operator+= (const vec< S > &v) |
| | in place vector addition
|
| |
| template<typename S > |
| vec< T > & | operator-= (const vec< S > &v) |
| | in place vector subtraction
|
| |
| template<typename S > |
| vec< T > & | operator*= (const vec< S > &v) |
| | in place componentwise vector multiplication
|
| |
| template<typename S > |
| vec< T > & | operator/= (const vec< S > &v) |
| | in place componentwise vector division
|
| |
| template<typename S > |
| const vec< T > | operator+ (const vec< S > &v) const |
| | vector addition
|
| |
| const vec< T > | operator+ (const T &s) const |
| | componentwise addition of scalar
|
| |
| const vec< T > | operator- (const T &s) const |
| | componentwise subtraction of scalar
|
| |
| template<typename S > |
| vec< T > | operator- (const vec< S > &v) const |
| | vector subtraction
|
| |
| template<typename S > |
| const vec< T > | operator* (const vec< S > &v) const |
| | componentwise vector multiplication
|
| |
| template<typename S > |
| const vec< T > | operator/ (const vec< S > &v) const |
| | componentwise vector division
|
| |
| vec< T > | operator- (void) const |
| | negates the vector
|
| |
| vec< T > | operator* (const T &s) const |
| | multiplication with scalar s
|
| |
| vec< T > | operator/ (const T &s) const |
| | divides vector by scalar s
|
| |
| void | fill (const T &v) |
| | fill elements of vector with scalar v
|
| |
| void | zeros () |
| | fill the vector with zeros
|
| |
| void | ones () |
| | fill the vector with ones
|
| |
| void | zeros (unsigned n) |
| | resize the vector to size n and fills the vector with zeros
|
| |
| void | ones (unsigned n) |
| | resize the vector to size n and fills thevector with ones
|
| |
| void | resize (unsigned dim) |
| | resize the vector
|
| |
| template<typename S > |
| bool | operator== (const vec< S > &v) const |
| | test for equality
|
| |
| template<typename S > |
| bool | operator!= (const vec< S > &v) const |
| | test for inequality
|
| |
| T | length () const |
| | length of the vector L2-Norm
|
| |
| 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
|
| |
| void | normalize () |
| | normalize the vector using the L2-Norm
|
| |
| void | safe_normalize () |
| | normalize the vector if length is not zero using the L2-Norm
|
| |
| vec< T > | sub_vec (unsigned ifrom, unsigned size) const |
| | extracts sub vector beginning at index ifrom with given size
|
| |
| void | copy (unsigned ifrom, unsigned s, vec< T > &subvec) const |
| | copy sub vector beginning at index ifrom with given size s into subvec
|
| |
| void | paste (unsigned ifrom, const vec< T > &v) |
| | paste v into vector beginning at index pos ifrom
|
| |
template<typename T>
class cgv::math::qem< T >
dimension independent implementation of quadric error metrics
Definition at line 13 of file qem.h.