00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Math Library 00005 * Module : ILineSegment2D 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 ILineSegment2DHPP 00033 #define ILineSegment2DHPP 00034 00035 #include <zeusmath/Config/PlatformDefines.hpp> 00036 #include <zeusmath/Geometry/Interfaces/IStraightLine2D.hpp> 00037 #include <zeusmath/Geometry/Interfaces/IVector2D.hpp> 00038 00039 00040 #define INTERFACE_ILineSegment2D TIID(0x3207ccfa, 0x8c8a, 0x4156, 0xbf, 0xe6, 0xbd, 0x56, 0xf2, 0xf6, 0xa1, 0x18) 00041 00042 00043 00044 BEGIN_NAMESPACE_Zeus 00045 00046 00047 /******************************************************************************/ 00050 /******************************************************************************/ 00051 class ILineSegment2D : public IGeometricObject2D 00052 { 00053 HIDE_ASSIGNMENT_OPERATOR(ILineSegment2D) 00054 00055 public: 00056 /******************************************************************************/ 00060 /******************************************************************************/ 00061 virtual IStraightLine2D& MQUALIFIER getStraightLine() = 0; 00062 00063 /******************************************************************************/ 00067 /******************************************************************************/ 00068 virtual const IStraightLine2D& MQUALIFIER getStraightLineConst() const = 0; 00069 00070 /******************************************************************************/ 00074 /******************************************************************************/ 00075 virtual void MQUALIFIER getStartPoint(IVector2D& rVecStart) const = 0; 00076 00077 /******************************************************************************/ 00081 /******************************************************************************/ 00082 virtual void MQUALIFIER getEndPoint(IVector2D& rVecEnd) const = 0; 00083 00084 /******************************************************************************/ 00088 /******************************************************************************/ 00089 virtual void MQUALIFIER setStartPoint(const IVector2D& rVecStart) = 0; 00090 00091 /******************************************************************************/ 00095 /******************************************************************************/ 00096 virtual void MQUALIFIER setEndPoint(const IVector2D& rVecEnd) = 0; 00097 00098 /******************************************************************************/ 00100 /******************************************************************************/ 00101 virtual bool MQUALIFIER isStartPointIncluded() const = 0; 00102 00103 /******************************************************************************/ 00107 /******************************************************************************/ 00108 virtual void MQUALIFIER setStartPointIncluded(bool bInclude) = 0; 00109 00110 /******************************************************************************/ 00112 /******************************************************************************/ 00113 virtual bool MQUALIFIER isEndPointIncluded() const = 0; 00114 00115 /******************************************************************************/ 00119 /******************************************************************************/ 00120 virtual void MQUALIFIER setEndPointIncluded(bool bInclude) = 0; 00121 00122 /******************************************************************************/ 00126 /******************************************************************************/ 00127 virtual Float MQUALIFIER getLength() const = 0; 00128 00129 /******************************************************************************/ 00133 /******************************************************************************/ 00134 virtual void MQUALIFIER assign(const ILineSegment2D& rLineSegment) = 0; 00135 00136 /******************************************************************************/ 00140 /******************************************************************************/ 00141 virtual bool MQUALIFIER isValid() const = 0; 00142 00143 /******************************************************************************/ 00145 /******************************************************************************/ 00146 /******************************************************************************/ 00153 /******************************************************************************/ 00154 virtual bool MQUALIFIER isEqual(const ILineSegment2D& rLineSegment, 00155 bool bCheckBorderPointIncludedFlags = true) const = 0; 00156 00157 /******************************************************************************/ 00163 /******************************************************************************/ 00164 virtual bool MQUALIFIER isParallel(const ILineSegment2D& rLineSegment) const = 0; 00165 }; 00166 00167 END_NAMESPACE_Zeus 00168 00169 00170 #endif 00171