QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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  Mode { SingleTexture , AtlasTexture , AtlasTextureWithPixelOffsets }
 Material modes. More...

Public Member Functions

 QgsPoint3DBillboardMaterial (Mode mode=Mode::SingleTexture)
 Constructor for QgsPoint3DBillboardMaterial, using the specified mode.
 ~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 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
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.

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 40 of file qgspoint3dbillboardmaterial.h.

Member Enumeration Documentation

◆ Mode

Material modes.

Since
QGIS 4.0
Enumerator
SingleTexture 

Use a single repeated texture for all billboards. Billboard positions should be set using QgsBillboardGeometry::setPositions().

AtlasTexture 

Use a texture atlas, so each billboard has a different texture. Billboard positions and texture data should be set using QgsBillboardGeometry::setBillboardData().

AtlasTextureWithPixelOffsets 

Use a texture atlas, so each billboard has a different texture. Billboards have pixel-sized offsets from their position. Billboard positions and texture data should be set using QgsBillboardGeometry::setBillboardData().

Definition at line 50 of file qgspoint3dbillboardmaterial.h.

Constructor & Destructor Documentation

◆ QgsPoint3DBillboardMaterial()

QgsPoint3DBillboardMaterial::QgsPoint3DBillboardMaterial ( Mode mode = Mode::SingleTexture)

Constructor for QgsPoint3DBillboardMaterial, using the specified mode.

Definition at line 36 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 159 of file qgspoint3dbillboardmaterial.cpp.

◆ setSize()

void QgsPoint3DBillboardMaterial::setSize ( const QSizeF size)

Set the billboard size.

Definition at line 123 of file qgspoint3dbillboardmaterial.cpp.

◆ setTexture2DFromImage()

void QgsPoint3DBillboardMaterial::setTexture2DFromImage ( const QImage & image)

Set the texture2D of the billboard from an image.

Definition at line 143 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 188 of file qgspoint3dbillboardmaterial.cpp.

◆ setViewportSize()

void QgsPoint3DBillboardMaterial::setViewportSize ( const QSizeF size)

Set the size of the view port.

Definition at line 133 of file qgspoint3dbillboardmaterial.cpp.

◆ size()

QSizeF QgsPoint3DBillboardMaterial::size ( ) const

Returns the billboard size.

Definition at line 128 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 152 of file qgspoint3dbillboardmaterial.cpp.

◆ windowSize()

QSizeF QgsPoint3DBillboardMaterial::windowSize ( ) const

Returns the size of the view port.

Definition at line 138 of file qgspoint3dbillboardmaterial.cpp.


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