QQuaternion Class Reference
#include <qquaternion.h>
Definition at line 59 of file qquaternion.h.
QQuaternion |
( |
qreal |
scalar, |
|
|
qreal |
xpos, |
|
|
qreal |
ypos, |
|
|
qreal |
zpos |
|
) |
| |
|
inline |
Definition at line 143 of file qquaternion.h.
143 : wp(aScalar), xp(xpos), yp(ypos), zp(zpos) {}
Definition at line 279 of file qquaternion.h.
280 : wp(aScalar), xp(aVector.x()), yp(aVector.y()), zp(aVector.z()) {}
Definition at line 305 of file qquaternion.h.
306 : wp(aVector.w()), xp(aVector.x()), yp(aVector.y()), zp(aVector.z()) {}
Definition at line 146 of file qquaternion.h.
148 return qIsNull(xp) && qIsNull(yp) && qIsNull(zp) && qIsNull(wp);
bool isIdentity |
( |
| ) |
const |
|
inline |
Definition at line 151 of file qquaternion.h.
153 return qIsNull(xp) && qIsNull(yp) && qIsNull(zp) && wp == 1.0f;
void setVector |
( |
qreal |
x, |
|
|
qreal |
y, |
|
|
qreal |
z |
|
) |
| |
|
inline |
void setScalar |
( |
qreal |
scalar | ) |
|
|
inline |
qreal lengthSquared |
( |
| ) |
const |
Definition at line 220 of file qquaternion.h.
GLXDrawable int64_t int64_t divisor
static QQuaternion fromAxisAndAngle |
( |
qreal |
x, |
|
|
qreal |
y, |
|
|
qreal |
z, |
|
|
qreal |
angle |
|
) |
| |
|
static |
Definition at line 229 of file qquaternion.h.
231 return q1.xp == q2.xp && q1.yp == q2.yp && q1.zp == q2.zp && q1.wp == q2.wp;
Definition at line 234 of file qquaternion.h.
236 return q1.xp != q2.xp || q1.yp != q2.yp || q1.zp != q2.zp || q1.wp != q2.wp;
Definition at line 249 of file qquaternion.h.
251 return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor);
Definition at line 254 of file qquaternion.h.
256 return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor);
Definition at line 198 of file qquaternion.h.
200 qreal ww = (q1.zp + q1.xp) * (q2.xp + q2.yp);
201 qreal yy = (q1.wp - q1.yp) * (q2.wp + q2.zp);
202 qreal zz = (q1.wp + q1.yp) * (q2.wp - q2.zp);
203 qreal xx = ww + yy + zz;
204 qreal qq = 0.5 * (xx + (q1.zp - q1.xp) * (q2.xp - q2.yp));
206 qreal
w = qq - ww + (q1.zp - q1.yp) * (q2.yp - q2.zp);
207 qreal
x = qq - xx + (q1.xp + q1.wp) * (q2.xp + q2.wp);
208 qreal
y = qq - yy + (q1.wp - q1.xp) * (q2.yp + q2.zp);
209 qreal
z = qq - zz + (q1.zp + q1.yp) * (q2.wp - q2.xp);
GLubyte GLubyte GLubyte GLubyte w
Definition at line 264 of file qquaternion.h.
GLXDrawable int64_t int64_t divisor
Definition at line 269 of file qquaternion.h.
friend bool qFuzzyCompare(const QQuaternion &q1, const QQuaternion &q2)
The documentation for this class was generated from the following file: