00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Math Library 00005 * Module : IArc2D 00006 * Package : Zeus.ZeusMath.Geometry.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 IArc2DHPP 00033 #define IArc2DHPP 00034 00035 #include <zeusmath/Config/PlatformDefines.hpp> 00036 #include <zeusmath/System/Interfaces/IAngle.hpp> 00037 #include <zeusmath/Geometry/Interfaces/ICircle2D.hpp> 00038 #include <zeusmath/Geometry/Interfaces/IVector2D.hpp> 00039 00040 00041 #define INTERFACE_IArc2D TIID(0x5800ab08, 0xfd0c, 0x4591, 0x95, 0xb8, 0xd8, 0xe8, 0x99, 0x50, 0xf6, 0x2d) 00042 00043 00044 00045 BEGIN_NAMESPACE_Zeus 00046 00047 00048 /******************************************************************************/ 00051 /******************************************************************************/ 00052 class IArc2D : public IGeometricObject2D 00053 { 00054 HIDE_ASSIGNMENT_OPERATOR(IArc2D) 00055 00056 public: 00057 /**************************************************************************/ 00062 /**************************************************************************/ 00063 virtual ICircle2D& MQUALIFIER getCircle() = 0; 00064 00065 /**************************************************************************/ 00070 /**************************************************************************/ 00071 virtual const ICircle2D& MQUALIFIER getCircleConst() const = 0; 00072 00073 /**************************************************************************/ 00078 /**************************************************************************/ 00079 virtual void MQUALIFIER setCircle(const ICircle2D& rCircle) = 0; 00080 00081 /**************************************************************************/ 00084 /**************************************************************************/ 00085 virtual const IVector2D& MQUALIFIER getCenter() const = 0; 00086 00087 /**************************************************************************/ 00092 /**************************************************************************/ 00093 virtual void MQUALIFIER setCenter(const IVector2D& rVecCenter) = 0; 00094 00095 /**************************************************************************/ 00098 /**************************************************************************/ 00099 virtual const Float& MQUALIFIER getRadius() const = 0; 00100 00101 /**************************************************************************/ 00106 /**************************************************************************/ 00107 virtual void MQUALIFIER setRadius(const Float& rfRadius) = 0; 00108 00109 /**************************************************************************/ 00116 /**************************************************************************/ 00117 virtual const IAngle& MQUALIFIER getStartAngle() const = 0; 00118 00119 /**************************************************************************/ 00122 /**************************************************************************/ 00123 virtual const IAngle& MQUALIFIER getEndAngle() const = 0; 00124 00125 /**************************************************************************/ 00130 /**************************************************************************/ 00131 virtual void MQUALIFIER setStartAngle(const IAngle& rStartAngle) = 0; 00132 00133 /**************************************************************************/ 00138 /**************************************************************************/ 00139 virtual void MQUALIFIER setEndAngle(const IAngle& rEndAngle) = 0; 00140 00141 /**************************************************************************/ 00150 /**************************************************************************/ 00151 virtual void MQUALIFIER setAngles(const IAngle& rStartAngle, 00152 const IAngle& rEndAngle, 00153 bool bAnglesAreGivenCounterClockwise) = 0; 00154 00155 /**************************************************************************/ 00158 /**************************************************************************/ 00159 virtual void MQUALIFIER switchAngles() = 0; 00160 00161 /**************************************************************************/ 00166 /**************************************************************************/ 00167 virtual void MQUALIFIER getStartPoint(IVector2D& rVecStart) const = 0; 00168 00169 /**************************************************************************/ 00174 /**************************************************************************/ 00175 virtual void MQUALIFIER getEndPoint(IVector2D& rVecEnd) const = 0; 00176 00177 /**************************************************************************/ 00182 /**************************************************************************/ 00183 virtual Float MQUALIFIER getLength() const = 0; 00184 00185 /**************************************************************************/ 00190 /**************************************************************************/ 00191 virtual void MQUALIFIER createSupplementArc(IArc2D& rSupplementArc) const = 0; 00192 00193 /**************************************************************************/ 00198 /**************************************************************************/ 00199 virtual bool MQUALIFIER isShorterThanSupplementArc() const = 0; 00200 00201 /**************************************************************************/ 00206 /**************************************************************************/ 00207 virtual void MQUALIFIER assign(const IArc2D& rArc) = 0; 00208 00209 /**************************************************************************/ 00210 /* Comparisons. 00211 */ 00212 /**************************************************************************/ 00213 /**************************************************************************/ 00220 /**************************************************************************/ 00221 virtual bool MQUALIFIER isEqual(const IArc2D& rArc) const = 0; 00222 00223 /**************************************************************************/ 00224 /* Geometric calculations. */ 00225 /**************************************************************************/ 00226 00227 /**************************************************************************/ 00235 /**************************************************************************/ 00236 virtual bool MQUALIFIER containsAngle(const IAngle& rAngle, 00237 bool bIncludeStartAndEndPoints = true) const = 0; 00238 00239 /**************************************************************************/ 00247 /**************************************************************************/ 00248 virtual bool MQUALIFIER containsPoint2(const IVector2D& rVecPoint, 00249 bool bIncludeStartAndEndPoints = true) const = 0; 00250 00251 /**************************************************************************/ 00258 /**************************************************************************/ 00259 virtual void MQUALIFIER moveStartPointOnCircle(const Float& rfDistance, bool bCounterClockwise) = 0; 00260 00261 /**************************************************************************/ 00268 /**************************************************************************/ 00269 virtual void MQUALIFIER moveEndPointOnCircle(const Float& rfDistance, bool bCounterClockwise) = 0; 00270 }; 00271 00272 END_NAMESPACE_Zeus 00273 00274 00275 #endif 00276