Code shuffle to move all material classes to separate subdirectory

This commit is contained in:
Nyall Dawson 2020-08-03 09:25:50 +10:00
parent 798ed57155
commit c87a8f6afb
20 changed files with 187 additions and 23 deletions

View File

@ -110,6 +110,7 @@ IF(WITH_APIDOC)
${CMAKE_SOURCE_DIR}/src/analysis/vector/geometry_checker
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_SOURCE_DIR}/src/3d/materials
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain
${CMAKE_SOURCE_DIR}/src/plugins

View File

@ -3,16 +3,18 @@
%Include auto_generated/qgs3d.sip
%Include auto_generated/qgs3dmapsettings.sip
%Include auto_generated/qgs3dtypes.sip
%Include auto_generated/qgsabstractmaterialsettings.sip
%Include auto_generated/qgsabstractvectorlayer3drenderer.sip
%Include auto_generated/qgscamerapose.sip
%Include auto_generated/qgslayoutitem3dmap.sip
%Include auto_generated/qgsmaterialregistry.sip
%Include auto_generated/qgsphongmaterialsettings.sip
%Include auto_generated/qgspointlightsettings.sip
%Include auto_generated/qgsdirectionallightsettings.sip
%Include auto_generated/qgsrulebased3drenderer.sip
%Include auto_generated/qgsvectorlayer3drenderer.sip
%Include auto_generated/materials/qgsabstractmaterialsettings.sip
%Include auto_generated/materials/qgsgoochmaterialsettings.sip
%Include auto_generated/materials/qgsmaterialregistry.sip
%Include auto_generated/materials/qgsphongmaterialsettings.sip
%Include auto_generated/symbols/qgsline3dsymbol.sip
%Include auto_generated/symbols/qgspoint3dsymbol.sip
%Include auto_generated/symbols/qgspolygon3dsymbol.sip
%Include auto_generated/qgs3dmapexportsettings.sip

View File

@ -1,4 +1,4 @@
# The following has been generated automatically from src/3d/qgsabstractmaterialsettings.h
# The following has been generated automatically from src/3d/materials/qgsabstractmaterialsettings.h
QgsAbstractMaterialSettings.RenderingTechnique = QgsMaterialSettingsRenderingTechnique
# monkey patching scoped based enum
QgsAbstractMaterialSettings.Triangles = QgsMaterialSettingsRenderingTechnique.Triangles

View File

@ -1,7 +1,7 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsabstractmaterialsettings.h *
* src/3d/materials/qgsabstractmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@ -131,7 +131,7 @@ during triangulation.
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsabstractmaterialsettings.h *
* src/3d/materials/qgsabstractmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -0,0 +1,138 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/materials/qgsgoochmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsGoochMaterialSettings : QgsAbstractMaterialSettings
{
%Docstring
Basic shading material used for rendering based on the Phong shading model
with three color components: ambient, diffuse and specular.
.. warning::
This is not considered stable API, and may change in future QGIS releases. It is
exposed to the Python bindings as a tech preview only.
.. versionadded:: 3.16
%End
%TypeHeaderCode
#include "qgsgoochmaterialsettings.h"
%End
public:
QgsGoochMaterialSettings();
%Docstring
Constructor for QgsGoochMaterialSettings.
%End
virtual QString type() const;
static QgsAbstractMaterialSettings *create() /Factory/;
%Docstring
Returns a new instance of QgsGoochMaterialSettings.
%End
static bool supportsTechnique( QgsMaterialSettingsRenderingTechnique technique );
%Docstring
Returns ``True`` if the specified ``technique`` is suppored by the Gooch material.
%End
virtual QgsGoochMaterialSettings *clone() const /Factory/;
QColor warm() const;
%Docstring
Returns warm color component
%End
QColor cool() const;
%Docstring
Returns cool color component
%End
QColor diffuse() const;
%Docstring
Returns diffuse color component
%End
QColor specular() const;
%Docstring
Returns specular color component
%End
float shininess() const;
%Docstring
Returns shininess of the surface
%End
float alpha() const;
%Docstring
Returns the alpha value
%End
float beta() const;
%Docstring
Returns the beta value
%End
void setWarm( const QColor &warm );
%Docstring
Sets warm color component
%End
void setCool( const QColor &cool );
%Docstring
Sets cool color component
%End
void setDiffuse( const QColor &diffuse );
%Docstring
Sets diffuse color component
%End
void setSpecular( const QColor &specular );
%Docstring
Sets specular color component
%End
void setShininess( float shininess );
%Docstring
Sets shininess of the surface
%End
void setAlpha( float alpha );
%Docstring
Sets alpha value
%End
void setBeta( float beta );
%Docstring
Sets beta value
%End
virtual void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
virtual void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const;
virtual QMap<QString, QString> toExportParameters() const;
bool operator==( const QgsGoochMaterialSettings &other ) const;
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/materials/qgsgoochmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsmaterialregistry.h *
* src/3d/materials/qgsmaterialregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@ -125,7 +125,7 @@ Returns ``None`` if the specified type is not found in the registry.
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsmaterialregistry.h *
* src/3d/materials/qgsmaterialregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,7 +1,7 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsphongmaterialsettings.h *
* src/3d/materials/qgsphongmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@ -180,7 +180,7 @@ Sets the texture rotation in degrees
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsphongmaterialsettings.h *
* src/3d/materials/qgsphongmaterialsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -258,6 +258,7 @@ IF (WITH_3D)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_SOURCE_DIR}/src/3d/materials
${CMAKE_SOURCE_DIR}/src/3d/processing
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain

View File

@ -7,17 +7,18 @@ SET(QGIS_3D_SRCS
qgsabstract3dengine.cpp
qgsabstractvectorlayer3drenderer.cpp
qgs3danimationsettings.cpp
qgs3dexportobject.cpp
qgs3dmapexportsettings.cpp
qgs3dmapscene.cpp
qgs3dmapsettings.cpp
qgs3dsceneexporter.cpp
qgs3dutils.cpp
qgscameracontroller.cpp
qgscamerapose.cpp
qgsfeature3dhandler_p.cpp
qgsgoochmaterialsettings.cpp
qgsimagetexture.cpp
qgslayoutitem3dmap.cpp
qgsmaterialregistry.cpp
qgsoffscreen3dengine.cpp
qgsphongmaterialsettings.cpp
qgspointlightsettings.cpp
qgsdirectionallightsettings.cpp
qgsraycastingutils_p.cpp
@ -36,6 +37,10 @@ SET(QGIS_3D_SRCS
chunks/qgschunknode_p.cpp
chunks/qgschunkqueuejob_p.cpp
materials/qgsgoochmaterialsettings.cpp
materials/qgsmaterialregistry.cpp
materials/qgsphongmaterialsettings.cpp
processing/qgs3dalgorithms.cpp
processing/qgsalgorithmtessellate.cpp
@ -70,10 +75,6 @@ SET(QGIS_3D_SRCS
mesh/qgsmesh3dentity_p.cpp
mesh/qgsmesh3dmaterial_p.cpp
mesh/qgsmeshterraingenerator.cpp
qgs3dsceneexporter.cpp
qgs3dexportobject.cpp
qgs3dmapexportsettings.cpp
qgsimagetexture.cpp
)
SET(QGIS_3D_HDRS
@ -82,20 +83,17 @@ SET(QGIS_3D_HDRS
qgs3danimationsettings.h
qgs3dmapscene.h
qgs3dmapsettings.h
qgs3dsceneexporter.h
qgs3dtypes.h
qgs3dutils.h
qgsaabb.h
qgsabstract3dengine.h
qgsabstractmaterialsettings.h
qgsabstractvectorlayer3drenderer.h
qgscameracontroller.h
qgscamerapose.h
qgsgoochmaterialsettings.h
qgslayoutitem3dmap.h
qgsmaterialregistry.h
qgsmeshlayer3drenderer.h
qgsoffscreen3dengine.h
qgsphongmaterialsettings.h
qgspointlightsettings.h
qgsdirectionallightsettings.h
qgsrulebased3drenderer.h
@ -103,22 +101,30 @@ SET(QGIS_3D_HDRS
qgstilingscheme.h
qgsvectorlayer3drenderer.h
qgswindow3dengine.h
materials/qgsabstractmaterialsettings.h
materials/qgsgoochmaterialsettings.h
materials/qgsmaterialregistry.h
materials/qgsphongmaterialsettings.h
symbols/qgsbillboardgeometry.h
symbols/qgsline3dsymbol.h
symbols/qgsmesh3dsymbol.h
symbols/qgspoint3dbillboardmaterial.h
symbols/qgspoint3dsymbol.h
symbols/qgspolygon3dsymbol.h
terrain/qgsdemterraingenerator.h
terrain/qgsflatterraingenerator.h
terrain/qgsonlineterraingenerator.h
terrain/qgsterraindownloader.h
terrain/qgsterraingenerator.h
terrain/qgsterraintileloader_p.h
chunks/qgschunkloader_p.h
chunks/qgschunkqueuejob_p.h
mesh/qgsmeshterraingenerator.h
qgs3dsceneexporter.h
)
SET(QGIS_3D_PRIVATE_HDRS
@ -152,6 +158,7 @@ SET (QGIS_3D_RCCS shaders.qrc ../../resources/3d/textures/textures.qrc)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/chunks
${CMAKE_CURRENT_SOURCE_DIR}/materials
${CMAKE_CURRENT_SOURCE_DIR}/mesh
${CMAKE_CURRENT_SOURCE_DIR}/symbols
${CMAKE_CURRENT_SOURCE_DIR}/terrain

View File

@ -24,11 +24,16 @@
#include <Qt3DRender/QAttribute>
#define SIP_NO_FILE
class QgsAbstractMaterialSettings;
/**
* \brief The Qgs3DExportObject class
* Manages the data of each object of the scene (positions, normals, texture coordinates ...) since each object
*
* \note Not available in Python bindings
*
* \ingroup 3d
* \since QGIS 3.16
*/

View File

@ -42,9 +42,14 @@ class QgsLine3DSymbol;
class QgsPoint3DSymbol;
class QgsMeshEntity;
#define SIP_NO_FILE
/**
* \brief The Qgs3DSceneExporter class
* Entity that handles the exporting of 3D scene
*
* \note Not available in Python bindings
*
* \ingroup 3d
* \since QGIS 3.16
*/

View File

@ -21,10 +21,14 @@
#include <Qt3DCore/QNode>
#include <Qt3DRender/QPaintedTextureImage>
#define SIP_NO_FILE
/**
* \brief The QgsImageTexture class
* Holds an image that can be used as a texture in the 3D view
*
* \note Not available in Python bindings
*
* \ingroup 3d
* \since QGIS 3.16
*/

View File

@ -484,8 +484,9 @@ IF (WITH_3D)
${CMAKE_SOURCE_DIR}/src/app/3d
${CMAKE_SOURCE_DIR}/src/core/3d
${CMAKE_SOURCE_DIR}/src/3d
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/materials
${CMAKE_SOURCE_DIR}/src/3d/mesh
${CMAKE_SOURCE_DIR}/src/3d/symbols
${CMAKE_SOURCE_DIR}/src/3d/terrain
${CMAKE_SOURCE_DIR}/src/3d/chunks
${CMAKE_BINARY_DIR}/src/3d