mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:30:05 +00:00
Mouse picking boilerplate
This commit is contained in:
parent
c7487281ad
commit
38b56be7c4
10 changed files with 115 additions and 17 deletions
|
|
@ -53,6 +53,13 @@ void DrawItem::Render(const QMapLibreGL::CustomLayerRenderParameters& params,
|
|||
Render(params);
|
||||
}
|
||||
|
||||
bool DrawItem::RunMousePicking(
|
||||
const QMapLibreGL::CustomLayerRenderParameters& /* params */)
|
||||
{
|
||||
// By default, the draw item is not picked
|
||||
return false;
|
||||
}
|
||||
|
||||
void DrawItem::UseDefaultProjection(
|
||||
const QMapLibreGL::CustomLayerRenderParameters& params,
|
||||
GLint uMVPMatrixLocation)
|
||||
|
|
|
|||
|
|
@ -33,6 +33,16 @@ public:
|
|||
bool textureAtlasChanged);
|
||||
virtual void Deinitialize() = 0;
|
||||
|
||||
/**
|
||||
* @brief Run mouse picking on the draw item.
|
||||
*
|
||||
* @param [in] params Custom layer render parameters
|
||||
*
|
||||
* @return true if the draw item was picked, otherwise false
|
||||
*/
|
||||
virtual bool
|
||||
RunMousePicking(const QMapLibreGL::CustomLayerRenderParameters& params);
|
||||
|
||||
protected:
|
||||
void
|
||||
UseDefaultProjection(const QMapLibreGL::CustomLayerRenderParameters& params,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue