Page principale   Liste des namespaces   Hiérarchie des classes   Liste par ordre alphabétique   Liste des composants   Liste des fichiers   Composants   Déclarations  

ExQuaternion.h

Aller à la documentation de ce fichier.
00001 /************************************************************************/
00002 /* Ex Nihlo Engine by Hermanns Christophe                                                               */
00003 /************************************************************************/
00004 /* This program is free software; you can redistribute it and/or                */
00005 /* modify it under the terms of the GNU General Public License                  */
00006 /* as published by the Free Software Foundation; either version 2               */
00007 /* of the License, or (at your option) any later version.                               */
00008 /*                                                                                                                                              */
00009 /* This program is distributed in the hope that it will be useful,              */
00010 /* but WITHOUT ANY WARRANTY; without even the implied warranty of               */
00011 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                                 */
00012 /*                                                                                                                                              */
00013 /* See the GNU General Public License for more details.                                 */
00014 /*                                                                                                                                              */
00015 /* You should have received a copy of the GNU General Public License    */
00016 /* along with this program; if not, write to the Free Software                  */
00017 /* Foundation, Inc., 59 Temple Place - Suite 330,                                               */
00018 /* Boston, MA  02111-1307, USA.                                                                                 */
00019 /*                                                                                                                                              */
00020 /* If you use a important part of this code please send me a mail               */
00021 /* I just want to see where my code go thks :)                                                  */
00022 /************************************************************************/
00023 /* For contact  : Hermanns Christophe                                                                   */
00024 /* Mail         : Data@skynet.be                                                                                */
00025 /* ICQ          : 8030901                                                                                               */
00026 /* MSN Messenger: Data_7@hotmail.com                                                                    */
00027 /************************************************************************/ 
00028 
00029 /************************************************************************/
00030 /* File Name   :ExQuaternion.h                                                                                  */
00031 /*                                                                                                                                              */
00032 /* Star Date   :03/15/2002                                                                                              */
00033 /*                                                                                                                                              */
00034 /* Last Update :03/15/2002                                                                                              */
00035 /*                                                                                                                                              */
00036 /* File Description :Quaternion Class                                                                   */
00037 /*                                       Operation on Quaternion                                                        */
00038 /************************************************************************/
00039 
00040 
00041 /* $Id: ExQuaternion.h,v 1.2 2002/05/29 00:03:58 binny Exp $ */
00042 
00043 #ifndef __EXQUATERNION_H__
00044 #define __EXQUATERNION_H__
00045 
00046 #include "ExDefine.h"
00047 #include <math.h>
00048 #include <cmath>
00049 class ExQuaternion  
00050 {
00051 public:
00052 //--------------------------------
00053 //Variable
00054 //--------------------------------
00055         float qw,qx,qy,qz;
00056 //--------------------------------
00057 //Constructor // Destructor
00058 //--------------------------------
00059         ExQuaternion();
00060         ExQuaternion(float w,float x,float y,float z);
00061         ~ExQuaternion();
00062 //--------------------------------
00063 //Methode
00064 //--------------------------------
00065         void LoadIdentity(void);
00066         void SetQuaternion(float w,float x,float y,float z);
00067         //void SetQuaternion();
00068         void Normalize(void);
00069         void Conjugate(void);
00070         float GetMagnitude(void);
00071         void SetEuler(float yaw,float pitch,float roll);
00072 //--------------------------------
00073 // Operator
00074 //--------------------------------
00075         ExQuaternion operator- (const ExQuaternion &Q);
00076         ExQuaternion operator+ (const ExQuaternion &Q);
00077         ExQuaternion operator* (const float scalar);
00078         ExQuaternion operator* (const ExQuaternion &Q);
00079 //--------------------------------
00080 // friends
00081 //--------------------------------
00082         friend std::ostream& operator<<(std::ostream& s,const ExQuaternion &q);
00083 };
00084 
00085 #endif // __EXQUATERNION_H__

Généré le Tue Aug 6 20:25:30 2002 pour ExNihilo par doxygen1.2.17