ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/acismesh/m3d_insere_cas.cpp
Revision: 1
Committed: Mon Jun 11 22:53:07 2007 UTC (17 years, 11 months ago)
File size: 2160 byte(s)
Log Message:

File Contents

# Content
1 /*****************************************************************
2
3 m3d_insere_cas.cpp Type:Func
4
5 Insertion d un nouveau cas de front
6
7 Date de creation : 10-3-1999 15 :29 :35
8 Derniere version : 10-3-1999 15 :29 :35
9
10 Vincent FRANCOIS
11
12 *****************************************************************/
13
14
15
16
17 /**************************/
18 /* include */
19 #include <stdio.h>
20 #include <string.h>
21 #include <stdlib.h>
22 #include <math.h>
23 #include "const.h"
24 #include "memoire.h"
25 #include "struct.h"
26 #include "struct3d.h"
27 #include "prototype.h"
28
29
30 /**************************/
31 /* variables globales */
32 extern struct environnment env;
33 extern struct s_mesh *mesh;
34
35
36
37 /**************************/
38 /* programme principal */
39
40 void m3d_insere_cas(int type,int num_no,int numero,float angle,int *nb_cas,struct cas_front *cas)
41 {
42 int i;
43 int nouveau;
44
45 //if (angle>PI) return;
46 nouveau=(-1);
47 for (i=0;i<*nb_cas;i++)
48 if (cas[i].num==num_no) nouveau=i ;
49
50 if (nouveau==(-1))
51 {
52 cas[*nb_cas].type=type;
53 cas[*nb_cas].num=num_no;
54 cas[*nb_cas].degre=1;
55 cas[*nb_cas].liaison[0]=0;
56 cas[*nb_cas].liaison[1]=0;
57 cas[*nb_cas].liaison[2]=0;
58 cas[*nb_cas].angle[0]=0.;
59 cas[*nb_cas].angle[1]=0.;
60 cas[*nb_cas].angle[2]=0.;
61 cas[*nb_cas].traite=PASTRAITE;
62 cas[*nb_cas].liaison[numero]=1;
63 cas[*nb_cas].angle[numero]=angle;
64 *nb_cas=*nb_cas+1;
65 }
66 else
67 if (!((cas[nouveau].type==ADJACENT) && (type==LIE)))
68 {
69 cas[nouveau].degre=cas[nouveau].degre+1;
70 cas[nouveau].liaison[numero]=1;
71 cas[nouveau].angle[numero]=angle;
72 }
73 }