Last change
on this file since 3866 was 3866, checked in by ansari, 15 years ago |
Ajout destructeur virtuel Vector3d,UnitVector, Reza 12/08/2010
|
File size:
1.1 KB
|
Rev | Line | |
---|
[1371] | 1 | // 3-D Geometry
|
---|
| 2 | // B. Revenu, G. Le Meur 2000
|
---|
| 3 | // DAPNIA/SPP (Saclay) / CEA LAL - IN2P3/CNRS (Orsay)
|
---|
| 4 |
|
---|
[764] | 5 | #ifndef UNITVECTOR_H_SEEN
|
---|
| 6 | #define UNITVECTOR_H_SEEN
|
---|
| 7 |
|
---|
[2322] | 8 | #include <iostream>
|
---|
[764] | 9 | #include <stdio.h>
|
---|
| 10 | #include <string.h>
|
---|
| 11 | #include "vector3d.h"
|
---|
| 12 |
|
---|
[1371] | 13 | namespace SOPHYA {
|
---|
| 14 |
|
---|
[764] | 15 | class UnitVector : public Vector3d
|
---|
| 16 | {
|
---|
| 17 |
|
---|
| 18 | public:
|
---|
| 19 |
|
---|
| 20 | UnitVector();
|
---|
| 21 | UnitVector(double x, double y, double z);
|
---|
| 22 | UnitVector(double theta, double phi=0);
|
---|
| 23 | UnitVector(const Vector3d&);
|
---|
| 24 |
|
---|
[3866] | 25 | virtual ~UnitVector() { }
|
---|
| 26 |
|
---|
[764] | 27 | /*virtual*/ Vector3d& operator=(const Vector3d&); //$CHECK$ EA 101299 operator = non virtual
|
---|
| 28 | virtual Vector3d& operator+=(const Vector3d&);
|
---|
| 29 | virtual Vector3d& operator-=(const Vector3d&);
|
---|
| 30 | virtual Vector3d operator+(const Vector3d&) const;
|
---|
| 31 | virtual Vector3d operator-(const Vector3d&) const;
|
---|
| 32 |
|
---|
| 33 | virtual Vector3d& operator+=(double d) { return Vector3d::operator+= (d); }
|
---|
| 34 | virtual Vector3d operator+(double d) const { return Vector3d::operator+ (d); }
|
---|
| 35 | virtual Vector3d operator-(double d) const { return Vector3d::operator- (d); }
|
---|
| 36 |
|
---|
| 37 | void Print(ostream& os) const;
|
---|
| 38 |
|
---|
| 39 | };
|
---|
| 40 |
|
---|
[1371] | 41 | } // namespace SOPHYA
|
---|
| 42 |
|
---|
[764] | 43 | #endif
|
---|
| 44 |
|
---|
| 45 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.