00001 /************************************************************************* 00002 * $Id: idface.h,v 1.1 2005/09/09 08:22:29 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 FAC 00039 * de la bibliotheque LIBIDO 00040 * 00041 **************************************************************************/ 00042 #ifndef __IDFACE_H__ 00043 #define __IDFACE_H__ 00044 00045 #include "idgen.h" 00046 #include "idpoint.h" 00047 00048 /* Types de face 3d */ 00049 00050 #define FAC_FLOAT (FAC | TY_FLOAT) 00051 00052 /* structure FACE */ 00053 00054 typedef struct { 00055 int Number; 00056 IDPOINT *P1,*P2,*P3,*P4; /* deviendront des numero sur disque */ 00057 float NormX,NormY,NormZ; /* normale */ 00058 int NbDatas; 00059 float *Datas;/* pointeur vers des donnees texturales 00060 (user specific)*/ 00061 } FACE, *PFACE; 00062 00063 /***********************************************************************/ 00064 #include "idface-restricted.h" 00065 /* prototypes de fonctions */ 00066 00067 FACE *IdFacAddPnt (FACE *, IDPOINT *); 00068 00069 00070 #define IdFacFree(f) _IdFacFree((PFACE*)&(f)) 00071 #define IdFacTabFree(f,n,l) _IdFacTabFree((PFACE*)&(f),(n),(l)) 00072 00073 /* 00074 * #define IdFacSameFaces(f1,f2) ( (f1).P1==(f2).P1 \ 00075 * && (f1).P2==(f2).P2 \ 00076 * && (f1).P3==(f2).P3 ) 00077 */ 00078 00079 /* JPR */ 00080 00081 #define IdFacSameFaces(f1,f2) ( (f1)->P1==(f2)->P1 \ 00082 && (f1)->P2==(f2)->P2 \ 00083 && (f1)->P3==(f2)->P3 ) 00084 00085 #define IdFacPntIn(f,p) ( (PIDPOINT)(f)->P1==(p) \ 00086 || (PIDPOINT)(f)->P2==(p) \ 00087 || (PIDPOINT)(f)->P3==(p) ) 00088 00089 #ifdef SWIG 00090 void IdFacFree (PFACE); 00091 void IdFacTabFree (PFACE *, int, int); 00092 int IdFacSameFaces (PFACE,PFACE); 00093 int IdFacPntIn (PFACE,PIDPOINT); 00094 #endif 00095 00096 PFACE IdFacAlloc (int); /*nb datas*/ 00097 PFACE * IdFacTabAlloc (int,int); 00098 00099 00100 /************************************************************************/ 00101 00102 /* Fonctions internes */ 00103 00104 00105 00106 /************************************************************************/ 00107 00108 00109 #endif 00110 00111 00112