Vector3.hh
Go to the documentation of this file.
00001 
00004 #ifndef VECTOR3_HH
00005 #define VECTOR3_HH
00006 
00007 #include <iostream>
00008 #include <blort/Recognizer3D/PNamespace.hh>
00009 #include <blort/Recognizer3D/Except.hh>
00010 
00011 namespace P 
00012 {
00013 
00017 class Vector3 
00018 {
00019 
00020 public:
00021   double x, y, z;
00022   Vector3();
00023   Vector3(double xx, double yy, double zz);
00024   void Set(double xx, double yy, double zz){ x=xx; y=yy; z=zz;}
00025   Vector3& operator+=(const Vector3 &v);
00026   Vector3& operator-=(const Vector3 &v);
00027   Vector3& operator*=(double s);
00028   Vector3& operator/=(double s) throw(Except);
00029   double NormSquare() const;
00030   double LengthSquare() const;
00031   double Norm() const;
00032   double Length() const;
00033   void Normalise();
00034 
00035 };
00036 
00037 Vector3 operator-(const Vector3 &v);
00038 bool operator==(const Vector3 &a, const Vector3 &b);
00039 bool operator!=(const Vector3 &a, const Vector3 &b);
00040 Vector3 operator+(const Vector3 &a, const Vector3 &b);
00041 Vector3 operator-(const Vector3 &a, const Vector3 &b);
00042 Vector3 operator*(const double s, const Vector3 &v);
00043 Vector3 operator*(const Vector3 &v, const double s);
00044 Vector3 operator/(const Vector3 &v, const double s) throw(Except);
00045 double Length(const Vector3 &v);
00046 Vector3 Normalise(const Vector3 &v);
00047 double Dot(const Vector3 &a, const Vector3 &b);
00048 Vector3 Cross(const Vector3 &a, const Vector3 &b);
00049 Vector3 MidPoint(const Vector3 &a, const Vector3 &b);
00050 double AngleBetween(const Vector3 &a, const Vector3 &b);
00051 double DistanceSquare(const Vector3 &a, const Vector3 &b);
00052 double Distance(const Vector3 &a, const Vector3 &b);
00053 Vector3 PlaneExp2Normal(const Vector3 &a, const Vector3 &b, const Vector3 &c);
00054 
00055 ostream& operator<<(ostream &os, const Vector3 &v);
00056 istream& operator>>(istream &is, Vector3 &v) throw(Except);
00057 string&       operator<<(string &s, const Vector3 &v);
00058 const string& operator>>(const string &s, Vector3 &v);
00059 }
00060 
00061 #include <blort/Recognizer3D/Vector3.ic>
00062 
00063 #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