00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Math Library 00005 * Module : IStraightLine3D 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 IStraightLine3DHPP 00033 #define IStraightLine3DHPP 00034 00035 #include <zeusmath/Config/PlatformDefines.hpp> 00036 #include <zeusmath/Geometry/Interfaces/IGeometricObject3D.hpp> 00037 #include <zeusmath/Geometry/Interfaces/IVector3D.hpp> 00038 00039 00040 #define INTERFACE_IStraightLine3D TIID(0x1323ec6e, 0x82b6, 0x4aef, 0x93, 0xa6, 0xfc, 0x11, 0x38, 0x7d, 0x63, 0xd) 00041 00042 00043 BEGIN_NAMESPACE_Zeus 00044 00045 00046 /******************************************************************************/ 00049 /******************************************************************************/ 00050 class IStraightLine3D : public IGeometricObject3D 00051 { 00052 HIDE_ASSIGNMENT_OPERATOR(IStraightLine3D) 00053 00054 public: 00055 /******************************************************************************/ 00059 /******************************************************************************/ 00060 virtual const IVector3D& MQUALIFIER getInitialVector() const = 0; 00061 00062 /******************************************************************************/ 00066 /******************************************************************************/ 00067 virtual const IVector3D& MQUALIFIER getDirectionVector() const = 0; 00068 00069 /******************************************************************************/ 00073 /******************************************************************************/ 00074 virtual void MQUALIFIER setInitialVector(const IVector3D& rVecInitial) = 0; 00075 00076 /******************************************************************************/ 00080 /******************************************************************************/ 00081 virtual void MQUALIFIER setDirectionVector(const IVector3D& rVecDirection) = 0; 00082 00083 /******************************************************************************/ 00088 /******************************************************************************/ 00089 virtual void MQUALIFIER assign(const IStraightLine3D& rStraightLine3D) = 0; 00090 00091 /******************************************************************************/ 00093 /******************************************************************************/ 00094 /******************************************************************************/ 00096 /******************************************************************************/ 00097 virtual void MQUALIFIER initAsAxisX() = 0; 00098 00099 /******************************************************************************/ 00101 /******************************************************************************/ 00102 virtual void MQUALIFIER initAsAxisY() = 0; 00103 00104 /******************************************************************************/ 00106 /******************************************************************************/ 00107 virtual void MQUALIFIER initAsAxisZ() = 0; 00108 00109 /******************************************************************************/ 00113 /******************************************************************************/ 00114 virtual bool MQUALIFIER isAxisX() const = 0; 00115 00116 /******************************************************************************/ 00120 /******************************************************************************/ 00121 virtual bool MQUALIFIER isAxisY() const = 0; 00122 00123 /******************************************************************************/ 00127 /******************************************************************************/ 00128 virtual bool MQUALIFIER isAxisZ() const = 0; 00129 00130 /******************************************************************************/ 00134 /******************************************************************************/ 00135 virtual bool MQUALIFIER isValid() const = 0; 00136 00137 /******************************************************************************/ 00139 /******************************************************************************/ 00140 /******************************************************************************/ 00146 /******************************************************************************/ 00147 virtual bool MQUALIFIER isEqual(const IStraightLine3D& rStraightLine3D) const = 0; 00148 00149 /******************************************************************************/ 00155 /******************************************************************************/ 00156 virtual bool MQUALIFIER isParallel(const IStraightLine3D& rStraightLine3D) const = 0; 00157 00158 /******************************************************************************/ 00160 /******************************************************************************/ 00161 /******************************************************************************/ 00167 /******************************************************************************/ 00168 virtual void MQUALIFIER calcPointFromParameter(const Float& fParameter, IVector3D& rVecPoint) const = 0; 00169 00170 /******************************************************************************/ 00178 /******************************************************************************/ 00179 virtual bool MQUALIFIER calcParameterFromPoint(const IVector3D& rVecPoint, Float& fParameter) const = 0; 00180 00181 /******************************************************************************/ 00183 /******************************************************************************/ 00184 /******************************************************************************/ 00194 /******************************************************************************/ 00195 virtual void MQUALIFIER calcClosestPointTo(const IVector3D& rVecPoint, 00196 IVector3D& rVecClosestPoint, 00197 bool bLimited = false) const = 0; 00198 00199 /******************************************************************************/ 00209 /******************************************************************************/ 00210 virtual Float MQUALIFIER calcDistanceTo(const IVector3D& rVecPoint, 00211 bool bLimited = false) const = 0; 00212 00213 /******************************************************************************/ 00219 /******************************************************************************/ 00220 virtual bool MQUALIFIER containsPoint(const IVector3D& rVecPoint) const = 0; 00221 00222 /******************************************************************************/ 00229 /******************************************************************************/ 00230 virtual bool MQUALIFIER calcIntersectionPoint(const IStraightLine3D& rStraightLine3D, 00231 IVector3D& rVecIntersectionPoint) const = 0; 00232 00233 /******************************************************************************/ 00241 /******************************************************************************/ 00242 virtual bool MQUALIFIER calcPointAtX(const Float& x, IVector3D& rVecPoint) const = 0; 00243 00244 /******************************************************************************/ 00252 /******************************************************************************/ 00253 virtual bool MQUALIFIER calcPointAtY(const Float& y, IVector3D& rVecPoint) const = 0; 00254 00255 /******************************************************************************/ 00263 /******************************************************************************/ 00264 virtual bool MQUALIFIER calcPointAtZ(const Float& z, IVector3D& rVecPoint) const = 0; 00265 00266 /******************************************************************************/ 00278 /******************************************************************************/ 00279 virtual bool MQUALIFIER calcShortestConnection(const IStraightLine3D& rStraightLine3D, 00280 IVector3D& rVecPointOnThisStraightLine3D, 00281 IVector3D& rVecPointOnGivenStraightLine3D) const = 0; 00282 }; 00283 00284 END_NAMESPACE_Zeus 00285 00286 00287 #endif 00288