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
30 * A two-dimensional vector to define positions on the ground
35 Vector2 (double x
= 0, double y
= 0);
42 operator+ (Vector2
&v
);
48 operator- (Vector2
&v
);
56 * A three-dimensional vector
61 Vector3 (double x
= 0, double y
= 0, double z
= 0);
68 operator+ (Vector3
&v
);
74 operator- (Vector3
&v
);
86 RotationVector (double pitch
= 0, double yaw
= 0, double roll
= 0);
89 double pitch
, yaw
, roll
;
94 #endif /* STRANDED_VECTOR_HH */