Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Move altitude binding/clamping enums to Qgs3DTypes + add culling mode…
… in Python
- Loading branch information
Showing
with
214 additions
and 163 deletions.
- +1 −1 python/3d/3d_auto.sip
- +33 −19 python/3d/auto_generated/{qgs3dutils.sip.in → qgs3dtypes.sip.in}
- +4 −4 python/3d/auto_generated/symbols/qgsline3dsymbol.sip.in
- +2 −2 python/3d/auto_generated/symbols/qgspoint3dsymbol.sip.in
- +12 −4 python/3d/auto_generated/symbols/qgspolygon3dsymbol.sip.in
- +4 −4 scripts/prepare-commit.sh
- +1 −0 src/3d/CMakeLists.txt
- +1 −0 src/3d/qgs3dmapsettings.cpp
- +54 −0 src/3d/qgs3dtypes.h
- +38 −38 src/3d/qgs3dutils.cpp
- +11 −28 src/3d/qgs3dutils.h
- +0 −1 src/3d/qgsvectorlayer3drenderer.h
- +2 −0 src/3d/symbols/qgsline3dsymbol.cpp
- +7 −7 src/3d/symbols/qgsline3dsymbol.h
- +1 −1 src/3d/symbols/qgsline3dsymbol_p.cpp
- +1 −0 src/3d/symbols/qgspoint3dsymbol.cpp
- +5 −4 src/3d/symbols/qgspoint3dsymbol.h
- +2 −0 src/3d/symbols/qgspolygon3dsymbol.cpp
- +10 −10 src/3d/symbols/qgspolygon3dsymbol.h
- +12 −1 src/3d/symbols/qgspolygon3dsymbol_p.cpp
- +4 −4 src/app/3d/qgsline3dsymbolwidget.cpp
- +3 −3 src/app/3d/qgspoint3dsymbolwidget.cpp
- +6 −32 src/app/3d/qgspolygon3dsymbolwidget.cpp
@@ -1,37 +1,51 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/3d/qgs3dutils.h * | ||
* src/3d/qgs3dtypes.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
enum AltitudeClamping | ||
{ | ||
AltClampAbsolute, | ||
AltClampRelative, | ||
AltClampTerrain, | ||
}; | ||
|
||
|
||
enum AltitudeBinding | ||
class Qgs3DTypes | ||
{ | ||
AltBindVertex, | ||
AltBindCentroid, | ||
%Docstring | ||
Defines enumerations and other auxilliary types for QGIS 3D | ||
|
||
.. versionadded:: 3.4 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgs3dtypes.h" | ||
%End | ||
public: | ||
enum AltitudeClamping | ||
{ | ||
AltClampAbsolute, | ||
AltClampRelative, | ||
AltClampTerrain, | ||
}; | ||
|
||
enum AltitudeBinding | ||
{ | ||
AltBindVertex, | ||
AltBindCentroid, | ||
}; | ||
|
||
enum CullingMode | ||
{ | ||
NoCulling, | ||
Front, | ||
Back, | ||
FrontAndBack | ||
}; | ||
}; | ||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/3d/qgs3dutils.h * | ||
* src/3d/qgs3dtypes.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
@@ -0,0 +1,54 @@ | ||
/*************************************************************************** | ||
qgs3dtypes.h | ||
-------------------------------------- | ||
Date : October 2018 | ||
Copyright : (C) 2018 by Martin Dobias | ||
Email : wonder dot sk at gmail dot com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGS3DTYPES_H | ||
#define QGS3DTYPES_H | ||
|
||
#include "qgis_3d.h" | ||
|
||
/** | ||
* \ingroup 3d | ||
* Defines enumerations and other auxilliary types for QGIS 3D | ||
* \since QGIS 3.4 | ||
*/ | ||
class _3D_EXPORT Qgs3DTypes | ||
{ | ||
public: | ||
//! how to handle altitude of vector features | ||
enum AltitudeClamping | ||
{ | ||
AltClampAbsolute, //!< Z_final = z_geometry | ||
AltClampRelative, //!< Z_final = z_terrain + z_geometry | ||
AltClampTerrain, //!< Z_final = z_terrain | ||
}; | ||
|
||
//! how to handle clamping of vertices of individual features | ||
enum AltitudeBinding | ||
{ | ||
AltBindVertex, //!< Clamp every vertex of feature | ||
AltBindCentroid, //!< Clamp just centroid of feature | ||
}; | ||
|
||
//! Triangle culling mode | ||
enum CullingMode | ||
{ | ||
NoCulling, //!< Will render both front and back faces of triangles | ||
Front, //!< Will render only back faces of triangles | ||
Back, //!< Will render only front faces of triangles (recommended when input data are consistent) | ||
FrontAndBack //!< Will not render anything | ||
}; | ||
}; | ||
|
||
#endif // QGS3DTYPES_H |
Oops, something went wrong.