All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Typedefs
Quaternion.h File Reference

Header file for the implementation of a quaternion. More...

#include <cmath>
#include <istream>
#include <ostream>
#include <blaze/math/Accuracy.h>
#include <blaze/math/shims/Equal.h>
#include <blaze/math/shims/IsDefault.h>
#include <blaze/math/shims/IsNaN.h>
#include <blaze/math/traits/MathTrait.h>
#include <blaze/math/traits/MultTrait.h>
#include <blaze/math/Types.h>
#include <blaze/system/Precision.h>
#include <blaze/util/Assert.h>
#include <blaze/util/constraints/Const.h>
#include <blaze/util/constraints/FloatingPoint.h>
#include <blaze/util/constraints/Volatile.h>
#include <blaze/util/Types.h>

Go to the source code of this file.

Classes

class  blaze::Quaternion< Type >
 Efficient implementation of a quaternion.Quaternions are a superior way to deal with rotations and orientations. This quaternion consists of 4 statically allocated elements, where the first element represents the real part and the three other elements represent the three imaginary parts. The naming convention of the elements is as following: More...
 

Namespaces

namespace  blaze
 Namespace of the Blaze C++ math library.
 

Typedefs

typedef Quaternion< real > blaze::Quat
 Quaternion of real type.
 

Functions

Quaternion operators
template<typename T1 , typename T2 >
bool blaze::operator== (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs)
 Equality operator for the comparison of two quaternions.
 
template<typename T1 , typename T2 >
bool blaze::operator!= (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs)
 Inequality operator for the comparison of two quaternions.
 
template<typename Type >
std::ostream & blaze::operator<< (std::ostream &os, const Quaternion< Type > &q)
 Global output operator for quaternions.
 
template<typename Type >
std::istream & blaze::operator>> (std::istream &is, Quaternion< Type > &q)
 Global input operator for quaternions.
 
template<typename Type >
bool blaze::isnan (const Quaternion< Type > &q)
 Checks the given quaternion for not-a-number elements.
 
template<typename Type >
void blaze::reset (Quaternion< Type > &q)
 Resetting the given quaternion.
 
template<typename Type >
void blaze::clear (Quaternion< Type > &q)
 Clearing the given quaternion.
 
template<typename Type >
bool blaze::isDefault (const Quaternion< Type > &q)
 Returns whether the given quaternion is in default state.
 
template<typename Type >
const Quaternion< Type > blaze::inv (const Quaternion< Type > &q)
 Inverting the given quaternion ( $ \hat{q} = \hat{p}^{-1} $).
 
template<typename Type >
const Quaternion< Type > blaze::sq (const Quaternion< Type > &q)
 Squaring the given quaternion.
 
template<typename Type >
void blaze::swap (Quaternion< Type > &a, Quaternion< Type > &b)
 Swapping the contents of two quaternions.
 
Quaternion arithmetic operators
template<typename T1 , typename T2 >
const Quaternion< typename
MultTrait< T1, T2 >::Type > 
blaze::operator* (const Quaternion< T1 > &lhs, const Quaternion< T2 > &rhs)
 Multiplication operator for the multiplication of two quaternions ( $ \hat{q}=\hat{p}*\hat{r} $).
 

Detailed Description

Header file for the implementation of a quaternion.

Copyright (C) 2011 Klaus Iglberger - All Rights Reserved

This file is part of the Blaze library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with a special exception for linking and compiling against the Blaze library, the so-called "runtime exception"; see the file COPYING. If not, see http://www.gnu.org/licenses/.