1 |
|
5 |
//------------------------------------------------------------
|
2 |
|
|
//------------------------------------------------------------
|
3 |
|
|
// MAGiC
|
4 |
|
|
// Jean Christophe Cuillière et Vincent FRANCOIS
|
5 |
|
|
// Département de Génie Mécanique - UQTR
|
6 |
|
|
//------------------------------------------------------------
|
7 |
|
|
// Le projet MAGIC est un projet de recherche du département
|
8 |
|
|
// de génie mécanique de l'Université du Québec à
|
9 |
|
|
// Trois Rivières
|
10 |
|
|
// Les librairies ne peuvent être utilisées sans l'accord
|
11 |
|
|
// des auteurs (contact : francois@uqtr.ca)
|
12 |
|
|
//------------------------------------------------------------
|
13 |
|
|
//------------------------------------------------------------
|
14 |
|
|
//
|
15 |
|
|
// ct_point.cpp
|
16 |
|
|
//
|
17 |
|
|
//------------------------------------------------------------
|
18 |
|
|
//------------------------------------------------------------
|
19 |
|
|
// COPYRIGHT 2000
|
20 |
|
|
// Version du 02/03/2006 à 11H21
|
21 |
|
|
//------------------------------------------------------------
|
22 |
|
|
//------------------------------------------------------------
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
#include "gestionversion.h"
|
26 |
|
|
|
27 |
|
|
#pragma hdrstop
|
28 |
|
|
|
29 |
|
|
#include "ct_point.h"
|
30 |
|
|
#include "ot_boite_3D.h"
|
31 |
|
|
|
32 |
|
|
//---------------------------------------------------------------------------
|
33 |
|
|
template <int N> unsigned long CT_POINT<N>::idmax=0; //definir ds CT_POINT la var idmax
|
34 |
|
|
|
35 |
|
|
template <int N> CT_POINT<N>::CT_POINT(double x,double y,double z,DOUBLEN<N> en,BOITE_3D boitetmp):boite(boitetmp)
|
36 |
|
|
{
|
37 |
|
|
point[0]=x;
|
38 |
|
|
point[1]=y;
|
39 |
|
|
point[2]=z;
|
40 |
|
|
ecart=en;
|
41 |
|
|
id=idmax;
|
42 |
|
|
idmax++;
|
43 |
|
|
}
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
template <int N> CT_POINT<N>::~CT_POINT()
|
47 |
|
|
{
|
48 |
|
|
}
|
49 |
|
|
|
50 |
|
|
template <int N> void CT_POINT<N>::evaluer(double *xyz)
|
51 |
|
|
{
|
52 |
|
|
xyz[0]=point[0];
|
53 |
|
|
xyz[1]=point[1];
|
54 |
|
|
xyz[2]=point[2];
|
55 |
|
|
}
|
56 |
|
|
|
57 |
|
|
template <int N> unsigned long CT_POINT<N>::get_id()
|
58 |
|
|
{
|
59 |
|
|
return id;
|
60 |
|
|
}
|
61 |
|
|
|
62 |
|
|
template <int N> DOUBLEN<N> &CT_POINT<N>::get_valeur(void)
|
63 |
|
|
{
|
64 |
|
|
return ecart;
|
65 |
|
|
}
|
66 |
|
|
|
67 |
|
|
template <int N> BOITE_3D CT_POINT<N>::get_boite_3D(void)
|
68 |
|
|
{
|
69 |
|
|
return boite;
|
70 |
|
|
}
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
#ifdef BORLANDCPP
|
75 |
|
|
template class __export CT_POINT<1>;
|
76 |
|
|
template class __export CT_POINT<4>;
|
77 |
|
|
#else
|
78 |
|
|
template class CT_POINT<1>;
|
79 |
|
|
template class CT_POINT<4>;
|
80 |
|
|
#endif
|
81 |
|
|
|
82 |
|
|
|