Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FEATURE] 3D identify tool working on 3D entities
Until now the tool only considered terrain. This commit adds support for 3D renderers created from vector layers, so it is possible to correctly identify polygons and linestrings in 3D.
- Loading branch information
Showing
16 changed files
with
273 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef QGS3DMAPSCENEPICKHANDLER_H | ||
#define QGS3DMAPSCENEPICKHANDLER_H | ||
|
||
#include "qgsfeatureid.h" | ||
|
||
class QVector3D; | ||
class QgsVectorLayer; | ||
|
||
/** | ||
* \ingroup 3d | ||
* Abstract base class for handlers that process pick events from a 3D map scene. | ||
* 3D entities in map scene get QObjectPicker components assigned and mouse press events trigger virtual methods | ||
* or pick handlers. | ||
* | ||
* This is used for identify tool to be able to identify entities coming from 3D renderers assigned to map layers. | ||
* | ||
* \since QGIS 3.4 | ||
*/ | ||
class Qgs3DMapScenePickHandler | ||
{ | ||
public: | ||
virtual ~Qgs3DMapScenePickHandler() {} | ||
|
||
//! Called when user clicked a 3D entity belonging to a feature of a vector layer | ||
virtual void handlePickOnVectorLayer( QgsVectorLayer *vlayer, QgsFeatureId id, const QVector3D &worldIntersection ) = 0; | ||
}; | ||
|
||
#endif // QGS3DMAPSCENEPICKHANDLER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.