Warning, /education/marble/src/bindings/python/sip/Quaternion.sip is written in an unsupported language. File is not indexed.

0001 //
0002 // Copyright 2008 Simon Edwards <simon@simonzone.com>
0003 // 
0004 // This library is free software; you can redistribute it and/or
0005 // modify it under the terms of the GNU Lesser General Public
0006 // License as published by the Free Software Foundation; either 
0007 // version 2.1 of the License, or (at your option) any later version.
0008 // 
0009 // This library is distributed in the hope that it will be useful,
0010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
0011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012 // Lesser General Public License for more details.
0013 // 
0014 // You should have received a copy of the GNU Lesser General Public 
0015 // License along with this library.  If not, see <http://www.gnu.org/licenses/>.
0016 //
0017 
0018 namespace Marble
0019 {
0020 
0021 enum
0022 {
0023     Q_X,
0024     Q_Y,
0025     Q_Z,
0026     Q_W
0027 };
0028 
0029 typedef qreal* xmmfloat;
0030 
0031 typedef Marble::xmmfloat* matrix;
0032 
0033 
0034 class Quaternion
0035 {
0036 %TypeHeaderCode
0037 #include <Quaternion.h>
0038 %End
0039 
0040 public:
0041                             Quaternion ();
0042                             Quaternion (qreal w, qreal x, qreal y, qreal z);
0043     Marble::Quaternion      operator * (const Marble::Quaternion& q) const;
0044     bool                    operator == (const Marble::Quaternion& q) const;
0045     Marble::Quaternion&     operator *= (const Marble::Quaternion& q);
0046 
0047     void                    getSpherical (qreal& lon /out/, qreal& lat /out/) const;
0048 
0049     void                    normalize ();
0050     Marble::Quaternion      inverse () const;
0051     qreal                   pitch () const;
0052     qreal                   yaw () const;
0053     qreal                   roll () const;
0054     void                    rotateAroundAxis (const Marble::Quaternion& q /in/);
0055     void                    slerp (const Marble::Quaternion& q1, const Marble::Quaternion& q2, qreal t);
0056     void                    nlerp (const Marble::Quaternion& q1, const Marble::Quaternion& q2, qreal t);
0057 //FIXME    void                    toMatrix (Marble::matrix& m) const;
0058 //FIXME    void                    rotateAroundAxis (const Marble::matrix& m);
0059 //FIXME    Marble::xmmfloat v;
0060 };
0061 // Quaternion
0062 
0063 };
0064 // Marble
0065 
0066