Seg3D  2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
All Classes Namespaces Functions Variables Typedefs Enumerator Friends
Public Member Functions | Friends | List of all members
Core::Quaternion Class Reference

#include <Quaternion.h>

Public Member Functions

 Quaternion (double w, double x, double y, double z)
 
 Quaternion (const Quaternion &src)
 copy constructor
 
 Quaternion (const Vector &axis, double angle)
 construct a quaternion from the given axis and angle of rotation
 
 Quaternion (const Matrix &matrix)
 
Quaternion get_conjugate () const
 
void conjugate ()
 
void to_matrix (Matrix &matrix) const
 convert the quaternion to a column major matrix
 
void from_matrix (const Matrix &matrix)
 
Vector rotate (const Vector &vec) const
 
Quaternion operator* (const Quaternion &rhs) const
 
Quaternionoperator*= (const Quaternion &rhs)
 
bool operator== (const Quaternion &rhs) const
 
Quaternionoperator= (const Quaternion &rhs)
 
double w () const
 
double x () const
 
double y () const
 
double z () const
 

Friends

Quaternion Slerp (const Quaternion &, const Quaternion &, double, bool)
 

Detailed Description

NOTE: Class Quaternion will always keep itself normalized, since we are using Quaternion for rotation only. Similarly, only functions and operators necessary for performing rotations are implemented.

Constructor & Destructor Documentation

Core::Quaternion::Quaternion ( const Matrix matrix)
explicit

construct a quaternion from the given rotation transformation NOTE: if the matrix is not pure rotation, the result is undefined NOTE: the matrix should be column major


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