1 |
/*****************************************************************
|
2 |
|
3 |
eval_face.cpp Type:Inc
|
4 |
|
5 |
Calcul des caracteristiques d une face
|
6 |
|
7 |
Date de creation : 17-2-1999 9 :57 :42
|
8 |
Derniere version : 17-2-1999 9 :57 :42
|
9 |
|
10 |
Vincent FRANCOIS
|
11 |
|
12 |
*****************************************************************/
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
/**************************/
|
19 |
/* include */
|
20 |
#include <stdio.h>
|
21 |
#include <string.h>
|
22 |
#include <math.h>
|
23 |
#include "const.h"
|
24 |
#include "memoire.h"
|
25 |
#include "struct.h"
|
26 |
#include "prototype.h"
|
27 |
|
28 |
/**************************/
|
29 |
/* variables globales */
|
30 |
extern struct s_acis *acis;
|
31 |
extern struct environnment env;
|
32 |
extern struct s_mesh *mesh;
|
33 |
|
34 |
|
35 |
|
36 |
/**************************/
|
37 |
/* programme principal */
|
38 |
|
39 |
float eval_face(struct s_face *face,float *u,float *v,int type,float *x,float *y,float *z,float du,float dv)
|
40 |
{
|
41 |
struct s_plane *plane;
|
42 |
struct s_cone *cone;
|
43 |
float res;
|
44 |
|
45 |
plane=NULL;
|
46 |
cone=NULL;
|
47 |
if (strcmp(acis->type_entite[face->surface],"plane-surface")==0)
|
48 |
plane=(struct s_plane *)acis->entity[face->surface];
|
49 |
if (strcmp(acis->type_entite[face->surface],"cone-surface")==0)
|
50 |
cone=(struct s_cone *)acis->entity[face->surface];
|
51 |
|
52 |
if (plane!=NULL) res=eval_plane(face,plane->param,u,v,type,x,y,z);
|
53 |
if (cone!=NULL) res=eval_cone(face,cone->param,u,v,type,x,y,z,du);
|
54 |
|
55 |
return(res);
|
56 |
}
|