ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/polyexemple/src/main3.cpp
Revision: 416
Committed: Wed Aug 21 15:24:24 2013 UTC (11 years, 8 months ago) by cuillier
File size: 787 byte(s)
Log Message:
Import initial

File Contents

# User Rev Content
1 cuillier 416 #include "line.h"
2     #include "segment.h"
3     #include <iostream>
4    
5     int main(void)
6     {
7     double point[3]={5.,5.,5.};
8     double dir[3]={0.,1.,0};
9     LINE l1(point,dir);
10     double xyz[3];
11     l1.evaluer(-1.,xyz);
12     std::cout << xyz[0] << " " << xyz[1] << " " << xyz[2] << " " << std::endl;
13    
14     double xyz2[3];
15     SEGMENT s1(point,dir,0.,3.);
16    
17     s1.evaluer(-1.,xyz2);
18     std::cout << xyz2[0] << " " << xyz2[1] << " " << xyz2[2] << " " << std::endl;
19    
20     s1.evaluer(2.5,xyz2);
21     std::cout << xyz2[0] << " " << xyz2[1] << " " << xyz2[2] << " " << std::endl;
22    
23     SEGMENT* s=&s1;
24     double xyz3[3];
25     s->evaluer(-1,xyz3);
26     std::cout << xyz3[0] << " " << xyz3[1] << " " << xyz3[2] << " " << std::endl;
27    
28     LINE* l=&s1;
29     l->evaluer(-1,xyz3);
30     std::cout << xyz3[0] << " " << xyz3[1] << " " << xyz3[2] << " " << std::endl;
31     }

Properties

Name Value
svn:executable