tgVector3.h
Go to the documentation of this file.
00001 
00009 #ifndef TG_VECTOR3
00010 #define TG_VECTOR3
00011 
00012 #ifndef PI
00013 #define PI 3.14159265358979323846f
00014 #endif
00015 
00016 #include <math.h>
00017 
00018 namespace TomGine{
00019 
00023 class tgVector3
00024 {
00025 public:
00026         float x, y, z;
00027         
00028         tgVector3();
00029         //tgVector3(const tgVector3 &v);
00030         tgVector3(float all);
00031         tgVector3(float x, float y, float z);
00032 
00033         tgVector3 operator=(tgVector3 v);
00034         tgVector3 operator+(tgVector3 v);
00035         tgVector3 operator-(tgVector3 v);
00036         tgVector3 operator*(tgVector3 v);
00037         tgVector3 operator*(float m);
00038         tgVector3 operator/(float m);
00039         
00040         tgVector3 cross(tgVector3 v);
00041         static tgVector3 cross(tgVector3 v1, tgVector3 v2);
00042         float dot(tgVector3 v);
00043         void normalize();
00044         float length();
00045         void setLength(float l);
00046 
00047         void rotateX(float fAngle);
00048         void rotateY(float fAngle);
00049         void rotateZ(float fAngle);
00050 
00051         void rotate(float fAngle, tgVector3 vAxis);
00052 
00053         //void GetRotYZ(float &fAngleY, float &fAngleZ);
00054 
00055 };
00056 
00057 // tgVector3 funktions
00058 float Angle(tgVector3 a, tgVector3 b);
00059 
00060 } // namespace TomGine
00061 
00062 #endif


blort
Author(s): Thomas Mörwald , Michael Zillich , Andreas Richtsfeld , Johann Prankl , Markus Vincze , Bence Magyar
autogenerated on Wed Aug 26 2015 15:24:12