|
|
|
fungvector.h00001 /*************************************************************************** 00002 fungvector.h - description 00003 ------------------- 00004 begin : Thu Nov 7 2002 00005 copyright : (C) 2002 by Fungmeista 00006 email : mizunoami44@sourceforge.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef FUNGVECTOR_H 00019 #define FUNGVECTOR_H 00020 00021 class SphericalCoord; 00022 class CylindricalCoord; 00023 00028 class FungVector 00029 { 00030 public: 00031 FungVector(float x=0,float y=0,float z=0); 00032 FungVector(SphericalCoord &); 00033 FungVector(CylindricalCoord &); 00034 ~FungVector(); 00035 00039 static FungVector normal(FungVector,FungVector,FungVector); 00040 00042 static void cross_product(FungVector &, FungVector &, FungVector &, FungVector *); 00043 00045 static float magnitude(FungVector &); 00046 00048 static void normalize(FungVector *); 00049 00051 void toArray(float vec[3]); 00052 00053 float x; 00054 float y; 00055 float z; 00056 }; 00057 #endif //FungVector |