Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
movement.h
Go to the documentation of this file.
1/* Conquer Space
2 * Copyright (C) 2021-2023 Conquer Space
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
18
19#include <deque>
20#include <utility>
21
23
27struct Maneuver {
35 glm::dvec3 delta_v;
36 double time;
37 Maneuver() = default;
38 explicit Maneuver(const std::pair<glm::dvec3, double>& maneuver) : delta_v(maneuver.first), time(maneuver.second) {}
39};
40
42 std::deque<Maneuver> commands;
43 CommandQueue() = default;
44
45 auto begin() { return commands.begin(); }
46 auto end() { return commands.end(); }
47};
48} // namespace cqsp::common::components
double second
Definition: units.h:42
Definition: area.h:25
std::deque< Maneuver > commands
Definition: movement.h:42
auto begin()
Definition: movement.h:45
auto end()
Definition: movement.h:46
Definition: movement.h:27
glm::dvec3 delta_v
Delta v applied with respect to the orbital vector positive y is prograde, negative y is retrograde I...
Definition: movement.h:35
Maneuver(const std::pair< glm::dvec3, double > &maneuver)
Definition: movement.h:38
double time
Definition: movement.h:36