QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
symbols
qgs3dsymbolutils.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgs3dsymbolutils.h
3
--------------------------------------
4
Date : January 2026
5
Copyright : (C) 2026 by Jean Felder
6
Email : jean dot felder at oslandia dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGS3DSYMBOLUTILS_H
17
#define QGS3DSYMBOLUTILS_H
18
19
#include "qgis_3d.h"
20
#include "
qgsscreenproperties.h
"
21
22
#include <QColor>
23
#include <QIcon>
24
25
#define SIP_NO_FILE
26
27
class
QgsAbstract3DSymbol
;
28
class
QgsVectorLayer
;
29
class
QgsSymbol
;
30
37
class
_3D_EXPORT
Qgs3DSymbolUtils
38
{
39
public
:
49
static
QColor
vectorSymbolAverageColor
(
const
QgsAbstract3DSymbol
*symbol );
50
62
static
QIcon
vectorSymbolPreviewIcon
(
const
QgsAbstract3DSymbol
*symbol,
const
QSize &size,
const
QgsScreenProperties
&screen,
int
padding );
63
71
static
bool
setVectorSymbolBaseColor
(
QgsAbstract3DSymbol
*symbol,
const
QColor &baseColor );
72
81
static
bool
copyVectorSymbolMaterial
(
const
QgsAbstract3DSymbol
*fromSymbol,
QgsAbstract3DSymbol
*toSymbol );
82
101
static
std::unique_ptr<QgsAbstract3DSymbol>
create3DSymbolFrom2D
(
const
QgsVectorLayer
*vLayer,
const
QgsSymbol
*symbol2D );
102
};
103
104
#endif
// QGS3DSYMBOLUTILS_H
Qgs3DSymbolUtils
Miscellaneous utility functions used in 3D code for symbols.
Definition
qgs3dsymbolutils.h:38
Qgs3DSymbolUtils::create3DSymbolFrom2D
static std::unique_ptr< QgsAbstract3DSymbol > create3DSymbolFrom2D(const QgsVectorLayer *vLayer, const QgsSymbol *symbol2D)
Creates a 3D symbol from a 2D symbol.
Definition
qgs3dsymbolutils.cpp:323
Qgs3DSymbolUtils::vectorSymbolAverageColor
static QColor vectorSymbolAverageColor(const QgsAbstract3DSymbol *symbol)
Computes an approximate color from a 3D vector symbol.
Definition
qgs3dsymbolutils.cpp:91
Qgs3DSymbolUtils::copyVectorSymbolMaterial
static bool copyVectorSymbolMaterial(const QgsAbstract3DSymbol *fromSymbol, QgsAbstract3DSymbol *toSymbol)
Copies the material properties of a vector 3D symbol from one symbol to another.
Definition
qgs3dsymbolutils.cpp:306
Qgs3DSymbolUtils::vectorSymbolPreviewIcon
static QIcon vectorSymbolPreviewIcon(const QgsAbstract3DSymbol *symbol, const QSize &size, const QgsScreenProperties &screen, int padding)
Returns an icon preview for a 3D vector symbol.
Definition
qgs3dsymbolutils.cpp:113
Qgs3DSymbolUtils::setVectorSymbolBaseColor
static bool setVectorSymbolBaseColor(QgsAbstract3DSymbol *symbol, const QColor &baseColor)
Sets the base color of the material settings associated with a 3D vector symbol.
Definition
qgs3dsymbolutils.cpp:284
QgsAbstract3DSymbol
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
Definition
qgsabstract3dsymbol.h:48
QgsScreenProperties
Stores properties relating to a screen.
Definition
qgsscreenproperties.h:36
QgsSymbol
Abstract base class for all rendered symbols.
Definition
qgssymbol.h:227
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgsscreenproperties.h
Generated on
for QGIS API Documentation by
1.17.0