00001 #pragma once 00002 #include "constants.h" 00003 #include "GMathObject.h" 00004 00005 class GVec4f : public GMathObject 00006 { 00007 public: 00008 float x; 00009 float y; 00010 float z; 00011 float w; 00012 00013 GVec4f operator+(const GVec4f &f); 00014 GVec4f operator-(const GVec4f &f); 00015 GVec4f cross(const GVec4f &f); 00016 float dot(const GVec4f &f); 00017 00018 GVec4f operator*(const float &f); 00019 GVec4f operator/(const float &f); 00020 GVec4f operator=(const GVec4f &f); 00021 00022 GVec4f &operator+=(const GVec4f &f); 00023 GVec4f &operator-=(const GVec4f &f); 00024 GVec4f &operator*=(const GVec4f &f); 00025 00026 GVec4f &operator+=(const float &f); 00027 GVec4f &operator-=(const float &f); 00028 GVec4f &operator*=(const float &f); 00029 GVec4f &operator/=(const float &f); 00030 00031 float magnitude(); 00032 void normalize(); 00033 00034 GVec4f(); 00035 GVec4f(const GVec4f &); 00036 GVec4f(float _x, float _y, float _z); 00037 GVec4f(float _x, float _y, float _z, float _w); 00038 float *GetFloatV(void); 00039 00040 static float distance(const GVec4f &a, const GVec4f &b); 00041 };