1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
| #ifndef Def_Repere
#define Def_Repere
#include<math.h>
class Cylin;
class Spher;
class Carth //coordonnées carthésiennes
{
double X;
double Y;
double Z;
public:
Carth(double x=0,double y=0,double z=0)//entree des coordonées
{
X=x;
Y=y;
Z=z;
}
Carth(Carth &point)//copie d'un autre point
{
X=point.X;
Y=point.Y;
Z=point.Z;
}
Carth(Cylin &point);//convertion cylindriques->carthesiennes
Carth(Spher &point);//convertion spheriques->carthesiennes
friend Cylin::Cylin(Carth &point);
friend Spher::Spher(Carth &point);
double GetCoord(int num=1);
};
class Cylin //coordonnées cylindriques
{
double r;
double Theta;
double Z;
public:
Cylin(double R=0,double theta=0,double z=0)//entree des coordonées
{
r=R;
Theta=theta;
Z=z;
}
Cylin(Cylin &point)//copie d'un autre point
{
r=point.r;
Theta=point.Theta;
Z=point.Z;
}
Cylin(Carth &point);//convertion carthesiennes->cylindriques
Cylin(Spher &point);//convertion spheriques->cylindriques
friend Carth::Carth(Cylin &point);
friend Spher::Spher(Cylin &point);
double GetCoord(int num=1);
};
class Spher //coordonnées sphériques
{
double r;
double Theta;
double Phi;
public:
Spher(double R=0,double theta=0,double phi=0)//entree des coordonées
{
r=R;
Theta=theta;
Phi=phi;
}
Spher(Spher &point)//copie d'un autre point
{
r=point.r;
Theta=point.Theta;
Phi=point.Phi;
}
Spher(Carth &point);//convertion carthesiennes->Spheriques
Spher(Cylin &point);//convertion carthesiennes->Spheriques
friend Carth::Carth(Spher &point);
friend Cylin::Cylin(Spher &point;
double GetCoord(int num=1);
};
#endif |
Partager