blob: 05de25c812af15b501348fb6b962e85f1c3e5e30 (
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
25
26
|
#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 Vec3d &vec) const;
Vec3d operator-() const;
Vec3d operator*(double) const;
double m_x, m_y, m_z;
};
#endif
|