- Cal3D 0.11 API Reference -

dualquaternion.h
1//****************************************************************************//
2// dualquaternion.h //
3// Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger //
4//****************************************************************************//
5// This library is free software; you can redistribute it and/or modify it //
6// under the terms of the GNU Lesser General Public License as published by //
7// the Free Software Foundation; either version 2.1 of the License, or (at //
8// your option) any later version. //
9//****************************************************************************//
10
11#ifndef CAL_DUAL_QUATERNION_H
12#define CAL_DUAL_QUATERNION_H
13
14//****************************************************************************//
15// Includes //
16//****************************************************************************//
17
18#include "cal3d/global.h"
19#include "cal3d/vector.h"
20#include "cal3d/quaternion.h"
21
22//****************************************************************************//
23// Class declaration //
24//****************************************************************************//
25
26class CAL3D_API CalDualQuaternion
27{
28public:
29 // member variables
30 CalQuaternion nondual;
31 CalQuaternion dual;
32
33 // constructors/destructor
34 CalDualQuaternion() {} // default constructor
35 CalDualQuaternion( const CalDualQuaternion& inOther ) // copy constructor
36 : nondual( inOther.nondual ), dual( inOther.dual ) {}
37 CalDualQuaternion( const CalQuaternion& inRotation,
38 const CalVector& inTranslation );
40
41 // assignment
42 inline CalDualQuaternion& operator=( const CalDualQuaternion& inOther )
43 {
44 nondual = inOther.nondual;
45 dual = inOther.dual;
46 return *this;
47 }
48
49 inline void operator*=( float s )
50 {
51 nondual *= s;
52 dual *= s;
53 }
54
55 inline void operator+=( const CalDualQuaternion& inOther )
56 {
57 nondual += inOther.nondual;
58 dual += inOther.dual;
59 }
60
61 void normalize();
62
63 void transformPoint( const CalVector& inPt, CalVector& outPt ) const;
64};
65
66
67#endif // CAL_DUAL_QUATERNION_H
68
69//****************************************************************************//
Definition dualquaternion.h:27
The quaternion class.
Definition quaternion.h:36
The vector class.
Definition vector.h:37

Generated by The Cal3D Team with Doxygen 1.10.0