2
* Copyright (C) 2002 Terence M. Welsh
3
* Ported to Linux by Tugrul Galatali <tugrul@galatali.com>
5
* rsMath is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation.
9
* rsMath is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32
rsQuat (float x, float y, float z, float w);
34
void set (float x, float y, float z, float w); // x, y, z, w
35
void copy (rsQuat); // Copy another quaternion
36
void make (float a, float x, float y, float z); // angle, axis
37
void make (float a, const rsVec & v);
39
void preMult (rsQuat & postQuat); // Multiply this quaternion by
40
// the passed quaternion
42
void postMult (rsQuat & preQuat); // Multiply the passed quaternion
45
void toMat (float *); // Convert quaternion to array of 16 floats
46
void fromMat (float *); // Convert array of 16 floats to quaternion
47
void fromEuler (float, float, float); // Convert from hpr angles
48
void slerp (rsQuat, rsQuat, float); // Interpolate first quaternion
49
// to second using float from 0.0
52
float &operator [] (int i) {
54
} const float &operator [] (int i)const {