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

File Contents

# Content
1 /*****************************************************************
2
3 eval_straight.c Type:Func
4
5 Evaluation de straight
6
7 Date de creation : Thu Nov 28 16:12:27 1996
8
9 Derniere version : Tue Apr 22 11:44:34 1997
10
11
12
13 Vincent FRANCOIS
14
15 *****************************************************************/
16
17
18
19
20
21 /**************************/
22 /* include */
23 #include <stdio.h>
24 #include <string.h>
25 #include "const.h"
26 #include "struct.h"
27 #include "prototype.h"
28
29
30 /**************************/
31 /* variables globales */
32 extern struct s_param *para;
33
34
35
36 /**************************/
37 /* programme principal */
38
39 void eval_straight(struct s_par_straight *param,float t,int type,float *coord)
40 {
41
42 if (type==FONCTION)
43 {
44 coord[0]=param->root[0]+t*param->dir[0];
45 coord[1]=param->root[1]+t*param->dir[1];
46 coord[2]=param->root[2]+t*param->dir[2];
47 }
48 if (type==DERIVE)
49 {
50 coord[0]=param->dir[0];
51 coord[1]=param->dir[1];
52 coord[2]=param->dir[2];
53 }
54 if (type==DERIVE_SECONDE)
55 {
56 coord[0]=0.;
57 coord[1]=0.;
58 coord[2]=0.;
59 }
60 }