mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 05:10:04 +00:00 
			
		
		
		
	Placefile line hover in-work
This commit is contained in:
		
							parent
							
								
									37d751774d
								
							
						
					
					
						commit
						8dfb9f1105
					
				
					 14 changed files with 243 additions and 36 deletions
				
			
		|  | @ -54,7 +54,8 @@ void DrawItem::Render(const QMapLibreGL::CustomLayerRenderParameters& params, | |||
| } | ||||
| 
 | ||||
| bool DrawItem::RunMousePicking( | ||||
|    const QMapLibreGL::CustomLayerRenderParameters& /* params */) | ||||
|    const QMapLibreGL::CustomLayerRenderParameters& /* params */, | ||||
|    const glm::vec2& /* mousePos */) | ||||
| { | ||||
|    // By default, the draw item is not picked
 | ||||
|    return false; | ||||
|  | @ -97,17 +98,7 @@ void DrawItem::UseMapProjection( | |||
| { | ||||
|    OpenGLFunctions& gl = p->gl_; | ||||
| 
 | ||||
|    // TODO: Refactor to utility class
 | ||||
|    const float scale = std::pow(2.0, params.zoom) * 2.0f * | ||||
|                        mbgl::util::tileSize_D / mbgl::util::DEGREES_MAX; | ||||
|    const float xScale = scale / params.width; | ||||
|    const float yScale = scale / params.height; | ||||
| 
 | ||||
|    glm::mat4 uMVPMatrix(1.0f); | ||||
|    uMVPMatrix = glm::scale(uMVPMatrix, glm::vec3(xScale, yScale, 1.0f)); | ||||
|    uMVPMatrix = glm::rotate(uMVPMatrix, | ||||
|                             glm::radians<float>(params.bearing), | ||||
|                             glm::vec3(0.0f, 0.0f, 1.0f)); | ||||
|    const glm::mat4 uMVPMatrix = util::maplibre::GetMapMatrix(params); | ||||
| 
 | ||||
|    gl.glUniform2fv(uMapScreenCoordLocation, | ||||
|                    1, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat