2 #ifndef vnl_quaternion_h_ 3 #define vnl_quaternion_h_ 25 # include <vcl_msvc_warnings.h> 27 #include "vnl/vnl_export.h" 132 inline T
real()
const {
return (*
this)[3]; }
143 double angle()
const;
193 #define VNL_QUATERNION_INSTANTIATE(T) extern "Please #include <vnl/vnl_quaternion.hxx> first" 195 #endif // vnl_quaternion_h_ T & operator()(unsigned int i)
Return reference to the element at specified index.
T & z()
Imaginary component, parallel to axis of rotation.
vnl_quaternion(vnl_quaternion< T > const &from)
Copy constructor – Creates a copy of from quaternion.
T x() const
Imaginary component, parallel to axis of rotation.
vnl_vector_fixed< T, 3 > imaginary() const
Copies and returns the imaginary part.
T real() const
Copies and returns the real part.
4-element vector that represents rotation in 3D.
T & y()
Imaginary component, parallel to axis of rotation.
T y() const
Imaginary component, parallel to axis of rotation.
T & x()
Imaginary component, parallel to axis of rotation.
std::ostream & operator<<(std::ostream &s, vnl_decnum const &r)
decimal output.
VNL_EXPORT double angle(v const &, v const &)
T z() const
Imaginary component, parallel to axis of rotation.
vnl_vector< T > extract(unsigned int len, unsigned int start=0) const
Returns a subvector specified by the start index and length. O(n).
T r() const
Real component.
Fixed length stack-stored, space-efficient vector.
Fixed length stack-stored vector.
T angle(const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b)
VNL_EXPORT std::istream & operator>>(std::istream &s, vnl_decnum &r)
decimal input.
vnl_vector_fixed< T, N > operator *(vnl_diag_matrix_fixed< T, N > const &D, vnl_vector_fixed< T, N > const &A)
Multiply a vnl_diag_matrix_fixed by a vnl_vector_fixed. n flops.
vnl_vector_fixed< T, n > & operator=(const vnl_vector_fixed< T, n > &rhs)=default
Copy operator.
vnl_vector_fixed< T, 4 > Base