source: anuga_work/development/anugavis/src/vector.hh @ 5685

Last change on this file since 5685 was 5636, checked in by jack, 17 years ago

Almost ready to run.

File size: 561 bytes
Line 
1#ifndef VECTOR_HH
2#define VECTOR_HH
3
4class Vector{
5public:
6  Vector(void): x(0.0), y(0.0), z(0.0) {}
7  Vector(float x, float y, float z): x(x), y(y), z(z) {}
8  Vector &operator += (const Vector &other);
9  Vector operator + (const Vector &other) const;
10  Vector &operator -= (const Vector &other);
11  Vector operator - (const Vector &other) const;
12  Vector cross(const Vector &other) const;
13  float dot(const Vector &other) const;
14  float magnitude(void) const;
15  Vector scale(float amount) const;
16  float x;
17  float y;
18  float z;
19};
20
21#endif
Note: See TracBrowser for help on using the repository browser.