QGIS API Documentation 4.3.0-Master (d3b565c628d)
Loading...
Searching...
No Matches
QgsPoint3DBillboardMaterial Class Reference

Material of the billboard rendering for points in 3D map view. More...

#include <qgspoint3dbillboardmaterial.h>

Inheritance diagram for QgsPoint3DBillboardMaterial:

Public Types

enum class  ExtraAttribute { Size = 1 << 1 , TextureData = 1 << 2 , PixelOffsets = 1 << 3 , VerticalOffset = 1 << 4 }
 Additional material attributes. More...
typedef QFlags< ExtraAttributeExtraAttributes

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.

Detailed Description

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.

Note
Not available in Python bindings
Since
QGIS 3.10

Definition at line 41 of file qgspoint3dbillboardmaterial.h.

Member Typedef Documentation

◆ ExtraAttributes

Member Enumeration Documentation

◆ ExtraAttribute

Additional material attributes.

Since
QGIS 4.4
Enumerator
Size 
TextureData 
PixelOffsets 
VerticalOffset 

Definition at line 51 of file qgspoint3dbillboardmaterial.h.

Constructor & Destructor Documentation

◆ QgsPoint3DBillboardMaterial()

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.

◆ ~QgsPoint3DBillboardMaterial()

QgsPoint3DBillboardMaterial::~QgsPoint3DBillboardMaterial ( )
overridedefault

Member Function Documentation

◆ renderSymbolToImage()

QImage QgsPoint3DBillboardMaterial::renderSymbolToImage ( const QgsMarkerSymbol * markerSymbol,
const Qgs3DRenderContext & context,
bool selected = false )
static

Renders a marker symbol to an image.

Since
QGIS 4.0

Definition at line 201 of file qgspoint3dbillboardmaterial.cpp.

◆ setSize()

void QgsPoint3DBillboardMaterial::setSize ( const QSizeF size)

Set the billboard size.

Definition at line 147 of file qgspoint3dbillboardmaterial.cpp.

◆ setTexture2DFromImage()

void QgsPoint3DBillboardMaterial::setTexture2DFromImage ( const QImage & image)

Set the texture2D of the billboard from an image.

Definition at line 185 of file qgspoint3dbillboardmaterial.cpp.

◆ setTexture2DFromSymbol()

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.

◆ setVerticalOffset()

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.

Note
This only applies if the material was constructed with the ExtraAttribute::VerticalOffset flag set.

Definition at line 157 of file qgspoint3dbillboardmaterial.cpp.

◆ setViewportSize()

void QgsPoint3DBillboardMaterial::setViewportSize ( const QSizeF size)

Set the size of the view port.

Definition at line 165 of file qgspoint3dbillboardmaterial.cpp.

◆ size()

QSizeF QgsPoint3DBillboardMaterial::size ( ) const

Returns the billboard size.

Definition at line 152 of file qgspoint3dbillboardmaterial.cpp.

◆ useDefaultSymbol()

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.

◆ windowSize()

QSizeF QgsPoint3DBillboardMaterial::windowSize ( ) const

Returns the size of the view port.

Definition at line 173 of file qgspoint3dbillboardmaterial.cpp.


The documentation for this class was generated from the following files: