Fawkes API Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * hom_polar.h - A polar coordinate 00004 * 00005 * Created: Tue April 22 22:42:38 2008 00006 * Copyright 2008 Daniel Beck 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __GEOMETRY_HOM_POLAR_H_ 00025 #define __GEOMETRY_HOM_POLAR_H_ 00026 00027 #include <geometry/hom_vector.h> 00028 00029 namespace fawkes { 00030 00031 class HomPolar : public HomVector 00032 { 00033 public: 00034 HomPolar(float r = 0.0, float phi = 0.0); 00035 HomPolar(float r, float phi_x, float phi_y); 00036 HomPolar(const HomCoord& h); 00037 virtual ~HomPolar(); 00038 00039 float r() const; 00040 void r(float r); 00041 00042 float phi() const; 00043 void phi(float phi); 00044 float phi_z() const; 00045 void phi_z(float phi_z); 00046 float phi_y() const; 00047 void phi_y(float phi_y); 00048 void phi(float phi_x, float phi_y); 00049 00050 virtual HomPolar& rotate_x(float rad); 00051 virtual HomPolar& rotate_y(float rad); 00052 virtual HomPolar& rotate_z(float rad); 00053 00054 virtual HomPolar operator-(const HomPolar& h) const; 00055 virtual HomPolar& operator-=(const HomPolar& h); 00056 00057 virtual HomPolar operator+(const HomPolar& h) const; 00058 virtual HomPolar& operator+=(const HomPolar& h); 00059 00060 virtual HomPolar& operator=(const HomPolar& h); 00061 00062 HomVector get_vector() const; 00063 00064 private: 00065 float m_r; 00066 float m_phi_z; 00067 float m_phi_y; 00068 }; 00069 00070 } // end namespace fawkes 00071 00072 #endif /* __GEOMETRY_HOM_POLART_H_ */