mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:20:04 +00:00
Placefile polygon rendering
This commit is contained in:
parent
d9a53ea8d7
commit
cdef5a9938
8 changed files with 547 additions and 5 deletions
60
scwx-qt/source/scwx/qt/gl/draw/placefile_polygons.hpp
Normal file
60
scwx-qt/source/scwx/qt/gl/draw/placefile_polygons.hpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/qt/gl/gl_context.hpp>
|
||||
#include <scwx/qt/gl/draw/draw_item.hpp>
|
||||
#include <scwx/gr/placefile.hpp>
|
||||
|
||||
#include <boost/gil.hpp>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace gl
|
||||
{
|
||||
namespace draw
|
||||
{
|
||||
|
||||
class PlacefilePolygons : public DrawItem
|
||||
{
|
||||
public:
|
||||
explicit PlacefilePolygons(std::shared_ptr<GlContext> context);
|
||||
~PlacefilePolygons();
|
||||
|
||||
PlacefilePolygons(const PlacefilePolygons&) = delete;
|
||||
PlacefilePolygons& operator=(const PlacefilePolygons&) = delete;
|
||||
|
||||
PlacefilePolygons(PlacefilePolygons&&) noexcept;
|
||||
PlacefilePolygons& operator=(PlacefilePolygons&&) noexcept;
|
||||
|
||||
void Initialize() override;
|
||||
void Render(const QMapLibreGL::CustomLayerRenderParameters& params) override;
|
||||
void Deinitialize() override;
|
||||
|
||||
/**
|
||||
* Resets and prepares the draw item for adding a new set of polygons.
|
||||
*/
|
||||
void StartPolygons();
|
||||
|
||||
/**
|
||||
* Adds a placefile polygon to the internal draw list.
|
||||
*
|
||||
* @param [in] di Placefile polygon
|
||||
*/
|
||||
void AddPolygon(const std::shared_ptr<gr::Placefile::PolygonDrawItem>& di);
|
||||
|
||||
/**
|
||||
* Finalizes the draw item after adding new polygons.
|
||||
*/
|
||||
void FinishPolygons();
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
|
||||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
} // namespace draw
|
||||
} // namespace gl
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue