]>
Dogcows Code - chaz/yoink/blob - src/Moof/cml/quaternion.h
1 /* -*- C++ -*- ------------------------------------------------------------
3 Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/
5 The Configurable Math Library (CML) is distributed under the terms of the
6 Boost Software License, v1.0 (see cml/LICENSE for details).
8 *-----------------------------------------------------------------------*/
13 #ifndef cml_quaternion_h
14 #define cml_quaternion_h
16 #include <cml/core/common.h>
20 // NOTE: 'scale' constant no longer used.
22 /** Helper to specify v1^v2 multiplication order. */
23 struct positive_cross
{
24 /*enum { scale = 1 };*/
27 /** Helper to specify v2^v1 multiplication order. */
28 struct negative_cross
{
29 /*enum { scale = -1 };*/
32 /** Helper to specify scalar-first quaternion ordering. */
37 /** Helper to specify vector-first quaternion ordering. */
42 /** A configurable quaternion.
44 * This class encapsulates the notion of a quaternion. The ArrayType
45 * template argument can be used to select the type of array to be used as
46 * internal storage for the quaternion's coefficients.
48 * @note Quaternions with two different orders cannot be used in the same
51 template<typename Element
, class ArrayType
= fixed
<>,
52 class Order
= scalar_first
, class Cross
= positive_cross
> class quaternion
;
56 #include <cml/quaternion/quaternion_ops.h>
57 #include <cml/quaternion/conjugate.h>
58 #include <cml/quaternion/quaternion_mul.h>
59 #include <cml/quaternion/quaternion_functions.h>
60 #include <cml/quaternion/quaternion_comparison.h>
61 #include <cml/quaternion/inverse.h>
62 #include <cml/quaternion/quaternion_print.h>
64 #include <cml/quaternion/quaternion.h>
68 // -------------------------------------------------------------------------
This page took 0.042216 seconds and 4 git commands to generate.