Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

Vector3D.h

Go to the documentation of this file.
00001 
00007 #ifndef VECTOR3D_JIP695
00008 #define VECTOR3D_JIP695
00009 
00010 #include "Point3D.h"
00011 
00017 class Vector3D {
00018 public:
00019     Vector3D() : magx(0.0f), magy(0.0f), magz(0.0f) {}
00020 
00024     Vector3D( float magx, float magy, float magz ) {
00025         initRect( magx, magy, magz );
00026     }
00027 
00031     ~Vector3D() {}
00032 
00036     void initRect( float magx, float magy, float magz );
00037 
00047     void initSphere( float r, float theta, float phi );
00048 
00052     float getMagx() const {return magx;}
00053 
00057     float getMagy() const {return magy;}
00058 
00062     float getMagz() const {return magz;}
00063 
00067     void mult( float scalar );
00068 
00072     void multX( float scalar );
00073 
00077     void multY( float scalar );
00078 
00082     void multZ( float scalar );
00083 
00087     void add(const Vector3D& other);
00088 
00092     Vector3D& operator += ( const Vector3D& rhs );
00093 
00098     void addTo( Point3D& other ) const {
00099         other.x += magx;
00100         other.y += magy;
00101         other.z += magz;
00102     }
00103 
00104 private:
00105     float magx, magy, magz;
00106 };
00107 
00108 #endif

Generated on Tue Mar 4 02:29:25 2003 for SuperIsoBomb by doxygen1.2.18