00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Math Library 00005 * Module : IVector3D 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 IVector3DHPP 00033 #define IVector3DHPP 00034 00035 #include <zeusmath/System/Interfaces/IAngle.hpp> 00036 #include <zeusmath/System/Interfaces/IVector.hpp> 00037 00038 00039 BEGIN_NAMESPACE_Zeus 00040 00041 00042 /******************************************************************************/ 00046 /******************************************************************************/ 00047 class IVector3D : public IVector 00048 { 00049 HIDE_ASSIGNMENT_OPERATOR(IVector3D) 00050 00051 public: 00052 /*************************************************************************/ 00058 /*************************************************************************/ 00059 virtual void MQUALIFIER assign3D(const IVector3D& rVector) = 0; 00060 00061 /*************************************************************************/ 00070 /*************************************************************************/ 00071 virtual bool MQUALIFIER isParallel(const IVector3D& rVector) const = 0; 00072 00073 /*************************************************************************/ 00082 /*************************************************************************/ 00083 virtual bool MQUALIFIER isCollinear(const IVector3D& rVector) const = 0; 00084 00085 /**************************************************************************/ 00091 /**************************************************************************/ 00092 virtual bool MQUALIFIER isZeroVector() const = 0; 00093 00094 /**************************************************************************/ 00100 /**************************************************************************/ 00101 virtual bool MQUALIFIER isUnitVectorX() const = 0; 00102 00103 /**************************************************************************/ 00109 /**************************************************************************/ 00110 virtual bool MQUALIFIER isUnitVectorY() const = 0; 00111 00112 /**************************************************************************/ 00118 /**************************************************************************/ 00119 virtual bool MQUALIFIER isUnitVectorZ() const = 0; 00120 00121 /**************************************************************************/ 00126 /**************************************************************************/ 00127 virtual const Float& MQUALIFIER getX() const = 0; 00128 00129 /**************************************************************************/ 00134 /**************************************************************************/ 00135 virtual const Float& MQUALIFIER getY() const = 0; 00136 00137 /**************************************************************************/ 00142 /**************************************************************************/ 00143 virtual const Float& MQUALIFIER getZ() const = 0; 00144 00145 /**************************************************************************/ 00150 /**************************************************************************/ 00151 virtual void MQUALIFIER setX(const Float& fX) = 0; 00152 00153 /**************************************************************************/ 00158 /**************************************************************************/ 00159 virtual void MQUALIFIER setY(const Float& fY) = 0; 00160 00161 /**************************************************************************/ 00166 /**************************************************************************/ 00167 virtual void MQUALIFIER setZ(const Float& fZ) = 0; 00168 00169 /**************************************************************************/ 00178 /**************************************************************************/ 00179 virtual void MQUALIFIER setValues(Float fX, Float fY, Float fZ) = 0; 00180 00181 // Initialization methods. 00182 /**************************************************************************/ 00185 /**************************************************************************/ 00186 virtual void MQUALIFIER initAsZeroVector() = 0; 00187 00188 /**************************************************************************/ 00191 /**************************************************************************/ 00192 virtual void MQUALIFIER initAsUnitVectorX() = 0; 00193 00194 /**************************************************************************/ 00197 /**************************************************************************/ 00198 virtual void MQUALIFIER initAsUnitVectorY() = 0; 00199 00200 /**************************************************************************/ 00203 /**************************************************************************/ 00204 virtual void MQUALIFIER initAsUnitVectorZ() = 0; 00205 00206 // Operator methods. 00207 /**************************************************************************/ 00213 /**************************************************************************/ 00214 virtual void MQUALIFIER calcVectorProduct(const IVector3D& rVector, 00215 IVector3D& rProduct) const = 0; 00216 00217 /**************************************************************************/ 00223 /***************************************************************************/ 00224 virtual void MQUALIFIER calcAngleTo(const IVector3D& rVector, 00225 IAngle& rAngle) const = 0; 00226 00227 /**************************************************************************/ 00234 /**************************************************************************/ 00235 virtual Float MQUALIFIER calcDistanceTo(const IVector3D& rVector) const = 0; 00236 00237 /**************************************************************************/ 00240 /**************************************************************************/ 00241 virtual void MQUALIFIER normalize() = 0; 00242 00244 /**************************************************************************/ 00251 /**************************************************************************/ 00252 virtual void MQUALIFIER getHorizontalAngle(IAngle& rAngle) const = 0; 00253 00254 /**************************************************************************/ 00261 /**************************************************************************/ 00262 virtual void MQUALIFIER getVerticalAngle(IAngle& rAngle) const = 0; 00263 00264 /**************************************************************************/ 00269 /**************************************************************************/ 00270 virtual void MQUALIFIER setHorizontalAngle(const IAngle& rAngle) = 0; 00271 00272 /**************************************************************************/ 00277 /**************************************************************************/ 00278 virtual void MQUALIFIER setVerticalAngle(const IAngle& rAngle) = 0; 00279 00280 // Rotations. 00281 /**************************************************************************/ 00286 /**************************************************************************/ 00287 virtual void MQUALIFIER rotateX(const IAngle& rAngle) = 0; 00288 00289 /**************************************************************************/ 00294 /**************************************************************************/ 00295 virtual void MQUALIFIER rotateY(const IAngle& rAngle) = 0; 00296 00297 /**************************************************************************/ 00302 /**************************************************************************/ 00303 virtual void MQUALIFIER rotateZ(const IAngle& rAngle) = 0; 00304 00305 /**************************************************************************/ 00310 /**************************************************************************/ 00311 virtual void MQUALIFIER rotateHorizontalAngle(const IAngle& rAngle) = 0; 00312 00313 /**************************************************************************/ 00318 /**************************************************************************/ 00319 virtual void MQUALIFIER rotateVerticalAngle(const IAngle& rAngle) = 0; 00320 00321 /**************************************************************************/ 00323 /**************************************************************************/ 00324 virtual void MQUALIFIER mirrorAtXYPlane() = 0; 00325 00326 /**************************************************************************/ 00328 /**************************************************************************/ 00329 virtual void MQUALIFIER mirrorAtXZPlane() = 0; 00330 00331 /**************************************************************************/ 00333 /**************************************************************************/ 00334 virtual void MQUALIFIER mirrorAtYZPlane() = 0; 00335 }; 00336 00337 00338 END_NAMESPACE_Zeus 00339 00340 #endif 00341