mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 14:20:04 +00:00 
			
		
		
		
	Render placefile triangles
This commit is contained in:
		
							parent
							
								
									0421435e97
								
							
						
					
					
						commit
						26a326b450
					
				
					 4 changed files with 388 additions and 5 deletions
				
			
		
							
								
								
									
										61
									
								
								scwx-qt/source/scwx/qt/gl/draw/placefile_triangles.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								scwx-qt/source/scwx/qt/gl/draw/placefile_triangles.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,61 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <scwx/qt/gl/gl_context.hpp> | ||||
| #include <scwx/qt/gl/draw/draw_item.hpp> | ||||
| #include <scwx/gr/placefile.hpp> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
| { | ||||
| namespace gl | ||||
| { | ||||
| namespace draw | ||||
| { | ||||
| 
 | ||||
| class PlacefileTriangles : public DrawItem | ||||
| { | ||||
| public: | ||||
|    explicit PlacefileTriangles(const std::shared_ptr<GlContext>& context); | ||||
|    ~PlacefileTriangles(); | ||||
| 
 | ||||
|    PlacefileTriangles(const PlacefileTriangles&)            = delete; | ||||
|    PlacefileTriangles& operator=(const PlacefileTriangles&) = delete; | ||||
| 
 | ||||
|    PlacefileTriangles(PlacefileTriangles&&) noexcept; | ||||
|    PlacefileTriangles& operator=(PlacefileTriangles&&) noexcept; | ||||
| 
 | ||||
|    void set_thresholded(bool thresholded); | ||||
| 
 | ||||
|    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 triangles. | ||||
|     */ | ||||
|    void StartTriangles(); | ||||
| 
 | ||||
|    /**
 | ||||
|     * Adds placefile triangles to the internal draw list. | ||||
|     * | ||||
|     * @param [in] di Placefile triangles | ||||
|     */ | ||||
|    void | ||||
|    AddTriangles(const std::shared_ptr<gr::Placefile::TrianglesDrawItem>& di); | ||||
| 
 | ||||
|    /**
 | ||||
|     * Finalizes the draw item after adding new triangles. | ||||
|     */ | ||||
|    void FinishTriangles(); | ||||
| 
 | ||||
| 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
	
	 Dan Paulat
						Dan Paulat