ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/diamesh/src/r3d_killnoe.cpp
Revision: 283
Committed: Tue Sep 13 21:11:20 2011 UTC (13 years, 8 months ago) by francois
File size: 1558 byte(s)
Log Message:
structure de l'écriture

File Contents

# User Rev Content
1 francois 283 #include <stdio.h>
2     #include "r3d_struct.h"
3     #include "m3d_const.h"
4     #include "m3d_hotes.h"
5     #include "prototype2.h"
6     extern int debug ;
7     /* destruction de tetraedres connectes a un noeud */
8     int r3d_killnoe(float *coord,int *numele,NOEUD *noe_p,FACE **tab_front)
9     {
10     /* declarations */
11     TETRAEDRE *tetra ;
12     CONNEC *connec ;
13    
14    
15     if (noe_p==NULL)
16     {
17     if (debug) printf("%s\n"," noeud nul R3D_KILLNOE ") ;
18     return(FAUX) ;
19     }
20    
21     connec = noe_p->tete;
22     if (connec ==NULL)
23     {
24     if (debug) printf("%s\n"," aucun tetra connecte R3D_KILLNOE ") ;
25     return(FAUX) ;
26     }
27     /* parcours de la liste et mise a jour */
28     while (connec!=NULL)
29     {
30     /* destruction du tetra, a moins qu'il ne soit deja detruit */
31     tetra = connec->tetra ;
32     if (tetra->mark!=KILLED)
33     if ( ((tetra->face1)->n1 == noe_p) || ((tetra->face1)->n2 == noe_p) ||
34     ((tetra->face1)->n3 == noe_p) || ((tetra->face2)->n1 == noe_p) ||
35     ((tetra->face2)->n2 == noe_p) || ((tetra->face2)->n3 == noe_p))
36     {
37     if (!r3d_d_tetra(tetra,tab_front))
38     {
39     if (debug) printf("%s\n"," Erreur r3d_d_tetra R3D_KILLNOE ") ;
40     return(FAUX) ;
41     }
42     }
43     connec = connec->suivant ;
44     }
45     /* aucun tetra connecte au noeud */
46     if (noe_p->mark2 != CARD_NULL)
47     {
48     if (debug) printf("%s\n"," Erreur cardinalite R3D_KILLNOE ") ;
49     }
50     /* noe_p->mark = KILLED ;*/
51     return(VRAI) ;
52     }