QGIS API Documentation 4.1.0-Master (9af12b5a203)
Loading...
Searching...
No Matches
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
28
35class _3D_EXPORT Qgs3DSymbolUtils
36{
37 public:
47 static QColor vectorSymbolAverageColor( const QgsAbstract3DSymbol *symbol );
48
60 static QIcon vectorSymbolPreviewIcon( const QgsAbstract3DSymbol *symbol, const QSize &size, const QgsScreenProperties &screen, int padding );
61
69 static bool setVectorSymbolBaseColor( QgsAbstract3DSymbol *symbol, const QColor &baseColor );
70
79 static bool copyVectorSymbolMaterial( const QgsAbstract3DSymbol *fromSymbol, QgsAbstract3DSymbol *toSymbol );
80};
81
82#endif // QGS3DSYMBOLUTILS_H
Miscellaneous utility functions used in 3D code for symbols.
static QColor vectorSymbolAverageColor(const QgsAbstract3DSymbol *symbol)
Computes an approximate color from a 3D vector symbol.
static bool copyVectorSymbolMaterial(const QgsAbstract3DSymbol *fromSymbol, QgsAbstract3DSymbol *toSymbol)
Copies the material properties of a vector 3D symbol from one symbol to another.
static QIcon vectorSymbolPreviewIcon(const QgsAbstract3DSymbol *symbol, const QSize &size, const QgsScreenProperties &screen, int padding)
Returns an icon preview for a 3D vector symbol.
static bool setVectorSymbolBaseColor(QgsAbstract3DSymbol *symbol, const QColor &baseColor)
Sets the base color of the material settings associated with a 3D vector symbol.
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
Stores properties relating to a screen.