00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Math Library 00005 * Module : IPlane 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 IPlaneHPP 00033 #define IPlaneHPP 00034 00035 #include <zeusmath/Config/PlatformDefines.hpp> 00036 #include <zeusmath/Geometry/Interfaces/IGeometricObject3D.hpp> 00037 #include <zeusmath/Geometry/Interfaces/IStraightLine3D.hpp> 00038 00039 00040 #define INTERFACE_IPlane TIID(0x4740f7e, 0xc374, 0x4157, 0x9e, 0x0, 0x7d, 0xda, 0x98, 0x7b, 0xdc, 0x85) 00041 00042 00043 BEGIN_NAMESPACE_Zeus 00044 00045 00046 /******************************************************************************/ 00049 /******************************************************************************/ 00050 class IPlane : public IGeometricObject3D 00051 { 00052 public: 00053 /******************************************************************************/ 00057 /******************************************************************************/ 00058 virtual const IVector3D& MQUALIFIER getInitialVector() const = 0; 00059 00060 /******************************************************************************/ 00064 /******************************************************************************/ 00065 virtual const IVector3D& MQUALIFIER getDirectionVector1() const = 0; 00066 00067 /******************************************************************************/ 00071 /******************************************************************************/ 00072 virtual const IVector3D& MQUALIFIER getDirectionVector2() const = 0; 00073 00074 /******************************************************************************/ 00078 /******************************************************************************/ 00079 virtual void MQUALIFIER setInitialVector(const IVector3D& rVecInitial) = 0; 00080 00081 /******************************************************************************/ 00085 /******************************************************************************/ 00086 virtual void MQUALIFIER setDirectionVector1(const IVector3D& rVecDirection1) = 0; 00087 00088 /******************************************************************************/ 00092 /******************************************************************************/ 00093 virtual void MQUALIFIER setDirectionVector2(const IVector3D& rVecDirection2) = 0; 00094 00095 /******************************************************************************/ 00099 /******************************************************************************/ 00100 virtual const Float& MQUALIFIER getCoordFormA() const = 0; 00101 00102 /******************************************************************************/ 00106 /******************************************************************************/ 00107 virtual const Float& MQUALIFIER getCoordFormB() const = 0; 00108 00109 /******************************************************************************/ 00113 /******************************************************************************/ 00114 virtual const Float& MQUALIFIER getCoordFormC() const = 0; 00115 00116 /******************************************************************************/ 00120 /******************************************************************************/ 00121 virtual const Float& MQUALIFIER getCoordFormD() const = 0; 00122 00123 /******************************************************************************/ 00128 /******************************************************************************/ 00129 virtual const Float* MQUALIFIER getCoordForm() const = 0; 00130 00131 /******************************************************************************/ 00135 /******************************************************************************/ 00136 virtual void MQUALIFIER setCoordFormA(const Float& a) = 0; 00137 00138 /******************************************************************************/ 00142 /******************************************************************************/ 00143 virtual void MQUALIFIER setCoordFormB(const Float& b) = 0; 00144 00145 /******************************************************************************/ 00149 /******************************************************************************/ 00150 virtual void MQUALIFIER setCoordFormC(const Float& c) = 0; 00151 00152 /******************************************************************************/ 00156 /******************************************************************************/ 00157 virtual void MQUALIFIER setCoordFormD(const Float& d) = 0; 00158 00159 /******************************************************************************/ 00163 /******************************************************************************/ 00164 virtual void MQUALIFIER assign(const IPlane& rPlane) = 0; 00165 00166 /******************************************************************************/ 00170 /******************************************************************************/ 00171 virtual void MQUALIFIER calcNormalVector(IVector3D& rVecNormal) const = 0; 00172 00173 /******************************************************************************/ 00177 /******************************************************************************/ 00178 virtual bool MQUALIFIER isValid() const = 0; 00179 00180 /******************************************************************************/ 00182 /******************************************************************************/ 00183 virtual void MQUALIFIER initAsPlaneXY() = 0; 00184 00185 /******************************************************************************/ 00187 /******************************************************************************/ 00188 virtual void MQUALIFIER initAsPlaneXZ() = 0; 00189 00190 /******************************************************************************/ 00192 /******************************************************************************/ 00193 virtual void MQUALIFIER initAsPlaneYZ() = 0; 00194 00195 /******************************************************************************/ 00199 /******************************************************************************/ 00200 virtual bool MQUALIFIER isPlaneXY() const = 0; 00201 00202 /******************************************************************************/ 00206 /******************************************************************************/ 00207 virtual bool MQUALIFIER isPlaneXZ() const = 0; 00208 00209 /******************************************************************************/ 00213 /******************************************************************************/ 00214 virtual bool MQUALIFIER isPlaneYZ() const = 0; 00215 00216 /******************************************************************************/ 00222 /******************************************************************************/ 00223 virtual void MQUALIFIER calcPointFromParameters(const Float& fParameter1, 00224 const Float& fParameter2, 00225 IVector3D& rVecPoint) const = 0; 00226 00227 /******************************************************************************/ 00237 /******************************************************************************/ 00238 virtual bool MQUALIFIER calcParametersFromPoint(const IVector3D& rVecPoint, 00239 Float& fParameter1, 00240 Float& fParameter2) const = 0; 00241 00242 /******************************************************************************/ 00244 /******************************************************************************/ 00245 /******************************************************************************/ 00251 /******************************************************************************/ 00252 virtual bool MQUALIFIER isParallel(const IPlane& rPlane) const = 0; 00253 00254 /******************************************************************************/ 00260 /******************************************************************************/ 00261 virtual bool MQUALIFIER isEqual(const IPlane& rPlane) const = 0; 00262 00263 /******************************************************************************/ 00265 /******************************************************************************/ 00266 /******************************************************************************/ 00273 /******************************************************************************/ 00274 virtual bool MQUALIFIER arePointsOnSameSide(const IVector3D& rVecPoint1, 00275 const IVector3D& rVecPoint2) const = 0; 00276 00277 /******************************************************************************/ 00283 /******************************************************************************/ 00284 virtual Float MQUALIFIER calcDistanceTo(const IVector3D& rVecPoint) const = 0; 00285 00286 /******************************************************************************/ 00293 /******************************************************************************/ 00294 virtual bool MQUALIFIER calcIntersectionPointWithStraightLine3D(const IStraightLine3D& rStraightLine3D, 00295 IVector3D& rVecIntersectionPoint) const = 0; 00296 00297 /******************************************************************************/ 00304 /******************************************************************************/ 00305 virtual bool MQUALIFIER calcIntersectionPointWith2Planes(const IPlane& rPlane1, 00306 const IPlane& rPlane2, 00307 IVector3D& rVecIntersectionPoint) const = 0; 00308 00309 /******************************************************************************/ 00316 /******************************************************************************/ 00317 virtual bool MQUALIFIER calcIntersectionLine(const IPlane& rPlane, 00318 IStraightLine3D& rIntersectionLine) const = 0; 00319 00320 /******************************************************************************/ 00325 /******************************************************************************/ 00326 virtual void MQUALIFIER calcAngleTo(const IPlane& rPlane, IAngle& rAngle) const = 0; 00327 00328 /******************************************************************************/ 00334 /******************************************************************************/ 00335 virtual bool MQUALIFIER containsPoint(const IVector3D& rVecPoint) const = 0; 00336 00337 /******************************************************************************/ 00343 /******************************************************************************/ 00344 virtual bool MQUALIFIER containsStraightLine3D(const IStraightLine3D& rStraightLine3D) const = 0; 00345 00346 /******************************************************************************/ 00348 /******************************************************************************/ 00349 HIDE_ASSIGNMENT_OPERATOR(IPlane) 00350 }; 00351 00352 END_NAMESPACE_Zeus 00353 00354 00355 #endif 00356