00001 /* 00002 * lib-gmapkernel : Un noyau de 3-G-cartes et des opérations. 00003 * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC 00004 * http://www.sic.sp2mi.univ-poitiers.fr/ 00005 * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS, 00006 * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/ 00007 * 00008 * This file is part of lib-gmapkernel 00009 * 00010 * This program is free software: you can redistribute it and/or modify 00011 * it under the terms of the GNU Lesser General Public License as published by 00012 * the Free Software Foundation, either version 3 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public License 00021 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 00024 //****************************************************************************** 00025 #ifndef VECTOR_HH 00026 #define VECTOR_HH 00027 //****************************************************************************** 00028 #include "math-extension.hh" 00029 #include "inline-macro.hh" 00030 00031 #include <iostream> 00032 //****************************************************************************** 00033 class CTransformationMatrix; 00034 00040 class CVector 00041 { 00042 private: 00043 TCoordinate* FElements; 00044 00045 public: 00046 // @name Constantes 00047 // @{ 00048 00052 typedef enum { NullVector, AnyVector } TVectorType; 00053 00054 // @} 00055 00056 // @name Constructeurs et destructeur 00057 // @{ 00058 00066 CVector(TVectorType AType = AnyVector); 00067 00076 CVector(const CVector& AVector); 00077 00086 CVector(TCoordinate A0, TCoordinate A1, TCoordinate A2, TCoordinate A3); 00087 00091 ~CVector(); 00092 00093 // @} 00094 // @name Initialisations 00095 // @{ 00096 00100 void setToNull(); 00101 00106 CVector& operator=(const CVector& AVector); 00107 00108 // @} 00109 // @name Accesseur aux éléments du vecteur 00110 // @{ 00111 00119 TCoordinate& operator[](int AIndex) const; 00120 00121 // @} 00122 // @name Produit de matrices 00123 // @{ 00124 00133 CVector operator*(const CTransformationMatrix& AMatrix) const; 00134 00143 TCoordinate operator*(const CVector& AVector) const; 00144 00145 // @} 00146 }; 00147 00148 // @name Affichage 00149 // @{ 00150 00156 std::ostream& operator<<(std::ostream& AStream, const CVector& AVector); 00157 00158 // @} 00159 //****************************************************************************** 00160 #include INCLUDE_INLINE("vector.icc") 00161 //****************************************************************************** 00162 #endif // VECTOR_HH 00163 //******************************************************************************