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

File Contents

# Content
1 /*****************************************************************
2
3 eval_dis_point_edge.cpp Type:Func
4
5 Calcul la distance d'un point de l'espace a un point d'une entite
6
7 Date de creation : 2-2-1999 10 :11 :13
8 Derniere version : 2-2-1999 10 :11 :13
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 "struct.h"
24 #include "const.h"
25 #include "prototype.h"
26
27 /**************************/
28 /* variables globales */
29 extern struct s_acis *acis;
30
31
32
33 /**************************/
34 /* programme principal */
35
36 float eval_dis_point_edge(struct s_edge *edge,float *x,float t,int type)
37 {
38 float res;
39 float xx[4];
40
41
42
43 if (type==FONCTION)
44 {
45 eval_edge(edge,t,FONCTION,xx);
46 res=(x[0]-xx[0])*(x[0]-xx[0])+(x[1]-xx[1])*(x[1]-xx[1])+(x[2]-xx[2])*(x[2]-xx[2]);
47 }
48 return(res);
49 }