00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Math Library 00005 * Module : IAngle 00006 * Package : Zeus.ZeusMath.System.Interfaces 00007 * Author : Martin Abbuehl 00008 * Date : 27.12.2011 00009 * System : Zeus-Framework 00010 ***************************************************************************** 00011 * Licence: * 00012 * This library is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU Lesser General Public License as * 00014 * published by the Free Software Foundation; either version * 00015 * 2.1 of the License, or (at your option) any later version. * 00016 * * 00017 * This library is distributed in the hope that it will be useful, * 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00020 * GNU Lesser General Public License for more details. * 00021 * * 00022 * You should have received a copy of the GNU Lesser General Public * 00023 * License along with this library; if not, write to the Free Software * 00024 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA * 00025 *****************************************************************************/ 00026 00027 /***************************************************************************** 00028 * Changes: 00029 * 27.12.2011 bha: created zeus 2.0 00030 *****************************************************************************/ 00031 00032 #ifndef IAngleHPP 00033 #define IAngleHPP 00034 00035 #include <zeusbase/System/Interfaces/IValueType.hpp> 00036 #include <zeusmath/Config/PlatformDefines.hpp> 00037 00038 00039 BEGIN_NAMESPACE_Zeus 00040 00041 00042 /******************************************************************************/ 00046 /******************************************************************************/ 00047 class IAngle : public IValueType 00048 { 00049 public: 00050 /******************************************************************************/ 00052 /******************************************************************************/ 00053 enum ESystem 00054 { 00055 etRadians = 0, 00056 etDegrees = 1 00057 // Search for OnChangeIAngle::ESystem in files if you modify this enum. 00058 }; 00059 00060 /******************************************************************************/ 00064 /******************************************************************************/ 00065 virtual Float MQUALIFIER getRadians() const = 0; 00066 00067 /******************************************************************************/ 00071 /******************************************************************************/ 00072 virtual Float MQUALIFIER getDegrees() const = 0; 00073 00074 /******************************************************************************/ 00078 /******************************************************************************/ 00079 virtual void MQUALIFIER setRadians(const Float& fAngle) = 0; 00080 00081 /******************************************************************************/ 00085 /******************************************************************************/ 00086 virtual void MQUALIFIER setDegrees(const Float& fAngle) = 0; 00087 00088 /******************************************************************************/ 00093 /******************************************************************************/ 00094 virtual void MQUALIFIER assign(const IAngle& rAngle) = 0; 00095 00096 /******************************************************************************/ 00105 /******************************************************************************/ 00106 virtual bool MQUALIFIER isEqual(const IAngle& rAngle, 00107 bool bNormalizeToSingleCircle = false) const = 0; 00108 00109 /******************************************************************************/ 00111 /******************************************************************************/ 00112 /******************************************************************************/ 00116 /******************************************************************************/ 00117 virtual Float MQUALIFIER cos() const = 0; 00118 00119 /******************************************************************************/ 00123 /******************************************************************************/ 00124 virtual Float MQUALIFIER sin() const = 0; 00125 00126 /******************************************************************************/ 00130 /******************************************************************************/ 00131 virtual Float MQUALIFIER tan() const = 0; 00132 00133 /******************************************************************************/ 00140 /******************************************************************************/ 00141 virtual void MQUALIFIER normalizeToInterval(const IAngle& rAngleMin, 00142 const IAngle& rAngleMax, 00143 bool bIncludeMin, bool bIncludeMax) = 0; 00144 00145 /******************************************************************************/ 00147 /******************************************************************************/ 00148 virtual void MQUALIFIER normalizeToSingleCircle() = 0; 00149 00150 /******************************************************************************/ 00152 /******************************************************************************/ 00153 HIDE_ASSIGNMENT_OPERATOR(IAngle) 00154 }; 00155 00156 END_NAMESPACE_Zeus 00157 00158 00159 #endif 00160