blob: 76eb883d11460e568aa35948599a383e9bb03749 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#ifndef VECTOR_H
#define VECTOR_H
class Vec3d {
public:
Vec3d();
Vec3d(double x, double y, double z);
void set(double x, double y, double z);
void normalize();
double length() const;
double dot(const Vec3d &vec) const;
Vec3d cross(const Vec3d &vec) const;
// Operators
Vec3d operator-(const Vec3d &vec) const;
Vec3d operator-() const;
double m_x, m_y, m_z;
};
#endif
|