12 Commits

Author SHA1 Message Date
Ismail Sunni
b9978d53d1 [FEATURE][3D] Billboard Rendering for Points (#31308)
* Add button to change billboard symbol.

* Add shaders for billboards.

* Add billboard material class.

* Add sample billboard image.

* Add dummy handler for billboard.

* Add billboard geometry class.

* First working version of 3D point as billboard.

* Make selected feature bigger.

* Use default symbol preview as billboard.

* Update billboard when changes the viewport size.

* Use QgsTerrainTextureImage for adding image to texture.

* Show better quality of billboard default symbol.

* Promote QgsSymbolButton not working.

* Add QgsSymbolButton properly.

* Add seTexture2DFromSymbol.

* Use default symbol

* [On Progress] Get symbol from the QgsSymbolButton.

* [On progress] failed to change the symbol

* Fix billboard fragment shader for macOS

* Better transparency handling.

* Use size from the symbol.

* Add set layer for 3d billboard symbol.

* Set billboard size from the symbol pixel size * 20

* Use size from the image.

* [Debug] set white symbol to success kid, it work when previous billboard is success kid.

* Use store and restore symbol from Nyall.

* Remove unrelated code.

* Apply random extent to fix the bug, from Martin.

* Remove add mesh entities for billboard.

* Hide material and transformation widget for billboard.

* Remove add scene entities for billboard.

* Add selected as parameter in drawPreviewIcon.

* Add QgsMarkerSymbol to store the symbol in billboard

* Put billboard symbol in point3dsymbol serialization.

* Add billboard height in the UI.

* Set height for billboard.

* Store billboard height separately. Perhaps better to use existing transform.

* Set height of billboard to TY.

* Flipped image for billboard symbol.

* Add helper function to set billboard function.

* Generate billboard transform from general transform.

* Use static dpi for context size.

* Remove debug message.

* Use Qgs3DRenderContext for selection color and dpi from QgsApplication.

* Remove unnecessary file and code.

* Remove commented iut code.

* Add documentation of new classes.

* Fix banned keywords.

* Add missing parameter's documentation.

* Address PR review.

* Use context from readXML.

* Remove one line function.

* Fix billboard size.

* Make some functions private, remove unused function.

* Use unique_ptr for the ownership.

* Use unique_ptr for default symbol to avoid memory leak.

* Add parent to texture2D.

* Fix documentation.

* Add copy constructor.

* Fix documentation.

* Remove documentation warning.

* Fix sip error.

* Add unit test for billboard rendering.

* Set ambient to not transparent for measurement line.

* Add dpi in the Qgs3DMapSetting

* Update billboard rendering unit test.

* Remove layer from 3d point widget since it's not supported yet.

* Addressing PR review from Martin.

* Attach dom directly for the billboard symbol.

* Remove unused constructor for point3dsymbol.

* Use stroke width ratio for solving big stroke width.

* Update unit test for rendering with some stroke color.

* Fix typo.
2019-08-27 10:04:56 +02:00
Nyall Dawson
861c5115eb Fix various clazy warnings 2019-06-07 16:40:18 +10:00
Martin Dobias
b5fec5872b Edge settings for polygons + GUI to configure edge rendering 2019-04-09 09:42:08 +02:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
a7ca08784c Nullptr consistency in dox 2019-02-27 09:41:11 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Martin Dobias
9875821b04 Review fixes, sip, doc fixes, icons, style panel fix 2019-01-18 09:32:53 +01:00
Martin Dobias
d3e81f6d18 [FEATURE] Add support for shading of terrain
This adds new options for user to choose how the terrain should be rendered:
- shading disabled - color of terrain is determined only from map texture
- shading enabled - color of terrain is determined using Phong's shading model,
  taking into account map texture, terrain normal vector, scene light(s) and
  terrain material's ambient+specular colors and shininess

(configuration of lights is not there yet - now we always have a single point
light with white color at the middle of the scene at 1km above the zero elevation)
2018-11-11 16:10:58 +01:00
Martin Dobias
0f3088abf8 Fix spelling 2018-10-14 22:13:58 +02:00
Martin Dobias
45c9ae97c0 Add warnings about the QGIS 3D API being unstable / tech preview only 2018-10-14 16:40:13 +02:00
Martin Dobias
8814e40635 Move altitude binding/clamping enums to Qgs3DTypes + add culling mode in Python 2018-10-14 16:32:24 +02:00
Martin Dobias
88cb8313c8 Python bindings for QGIS 3D library 2018-10-13 22:05:39 +02:00