X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Fkernel%2FPlanesOperations.h;h=de99319dec239683dc01e3e0d73d2b528303e156;hb=3d1c0689f4e1844c8f170d9c20f8ad38b34d98b6;hp=bc5ce63bc321de49566b46908384be1dfc61f55e;hpb=e42ecf415793e6f85e5de98b41385fe53b6d00e0;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/kernel/PlanesOperations.h b/lib/maracasVisuLib/src/kernel/PlanesOperations.h index bc5ce63..de99319 100644 --- a/lib/maracasVisuLib/src/kernel/PlanesOperations.h +++ b/lib/maracasVisuLib/src/kernel/PlanesOperations.h @@ -1,9 +1,37 @@ +/*# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Sant�) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ */ + #ifndef PlanesOperations_H_ #define PlanesOperations_H_ #include #include +#include + +using namespace std; class PlanesOperations { @@ -13,11 +41,49 @@ public: - double* getCrossProduct(double* vect0,double* vect1); - double getPodoubleProduct(double* vect0,double* vect1); + double* getCrossProduct(double* vect0,double* vect1); + double getDotProduct(double* vect0,double* vect1); double* getNormal(double* vect); double getMagnitud(double* vect); - double* makeVector(double podouble0[3], double podouble1[3]); + double* makeVector(double *podouble0, double* podouble1); + + void getCrossProduct(double* vect0,double* vect1, double* vectres); + void getNormal(double* vect, double* vectnorm); + void makeVector(double* podouble0, double* podouble1, double* vectres); + /** + * Adds to vectors, the result is in vectres; + *@param double* vect0, the first vector + *@param double* vect1, the second vector + *@param double* vectres, the resulting vector + */ + void addVectors(double* vect0, double* vect1, double*vectres); + /** + * multiply a vector with a given scalar + *@param double* vect0, the vector + *@param double scalar, the scalar value + *@param double* vectres, the resulting vector + */ + void scalarVector(double* vect0, double scalar, double*vectres); + + vector getCrossProduct(vector vect0,vector vect1); + double getDotProduct(vector vect0,vector vect1); + vector getNormal(vector vect); + double getMagnitud(vector vect); + vector makeVector(vector podouble0, vector podouble1); + /** + * Adds to vectors, the result is in vectres; + *@param double* vect0, the first vector + *@param double* vect1, the second vector + *@param double* vectres, the resulting vector + */ + vector addVectors(vector vect0, vector vect1); + /** + * multiply a vector with a given scalar + *@param double* vect0, the vector + *@param double scalar, the scalar value + *@param double* vectres, the resulting vector + */ + vector scalarVector(vector vect0, double scalar); };