Introduced FileSystem and Out classes
[openstranded.git] / src / eal / vector.hh
blob0b310ba26c680c564126a6274d91b61e2fcbc989
1 /*
2 * This file defines position vectors
4 * Copyright (C) 2009 David Kolossa
6 * This file is part of OpenStranded
8 * OpenStranded is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * OpenStranded is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with OpenStranded. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef STRANDED_VECTOR_HH
23 #define STRANDED_VECTOR_HH
25 #include <string>
27 namespace eal
30 * A two-dimensional vector to define positions on the ground
32 class Vector2
34 public:
35 Vector2 (double x = 0, double y = 0);
36 ~Vector2 ();
39 * Vector addition
41 Vector2
42 operator+ (Vector2 &v);
45 * Vector subtraction
47 Vector2
48 operator- (Vector2 &v);
50 double x, y;
56 * A three-dimensional vector
58 class Vector3
60 public:
61 Vector3 (double x = 0, double y = 0, double z = 0);
62 ~Vector3 ();
65 * Vector addition
67 Vector3
68 operator+ (Vector3 &v);
71 * Vector subtraction
73 Vector3
74 operator- (Vector3 &v);
76 double x, y, z;
81 * A rotation vector
83 class RotationVector
85 public:
86 RotationVector (double pitch = 0, double yaw = 0, double roll = 0);
87 ~RotationVector ();
89 double pitch, yaw, roll;
94 #endif /* STRANDED_VECTOR_HH */