ZeusMath-Library  2.0.4
IGeometricObject2D.hpp
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch)
3  *****************************************************************************
4  * Project : Zeus Math Library
5  * Module : IGeometricObject2D
6  * Package : Zeus.ZeusMath.Geometry.Interfaces
7  * Author : Martin Abbuehl
8  * Date : 27.12.2011
9  * System : Zeus-Framework
10  *****************************************************************************
11  * Licence: *
12  * This library is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU Lesser General Public License as *
14  * published by the Free Software Foundation; either version *
15  * 2.1 of the License, or (at your option) any later version. *
16  * *
17  * This library is distributed in the hope that it will be useful, *
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
20  * GNU Lesser General Public License for more details. *
21  * *
22  * You should have received a copy of the GNU Lesser General Public *
23  * License along with this library; if not, write to the Free Software *
24  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA *
25  *****************************************************************************/
26 
27 /*****************************************************************************
28  * Changes:
29  * 27.12.2011 bha: created zeus 2.0
30  *****************************************************************************/
31 
32 #ifndef IGeometricObject2DHPP
33 #define IGeometricObject2DHPP
34 
35 #include <zeusbase/System/Interfaces/IList.hpp>
36 #include <zeusbase/System/Interfaces/IValueType.hpp>
39 
40 
41 #define INTERFACE_IGeometricObject2D TIID(0x668d0dfb, 0x7a53, 0x4ddf, 0x9b, 0x59, 0x81, 0xea, 0xad, 0x67, 0x86, 0x25)
42 
43 
44 #define INTERSECT_TANGENT_TOLERANCE 1e-6
45 
46 
47 BEGIN_NAMESPACE_Zeus
48 
49 
50 /******************************************************************************/
53 /******************************************************************************/
54 class IGeometricObject2D : public IValueType
55 {
56  HIDE_ASSIGNMENT_OPERATOR(IGeometricObject2D)
57 
58  public:
60  virtual const InterfaceID& MQUALIFIER getInterfaceID() const = 0;
61 
63  virtual Float MQUALIFIER getLength() const = 0;
64 
65  /**************************************************************************/
78  /**************************************************************************/
79  virtual Retval MQUALIFIER getPointFromRunningParameter(const Float& rfRunningParameter,
80  IVector2D& rvecPoint) const = 0;
81 
82  /******************************************************************************/
121  /******************************************************************************/
122  virtual Retval MQUALIFIER intersect(const IGeometricObject2D& rObject,
123  IList<IVector2D>& rLstIntersectionPoints,
124  const Float& rfTangentTolerance =
125  INTERSECT_TANGENT_TOLERANCE) const = 0;
126 
127  /**************************************************************************/
137  /**************************************************************************/
138  virtual bool MQUALIFIER containsPoint(const IVector2D& rVecPoint,
139  const Float& rfTolerance = 0) const = 0;
140 
141  /**************************************************************************/
146  /**************************************************************************/
147  virtual void MQUALIFIER calcClosestPointToPoint(const IVector2D& rVecPoint,
148  IVector2D& rVecClosestPoint) const = 0;
149 
150  /******************************************************************************/
156  /******************************************************************************/
157  virtual Float MQUALIFIER calcDistanceToPoint(const IVector2D& rVecPoint) const = 0;
158 
159  /******************************************************************************/
167  /******************************************************************************/
168  virtual Float MQUALIFIER calcDistanceToObject(const IGeometricObject2D& rObject) const = 0;
169 
170  /******************************************************************************/
180  /******************************************************************************/
181  virtual Retval MQUALIFIER getXMinPoint(IVector2D& rVecPoint) const = 0;
182 
183  /******************************************************************************/
193  /******************************************************************************/
194  virtual Retval MQUALIFIER getXMaxPoint(IVector2D& rVecPoint) const = 0;
195 
196  /******************************************************************************/
206  /******************************************************************************/
207  virtual Retval MQUALIFIER getYMinPoint(IVector2D& rVecPoint) const = 0;
208 
209  /******************************************************************************/
219  /******************************************************************************/
220  virtual Retval MQUALIFIER getYMaxPoint(IVector2D& rVecPoint) const = 0;
221 
222  /******************************************************************************/
230  /******************************************************************************/
231  virtual void MQUALIFIER getMinMaxCoordinates(Float& rfXMin, Float& rfXMax,
232  Float& rfYMin, Float& rfYMax) const = 0;
233 };
234 
235 END_NAMESPACE_Zeus
236 
237 
238 #endif
239 
Definition: IGeometricObject2D.hpp:54
#define INTERSECT_TANGENT_TOLERANCE
Definition: IGeometricObject2D.hpp:44
Definition: IVector2D.hpp:47


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Sep 14 2016 06:45:52