source:
Sophya/trunk/SophyaLib/SkyMap/unitvector.h@
1220
      
      | Last change on this file since 1220 was 764, checked in by , 26 years ago | |
|---|---|
| File size: 917 bytes | |
| Line | |
|---|---|
| 1 | #ifndef UNITVECTOR_H_SEEN | 
| 2 | #define UNITVECTOR_H_SEEN | 
| 3 | |
| 4 | #include <iostream.h> | 
| 5 | #include <stdio.h> | 
| 6 | #include <string.h> | 
| 7 | #include "vector3d.h" | 
| 8 | |
| 9 | class UnitVector : public Vector3d | 
| 10 | { | 
| 11 | |
| 12 | public: | 
| 13 | |
| 14 | UnitVector(); | 
| 15 | UnitVector(double x, double y, double z); | 
| 16 | UnitVector(double theta, double phi=0); | 
| 17 | UnitVector(const Vector3d&); | 
| 18 | |
| 19 | /*virtual*/ Vector3d& operator=(const Vector3d&); //$CHECK$ EA 101299 operator = non virtual | 
| 20 | virtual Vector3d& operator+=(const Vector3d&); | 
| 21 | virtual Vector3d& operator-=(const Vector3d&); | 
| 22 | virtual Vector3d operator+(const Vector3d&) const; | 
| 23 | virtual Vector3d operator-(const Vector3d&) const; | 
| 24 | |
| 25 | virtual Vector3d& operator+=(double d) { return Vector3d::operator+= (d); } | 
| 26 | virtual Vector3d operator+(double d) const { return Vector3d::operator+ (d); } | 
| 27 | virtual Vector3d operator-(double d) const { return Vector3d::operator- (d); } | 
| 28 | |
| 29 | void Print(ostream& os) const; | 
| 30 | |
| 31 | }; | 
| 32 | |
| 33 | #endif | 
| 34 | |
| 35 | 
  Note:
 See   TracBrowser
 for help on using the repository browser.
    ![(please configure the [header_logo] section in trac.ini)](/PI/chrome/site/your_project_logo.png)
