Rev | Line | |
---|
[658] | 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&);
|
---|
| 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.