23 #include <yaml-cpp/yaml.h> 32 double lonMin, lonMax, latMin, latMax;
33 TerrainCriteria() : weight(1), lonMin(0.0), lonMax(360.0), latMin(-90.0), latMax(90.0) {};
46 std::map<std::string, int> _deployments;
47 std::vector<TerrainCriteria> _terrain;
54 void load(
const YAML::Node& node);
56 std::vector<TerrainCriteria> *getTerrain();
58 std::string getRandomTerrain(
Target *target)
const;
60 const std::map<std::string, int> &getDeployments()
const;
62 std::string getRandomDeployment()
const;
75 node[
"name"] = rhs.name;
76 node[
"weight"] = rhs.weight;
77 std::vector<double> area;
78 area.push_back(rhs.lonMin);
79 area.push_back(rhs.lonMax);
80 area.push_back(rhs.latMin);
81 area.push_back(rhs.latMax);
91 rhs.name = node[
"name"].as<std::string>(rhs.name);
92 rhs.weight = node[
"weight"].as<
int>(rhs.weight);
95 std::vector<double> area = node[
"area"].as< std::vector<double> >();
96 rhs.lonMin = area[0] * M_PI / 180.0;
97 rhs.lonMax = area[1] * M_PI / 180.0;
98 rhs.latMin = area[2] * M_PI / 180.0;
99 rhs.latMax = area[3] * M_PI / 180.0;
Definition: Position.h:88
Represents the relations between a Geoscape texture and the corresponding Battlescape mission attribu...
Definition: Texture.h:42
Base class for targets on the globe with a set of radian coordinates.
Definition: Target.h:33
Definition: BaseInfoState.cpp:40