mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:30:04 +00:00
Add placefile parsing for Triangles and Polygon
This commit is contained in:
parent
4fcfb54890
commit
d9a53ea8d7
2 changed files with 172 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <istream>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -120,6 +121,44 @@ public:
|
|||
std::vector<Element> elements_ {};
|
||||
};
|
||||
|
||||
struct TrianglesDrawItem : DrawItem
|
||||
{
|
||||
TrianglesDrawItem() { itemType_ = ItemType::Triangles; }
|
||||
|
||||
boost::gil::rgba8_pixel_t color_ {};
|
||||
|
||||
struct Element
|
||||
{
|
||||
double latitude_ {};
|
||||
double longitude_ {};
|
||||
double x_ {};
|
||||
double y_ {};
|
||||
|
||||
std::optional<boost::gil::rgba8_pixel_t> color_ {};
|
||||
};
|
||||
|
||||
std::vector<Element> elements_ {};
|
||||
};
|
||||
|
||||
struct PolygonDrawItem : DrawItem
|
||||
{
|
||||
PolygonDrawItem() { itemType_ = ItemType::Polygon; }
|
||||
|
||||
boost::gil::rgba8_pixel_t color_ {};
|
||||
|
||||
struct Element
|
||||
{
|
||||
double latitude_ {};
|
||||
double longitude_ {};
|
||||
double x_ {};
|
||||
double y_ {};
|
||||
|
||||
std::optional<boost::gil::rgba8_pixel_t> color_ {};
|
||||
};
|
||||
|
||||
std::vector<std::vector<Element>> contours_ {};
|
||||
};
|
||||
|
||||
bool IsValid() const;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue