00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Math Library 00005 * Module : IGeometricObject2D 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 IGeometricObject2DHPP 00033 #define IGeometricObject2DHPP 00034 00035 #include <zeusbase/System/Interfaces/IList.hpp> 00036 #include <zeusbase/System/Interfaces/IValueType.hpp> 00037 #include <zeusmath/Config/PlatformDefines.hpp> 00038 #include <zeusmath/Geometry/Interfaces/IVector2D.hpp> 00039 00040 00041 #define INTERFACE_IGeometricObject2D TIID(0x668d0dfb, 0x7a53, 0x4ddf, 0x9b, 0x59, 0x81, 0xea, 0xad, 0x67, 0x86, 0x25) 00042 00043 #define INTERSECT_TANGENT_TOLERANCE 1e-6 00044 00045 00046 BEGIN_NAMESPACE_Zeus 00047 00048 00049 /******************************************************************************/ 00052 /******************************************************************************/ 00053 class IGeometricObject2D : public IValueType 00054 { 00055 HIDE_ASSIGNMENT_OPERATOR(IGeometricObject2D) 00056 00057 public: 00059 virtual const InterfaceID& MQUALIFIER getInterfaceID() const = 0; 00060 00061 /******************************************************************************/ 00100 /******************************************************************************/ 00101 virtual Retval MQUALIFIER intersect(const IGeometricObject2D& rObject, 00102 IList<IVector2D>& rLstIntersectionPoints, 00103 const Float& rfTangentTolerance = 00104 INTERSECT_TANGENT_TOLERANCE) const = 0; 00105 00106 /**************************************************************************/ 00112 /**************************************************************************/ 00113 virtual bool MQUALIFIER containsPoint(const IVector2D& rVecPoint) const = 0; 00114 00115 /**************************************************************************/ 00120 /**************************************************************************/ 00121 virtual void MQUALIFIER calcClosestPointToPoint(const IVector2D& rVecPoint, 00122 IVector2D& rVecClosestPoint) const = 0; 00123 00124 /******************************************************************************/ 00130 /******************************************************************************/ 00131 virtual Float MQUALIFIER calcDistanceToPoint(const IVector2D& rVecPoint) const = 0; 00132 00133 /******************************************************************************/ 00141 /******************************************************************************/ 00142 virtual Float MQUALIFIER calcDistanceToObject(const IGeometricObject2D& rObject) const = 0; 00143 00144 /******************************************************************************/ 00154 /******************************************************************************/ 00155 virtual Retval MQUALIFIER getXMinPoint(IVector2D& rVecPoint) const = 0; 00156 00157 /******************************************************************************/ 00167 /******************************************************************************/ 00168 virtual Retval MQUALIFIER getXMaxPoint(IVector2D& rVecPoint) const = 0; 00169 00170 /******************************************************************************/ 00180 /******************************************************************************/ 00181 virtual Retval MQUALIFIER getYMinPoint(IVector2D& rVecPoint) const = 0; 00182 00183 /******************************************************************************/ 00193 /******************************************************************************/ 00194 virtual Retval MQUALIFIER getYMaxPoint(IVector2D& rVecPoint) const = 0; 00195 00196 /******************************************************************************/ 00204 /******************************************************************************/ 00205 virtual void MQUALIFIER getMinMaxCoordinates(Float& rfXMin, Float& rfXMax, 00206 Float& rfYMin, Float& rfYMax) const = 0; 00207 }; 00208 00209 END_NAMESPACE_Zeus 00210 00211 00212 #endif 00213