00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _CIvfVec4d_h_
00026 #define _CIvfVec4d_h_
00027
00028 #include <ivf/ivfconfig.h>
00029 #include <ivfmath/IvfMathBase.h>
00030
00031 IvfSmartPointer(CIvfVec4d);
00032
00041 class IVFMATH_API CIvfVec4d : public CIvfMathBase {
00042 private:
00043 double m_vector[4];
00044 public:
00046 CIvfVec4d();
00047
00049 CIvfVec4d(double vx, double vy, double vz);
00050
00052 CIvfVec4d(double vx, double vy, double vz, double vw);
00053
00055 CIvfVec4d(CIvfVec4d& v);
00056
00058 virtual ~CIvfVec4d();
00059
00060 IvfClassInfo("CIvfVec4d",CIvfMathBase);
00061
00063 void rotate(CIvfVec4d& axis, double angle);
00064
00066 void normalize();
00067
00069 double length();
00070
00072 void negate();
00073
00074 #ifdef IVF_HAVE_IOSTREAM
00075
00076 void print(std::ostream &out);
00077 #else
00078
00079 void print(ostream &out);
00080 #endif
00081
00083 void getEulerAngles(double &pitch, double &heading);
00084
00086 void setComponents(double vx, double vy, double vz);
00087
00089 void setComponents(double vx, double vy, double vz, double vw);
00090
00092 void getComponents(double &vx, double &vy, double &vz, double &vw);
00093
00095 void getComponents(double &vx, double &vy, double &vz);
00096
00098 void setComponents(const double *v);
00099
00101 void getComponents(double* v);
00102
00104 void setZ(double value);
00105
00107 void setY(double value);
00108
00110 void setX(double value);
00111
00113 CIvfVec4d& operator+=(CIvfVec4d& a);
00114
00116 CIvfVec4d& operator-=(CIvfVec4d& a);
00117
00118
00120 CIvfVec4d& operator=(CIvfVec4d& a);
00121
00123 double operator[](const int idx);
00124
00125 };
00126
00128 IVFMATH_API CIvfVec4d& operator*(CIvfVec4d& a, CIvfVec4d& b);
00129
00131 IVFMATH_API CIvfVec4d& operator*(CIvfVec4d& a, double b);
00132
00134 IVFMATH_API CIvfVec4d& operator*(double a, CIvfVec4d& b);
00135
00137 IVFMATH_API CIvfVec4d& operator+(CIvfVec4d& a, CIvfVec4d& b);
00138
00140 IVFMATH_API CIvfVec4d& operator-(CIvfVec4d& a, CIvfVec4d& b);
00141
00142 IVFMATH_API CIvfVec4d& ivfGetTempVec4d();
00143
00146 #endif