1 |
|
5 |
#include <stdio.h>
|
2 |
|
|
#include "m3d_struct.h"
|
3 |
|
|
#include "m3d_const.h"
|
4 |
|
|
#include "m3d_hotes.h"
|
5 |
|
|
#include "m3d_macro.h"
|
6 |
|
|
#include "prototype.h"
|
7 |
|
|
extern GEST_MEM *gest ;
|
8 |
|
|
extern int debug ;
|
9 |
|
|
extern float eps3 ;
|
10 |
|
|
extern float tab_vn[5][3] ;
|
11 |
|
|
int m3d_intetra(float *coord,int inp1,int inp2,int inp)
|
12 |
|
|
{
|
13 |
|
|
float vec1[3], p1, p2, p3, p4 ;
|
14 |
|
|
|
15 |
|
|
VECTEUR(vec1,(coord+inp1),(coord+inp))
|
16 |
|
|
if (PROSCA(vec1,(tab_vn[0])) > eps3) return(FAUX) ;
|
17 |
|
|
if (PROSCA(vec1,(tab_vn[1])) > eps3) return(FAUX) ;
|
18 |
|
|
if (PROSCA(vec1,(tab_vn[3])) > eps3) return(FAUX) ;
|
19 |
|
|
VECTEUR(vec1,(coord+inp2),(coord+inp))
|
20 |
|
|
if (PROSCA(vec1,(tab_vn[2])) > eps3) return(FAUX) ;
|
21 |
|
|
return(VRAI) ;
|
22 |
|
|
}
|