Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

idpoint.h

Go to the documentation of this file.
00001 /************************************************************************* 00002 * $Id: idpoint.h,v 1.1 2005/09/09 08:22:37 bellet Exp $ 00003 ************************************************************************** 00004 This software is governed by the CeCILL license under French law and 00005 abiding by the rules of distribution of free software. You can use, 00006 modify and/ or redistribute the software under the terms of the CeCILL 00007 license as circulated by CEA, CNRS and INRIA at the following URL 00008 "http://www.cecill.info". 00009 00010 As a counterpart to the access to the source code and rights to copy, 00011 modify and redistribute granted by the license, users are provided only 00012 with a limited warranty and the software's author, the holder of the 00013 economic rights, and the successive licensors have only limited 00014 liability. 00015 00016 In this respect, the user's attention is drawn to the risks associated 00017 with loading, using, modifying and/or developing or reproducing the 00018 software by the user in light of its specific status of free software, 00019 that may mean that it is complicated to manipulate, and that also 00020 therefore means that it is reserved for developers and experienced 00021 professionals having in-depth computer knowledge. Users are therefore 00022 encouraged to load and test the software's suitability as regards their 00023 requirements in conditions enabling the security of their systems and/or 00024 data to be ensured and, more generally, to use and operate it in the 00025 same conditions as regards security. 00026 00027 The fact that you are presently reading this means that you have had 00028 knowledge of the CeCILL license and that you accept its terms. 00029 00030 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 00031 l'Image). All rights reserved. See License.txt for details. 00032 00033 Version 1.0 05/09/2005 00034 *************************************************************************/ 00035 00036 /************************************************************************* 00037 * 00038 * Description : Declarations permettant d'utiliser le type IDPOINT 00039 * de la bibliotheque LIBIDO 00040 * 00041 **************************************************************************/ 00042 #ifndef __IDPOINT_H__ 00043 #define __IDPOINT_H__ 00044 00045 #include "idgen.h" 00046 00047 /* Types de point 3D */ 00048 00049 #define PNT_FLOAT (PNT | TY_FLOAT) 00050 00051 /* structure IDPOINT */ 00052 typedef struct __IdPoint__{ 00053 int Number; 00054 float X,Y,Z; 00055 int NbDatas; 00056 float *Datas; /* pointeur vers tableau de donnees 00057 (user specific)*/ 00058 } IDPOINT; 00059 00060 typedef IDPOINT *PIDPOINT; 00061 00062 /************************************************************************/ 00063 00064 /* prototypes des fonctions POINT */ 00065 00066 PIDPOINT IdPntAlloc (int); /* nb float pour data */ 00067 PIDPOINT IdPntRemplit (PIDPOINT,double,double,double,int); 00068 PIDPOINT *IdPntTabAlloc (int,int); 00069 void IdPntCopy (PIDPOINT,PIDPOINT); 00070 00071 #ifndef SWIG 00072 #define IdPntFree(pi) _IdPntFree((PIDPOINT *)&(pi) ) 00073 #define IdPntGetDataLength(pi) (pi)->NbDatas 00074 #define IdPntGetData(pi) (pi)->Datas 00075 #define IdPntTabFree(pp,nbp,libere) _IdPntTabFree ((PIDPOINT **)&(pp),(nbp),(libere) ) 00076 00077 /* Bazar Laurent Belatrech */ 00078 00079 #define IdPntX(p) (p).X 00080 #define IdPntY(p) (p).Y 00081 #define IdPntZ(p) (p).Z 00082 #define IdPntSamePnt(p1,p2) ( IdPntX(p1)==IdPntX(p2) \ 00083 && IdPntY(p1)==IdPntY(p2) \ 00084 && IdPntZ(p1)==IdPntZ(p2) ) 00085 #elif 00086 00087 void IdPntFree(PIDPOINT); 00088 int IdPntGetDataLength(PIDPOINT); 00089 float * IdPntGetData(PIDPOINT); 00090 void IdPntTabFree(PIDPOINT*, int,int); 00091 float IdPntX(IDPOINT); 00092 float IdPntY(IDPOINT); 00093 float IdPntZ(IDPOINT); 00094 int IdPntSamePnt(IDPOINT,IDPOINT); 00095 #endif 00096 00097 /************************************************************************/ 00098 00099 /* Fonctions internes */ 00100 00101 00102 00103 /************************************************************************/ 00104 00105 /* FUNCTION DESCRIPTION ************************************************** 00106 00107 IdPntGetDataLength (macro) 00108 00109 RESUME: Renvoie le nombre d'elements du vecteur de Donnees associe a 1 IDPOINT 00110 00111 DESCRIPTION: Renvoie le nombre d'elements du vecteur de Donnees associe a 1 IDPOINT 00112 00113 SYNTAXE: int nb_float = IdPntGetDataLength(PIDPOINT p1); 00114 00115 RETOUR: nom : nb_float 00116 type : int 00117 role : nombre de donnees utilisateur(en float) allouees 00118 cf structure point dans idpoint.h 00119 PARAMETRES: 00120 type : PIDPOINT 00121 role : pointeur sur le point alloue 00122 00123 FICHIER: idpoint.h 00124 00125 ******************************************************** END DESCRIPTION */ 00126 00127 /* FUNCTION DESCRIPTION ************************************************** 00128 00129 IdPntGetData (macro) 00130 00131 RESUME: Renvoie le vecteur de Donnees associe a 1 IDPOINT 00132 00133 DESCRIPTION: Renvoie le vecteur de Donnees associe a 1 IDPOINT 00134 00135 SYNTAXE: float Datas[] = IdPntGetData(PIDPOINT p1); 00136 00137 RETOUR: nom : Datas 00138 type : float [] 00139 role : tableau de donnees utilisateur(en float) allouees 00140 cf structure point dans idpoint.h 00141 PARAMETRES: 00142 type : PIDPOINT 00143 role : pointeur sur le point alloue 00144 00145 FICHIER: idpoint.h 00146 00147 ******************************************************** END DESCRIPTION */ 00148 00149 00150 #endif 00151

Generated on Wed Oct 19 09:28:33 2005 for SIMRI3D by doxygen 1.3.7