|
QGIS API Documentation 4.3.0-Master (d3b565c628d)
|
Material of the billboard rendering for points in 3D map view. More...
#include <qgspoint3dbillboardmaterial.h>

Public Types | |
| enum class | ExtraAttribute { Size = 1 << 1 , TextureData = 1 << 2 , PixelOffsets = 1 << 3 , VerticalOffset = 1 << 4 } |
| Additional material attributes. More... | |
| typedef QFlags< ExtraAttribute > | ExtraAttributes |
Public Member Functions | |
| QgsPoint3DBillboardMaterial (ExtraAttributes attributes=ExtraAttributes(), Qgis::BillboardScaleMode scaleMode=Qgis::BillboardScaleMode::ViewIndependent) | |
| Constructor for QgsPoint3DBillboardMaterial, using the specified additional attributes. | |
| ~QgsPoint3DBillboardMaterial () override | |
| void | setSize (const QSizeF size) |
| Set the billboard size. | |
| void | setTexture2DFromImage (const QImage &image) |
| Set the texture2D of the billboard from an image. | |
| void | setTexture2DFromSymbol (const QgsMarkerSymbol *markerSymbol, const Qgs3DRenderContext &context, bool selected=false) |
| Set markerSymbol for the texture with context and selected parameter for rendering. | |
| void | setVerticalOffset (float offset) |
| Set the vertical offset. | |
| void | setViewportSize (const QSizeF size) |
| Set the size of the view port. | |
| QSizeF | size () const |
| Returns the billboard size. | |
| void | useDefaultSymbol (const Qgs3DRenderContext &context, bool selected=false) |
| Set default symbol for the texture with context and selected parameter for rendering. | |
| QSizeF | windowSize () const |
| Returns the size of the view port. | |
| Public Member Functions inherited from QgsMaterial | |
| QgsMaterial (Qt3DCore::QNode *parent=nullptr) | |
| Constructor for QgsMaterial, with the specified parent node. | |
| ~QgsMaterial () override | |
| bool | castsShadows () const |
Returns true if the material should cast shadows. | |
| void | disableClipping () |
| Removes the uniform parameters used to define OpenGL clipping. | |
| void | enableClipping (const QList< QVector4D > &clipPlanesEquations) |
| Adds two uniform parameters to define OpenGL clipping from clipPlanesEquations. | |
| void | setCastsShadows (bool enabled) |
| Sets whether the material should cast shadows. | |
Static Public Member Functions | |
| static QImage | renderSymbolToImage (const QgsMarkerSymbol *markerSymbol, const Qgs3DRenderContext &context, bool selected=false) |
| Renders a marker symbol to an image. | |
Material of the billboard rendering for points in 3D map view.
This material is designed for use with the QgsBillboardGeometry class providing the billboard geometry.
Definition at line 41 of file qgspoint3dbillboardmaterial.h.
| typedef QFlags< ExtraAttribute > QgsPoint3DBillboardMaterial::ExtraAttributes |
Definition at line 58 of file qgspoint3dbillboardmaterial.h.
|
strong |
Additional material attributes.
| Enumerator | |
|---|---|
| Size | |
| TextureData | |
| PixelOffsets | |
| VerticalOffset | |
Definition at line 51 of file qgspoint3dbillboardmaterial.h.
| QgsPoint3DBillboardMaterial::QgsPoint3DBillboardMaterial | ( | ExtraAttributes | attributes = ExtraAttributes(), |
| Qgis::BillboardScaleMode | scaleMode = Qgis::BillboardScaleMode::ViewIndependent ) |
Constructor for QgsPoint3DBillboardMaterial, using the specified additional attributes.
Definition at line 39 of file qgspoint3dbillboardmaterial.cpp.
|
overridedefault |
|
static |
Renders a marker symbol to an image.
Definition at line 201 of file qgspoint3dbillboardmaterial.cpp.
| void QgsPoint3DBillboardMaterial::setSize | ( | const QSizeF | size | ) |
Set the billboard size.
Definition at line 147 of file qgspoint3dbillboardmaterial.cpp.
| void QgsPoint3DBillboardMaterial::setTexture2DFromImage | ( | const QImage & | image | ) |
Set the texture2D of the billboard from an image.
Definition at line 185 of file qgspoint3dbillboardmaterial.cpp.
| void QgsPoint3DBillboardMaterial::setTexture2DFromSymbol | ( | const QgsMarkerSymbol * | markerSymbol, |
| const Qgs3DRenderContext & | context, | ||
| bool | selected = false ) |
Set markerSymbol for the texture with context and selected parameter for rendering.
Definition at line 230 of file qgspoint3dbillboardmaterial.cpp.
| void QgsPoint3DBillboardMaterial::setVerticalOffset | ( | float | offset | ) |
Set the vertical offset.
For example, a vertical offset of 0.5 will anchor the billboard's bottom edge at the vertex z position, or -0.5 will anchor the billboard's top edge at the vertex z position.
Definition at line 157 of file qgspoint3dbillboardmaterial.cpp.
| void QgsPoint3DBillboardMaterial::setViewportSize | ( | const QSizeF | size | ) |
Set the size of the view port.
Definition at line 165 of file qgspoint3dbillboardmaterial.cpp.
| QSizeF QgsPoint3DBillboardMaterial::size | ( | ) | const |
Returns the billboard size.
Definition at line 152 of file qgspoint3dbillboardmaterial.cpp.
| void QgsPoint3DBillboardMaterial::useDefaultSymbol | ( | const Qgs3DRenderContext & | context, |
| bool | selected = false ) |
Set default symbol for the texture with context and selected parameter for rendering.
Definition at line 194 of file qgspoint3dbillboardmaterial.cpp.
| QSizeF QgsPoint3DBillboardMaterial::windowSize | ( | ) | const |
Returns the size of the view port.
Definition at line 173 of file qgspoint3dbillboardmaterial.cpp.