$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mln::algebra::quat Class Reference

#include <mln/algebra/quat.hh>

Public Member Functions

 quat ()
 quat (float s, float x, float y, float z)
 quat (float s, const algebra::vec< 3, float > &v)
 quat (const algebra::vec< 4, float > &v)
 quat (unsigned one, float theta, const algebra::vec< 3, float > &uv)
quat conj () const
C & handle_ ()
quat inv () const
bool is_null () const
bool is_pure () const
bool is_unit () const
 operator const algebra::vec< 4, float > & () const
quatoperator= (const algebra::vec< 4, float > &v)
template<unsigned n, typename T >
algebra::vec< n, floatrotate (const algebra::vec< n, T > &v) const
quat rotate (const quat &q) const
float s () const
floats ()
void set_theta (float theta)
quatset_unit ()
template<typename T >
void set_unit (float theta, const algebra::vec< 3, T > &uv)
void set_uv (const algebra::vec< 3, float > &uv)
void set_v (float x, float y, float z)
float sprod (const quat &rhs) const
float theta () const
const C & to_enc () const
to_equiv () const
to_interop () const
const algebra::vec< 4, float > & to_vec () const
algebra::vec< 3, floatuv () const
const algebra::vec< 3, float > & v () const
algebra::vec< 3, float > & v ()
 quat (const literal::zero_t &)
quatoperator= (const literal::zero_t &)
 quat (const literal::one_t &)
quatoperator= (const literal::one_t &)

Protected Attributes

enc v_

Public Types

typedef Value< void > category
typedef C enc
typedef V equiv
typedef quat exact_t
typedef N interop

Detailed Description

Quaternion values.

Definition at line 129 of file quat.hh.

Constructor & Destructor Documentation

mln::algebra::quat::quat ( )

Constructor without argument.

mln::algebra::quat::quat ( float  s,
float  x,
float  y,
float  z 
)

Constructor with components.

mln::algebra::quat::quat ( float  s,
const algebra::vec< 3, float > &  v 
)

Constructor from a scalar and a 3D vector.

mln::algebra::quat::quat ( const algebra::vec< 4, float > &  v)

Constructor from a 4D vector.

mln::algebra::quat::quat ( const literal::zero_t )

Constructors/assignments with literals zero and one.

mln::algebra::quat::quat ( const literal::one_t )
mln::algebra::quat::quat ( unsigned  one,
float  theta,
const algebra::vec< 3, float > &  uv 
)

Member Function Documentation

quat mln::algebra::quat::conj ( ) const

Give the conjugate.

template<typename V, typename C, typename N, typename E>
C& mln::value::internal::value_like_< V, C, N, E >::handle_ ( )
inlineinherited

Definition at line 81 of file value_like.hh.

quat mln::algebra::quat::inv ( ) const

Give the invert.

bool mln::algebra::quat::is_null ( ) const

Test if the quaternion is null.

bool mln::algebra::quat::is_pure ( ) const

Test if it is a pure quaternion.

bool mln::algebra::quat::is_unit ( ) const

Test if it is a unit quaternion.

mln::algebra::quat::operator const algebra::vec< 4, float > & ( ) const

Implicit conversion to a 4D algebra::vec.

quat& mln::algebra::quat::operator= ( const algebra::vec< 4, float > &  v)

Assignment from a 4D vector.

quat& mln::algebra::quat::operator= ( const literal::zero_t )
quat& mln::algebra::quat::operator= ( const literal::one_t )
template<unsigned n, typename T >
algebra::vec<n,float> mln::algebra::quat::rotate ( const algebra::vec< n, T > &  v) const

Rotate using quaternion definition of a rotation.

quat mln::algebra::quat::rotate ( const quat q) const
float mln::algebra::quat::s ( ) const

Give the scalar part.

float& mln::algebra::quat::s ( )

Access to the scalar part.

void mln::algebra::quat::set_theta ( float  theta)
quat& mln::algebra::quat::set_unit ( )

Transform into unit quaternion.

template<typename T >
void mln::algebra::quat::set_unit ( float  theta,
const algebra::vec< 3, T > &  uv 
)

Transform into unit quaternion.

void mln::algebra::quat::set_uv ( const algebra::vec< 3, float > &  uv)
void mln::algebra::quat::set_v ( float  x,
float  y,
float  z 
)
float mln::algebra::quat::sprod ( const quat rhs) const

Scalar product.

float mln::algebra::quat::theta ( ) const
template<typename V, typename C, typename N, typename E>
const C& mln::value::internal::value_like_< V, C, N, E >::to_enc ( ) const
inherited

Explicit conversion towards encoding type.

template<typename V, typename C, typename N, typename E>
V mln::value::internal::value_like_< V, C, N, E >::to_equiv ( ) const
inherited

Explicit conversion towards equivalent type.

template<typename V, typename C, typename N, typename E>
N mln::value::internal::value_like_< V, C, N, E >::to_interop ( ) const
inherited

Explicit conversion towards interoperation type.

const algebra::vec<4,float>& mln::algebra::quat::to_vec ( ) const

Explicit conversion to a 4D algebra::vec.

algebra::vec<3,float> mln::algebra::quat::uv ( ) const
const algebra::vec<3,float>& mln::algebra::quat::v ( ) const
algebra::vec<3,float>& mln::algebra::quat::v ( )

Member Data Documentation

template<typename V, typename C, typename N, typename E>
enc mln::value::internal::value_like_< V, C, N, E >::v_
protectedinherited

Definition at line 84 of file value_like.hh.

Member Typedef Documentation

typedef Value<void> mln::Value< quat >::category
inherited

Definition at line 62 of file core/concept/value.hh.

template<typename V, typename C, typename N, typename E>
typedef C mln::value::internal::value_like_< V, C, N, E >::enc
inherited

Encoding associated type.

Definition at line 65 of file value_like.hh.

template<typename V, typename C, typename N, typename E>
typedef V mln::value::internal::value_like_< V, C, N, E >::equiv
inherited

Equivalent associated type.

Definition at line 62 of file value_like.hh.

typedef quat mln::Object< quat >::exact_t
inherited

Definition at line 105 of file object.hh.

template<typename V, typename C, typename N, typename E>
typedef N mln::value::internal::value_like_< V, C, N, E >::interop
inherited

Interoperation associated type.

Definition at line 68 of file value_like.hh.