00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Math Library 00005 * Module : IStraightLine2D 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 IStraightLine2DHPP 00033 #define IStraightLine2DHPP 00034 00035 #include <zeusmath/Config/PlatformDefines.hpp> 00036 #include <zeusmath/Geometry/Interfaces/IGeometricObject2D.hpp> 00037 #include <zeusmath/Geometry/Interfaces/IVector2D.hpp> 00038 00039 00040 #define INTERFACE_IStraightLine2D TIID(0x6dab035a, 0x39ce, 0x4902, 0x9c, 0x88, 0xef, 0x6e, 0x15, 0x85, 0x5d, 0xf4) 00041 00042 00043 00044 BEGIN_NAMESPACE_Zeus 00045 00046 00047 /******************************************************************************/ 00050 /******************************************************************************/ 00051 class IStraightLine2D : public IGeometricObject2D 00052 { 00053 HIDE_ASSIGNMENT_OPERATOR(IStraightLine2D) 00054 00055 public: 00056 /******************************************************************************/ 00060 /******************************************************************************/ 00061 virtual const IVector2D& MQUALIFIER getInitialVector() const = 0; 00062 00063 /******************************************************************************/ 00067 /******************************************************************************/ 00068 virtual const IVector2D& MQUALIFIER getDirectionVector() const = 0; 00069 00070 /******************************************************************************/ 00074 /******************************************************************************/ 00075 virtual void MQUALIFIER setInitialVector(const IVector2D& rVecInitial) = 0; 00076 00077 /******************************************************************************/ 00081 /******************************************************************************/ 00082 virtual void MQUALIFIER setDirectionVector(const IVector2D& rVecDirection) = 0; 00083 00084 /******************************************************************************/ 00091 /******************************************************************************/ 00092 virtual bool MQUALIFIER getSlope(Float& rfSlope) const = 0; 00093 00094 /******************************************************************************/ 00101 /******************************************************************************/ 00102 virtual bool MQUALIFIER getYIntercept(Float& rfYIntercept) const = 0; 00103 00104 /******************************************************************************/ 00109 /******************************************************************************/ 00110 virtual void MQUALIFIER assign(const IStraightLine2D& rStraightLine) = 0; 00111 00112 /******************************************************************************/ 00114 /******************************************************************************/ 00115 /******************************************************************************/ 00117 /******************************************************************************/ 00118 virtual void MQUALIFIER initAsAxisX() = 0; 00119 00120 /******************************************************************************/ 00122 /******************************************************************************/ 00123 virtual void MQUALIFIER initAsAxisY() = 0; 00124 00125 /******************************************************************************/ 00129 /******************************************************************************/ 00130 virtual bool MQUALIFIER isAxisX() const = 0; 00131 00132 /******************************************************************************/ 00136 /******************************************************************************/ 00137 virtual bool MQUALIFIER isAxisY() const = 0; 00138 00139 /******************************************************************************/ 00143 /******************************************************************************/ 00144 virtual bool MQUALIFIER isValid() const = 0; 00145 00146 /******************************************************************************/ 00148 /******************************************************************************/ 00149 /******************************************************************************/ 00155 /******************************************************************************/ 00156 virtual bool MQUALIFIER isEqual(const IStraightLine2D& rStraightLine) const = 0; 00157 00158 /******************************************************************************/ 00164 /******************************************************************************/ 00165 virtual bool MQUALIFIER isParallel(const IStraightLine2D& rStraightLine) const = 0; 00166 00167 /******************************************************************************/ 00169 /******************************************************************************/ 00170 /******************************************************************************/ 00176 /******************************************************************************/ 00177 virtual void MQUALIFIER calcPointFromParameter(const Float& fParameter, IVector2D& rVecPoint) const = 0; 00178 00179 /******************************************************************************/ 00187 /******************************************************************************/ 00188 virtual bool MQUALIFIER calcParameterFromPoint(const IVector2D& rVecPoint, Float& fParameter) const = 0; 00189 00190 /******************************************************************************/ 00192 /******************************************************************************/ 00193 /******************************************************************************/ 00201 /******************************************************************************/ 00202 virtual bool MQUALIFIER calcPointAtX(const Float& x, IVector2D& rVecPoint) const = 0; 00203 00204 /******************************************************************************/ 00212 /******************************************************************************/ 00213 virtual bool MQUALIFIER calcPointAtY(const Float& y, IVector2D& rVecPoint) const = 0; 00214 00215 /******************************************************************************/ 00221 /******************************************************************************/ 00222 virtual bool MQUALIFIER arePointsOnSameSide(const IVector2D& rVecPoint1, 00223 const IVector2D& rVecPoint2) const = 0; 00224 }; 00225 00226 END_NAMESPACE_Zeus 00227 00228 00229 #endif 00230