QGIS API Documentation 3.29.0-Master (8c80f25a4f)
Public Member Functions | List of all members
Qgs3DSceneExporter Class Reference

Entity that handles the exporting of 3D scene. More...

#include <qgs3dsceneexporter.h>

Inheritance diagram for Qgs3DSceneExporter:
Inheritance graph
[legend]

Public Member Functions

 Qgs3DSceneExporter ()
 Constructor. More...
 
 ~Qgs3DSceneExporter ()
 Destructor. More...
 
bool exportNormals () const
 Returns whether the normals will be exported. More...
 
bool exportTextures () const
 Returns whether the textures will be exported. More...
 
void parseTerrain (QgsTerrainEntity *terrain, const QString &layer)
 Creates terrain export objects from the terrain entity. More...
 
bool parseVectorLayerEntity (Qt3DCore::QEntity *entity, QgsVectorLayer *layer)
 Creates necessary export objects from entity if it represents valid vector layer entity Returns false if the no 3D object was extracted from the vector layer. More...
 
void save (const QString &sceneName, const QString &sceneFolderPath)
 Saves the scene to a .obj file. More...
 
float scale () const
 Returns the scale of the exported 3D model. More...
 
void setExportNormals (bool exportNormals)
 Sets whether the normals will be exported. More...
 
void setExportTextures (bool exportTextures)
 Sets whether the textures will be exported. More...
 
void setScale (float scale)
 Sets the scale of the exported 3D model. More...
 
void setSmoothEdges (bool smoothEdges)
 Sets whether the triangles will look smooth. More...
 
void setTerrainResolution (int resolution)
 Sets the terrain resolution. More...
 
void setTerrainTextureResolution (int resolution)
 Sets the terrain texture resolution. More...
 
bool smoothEdges () const
 Returns whether the triangles will look smooth. More...
 
int terrainResolution () const
 Returns the terrain resolution. More...
 
int terrainTextureResolution () const
 Returns the terrain resolution. More...
 

Detailed Description

Entity that handles the exporting of 3D scene.

Note
Not available in Python bindings

3

Since
QGIS 3.16

Definition at line 54 of file qgs3dsceneexporter.h.

Constructor & Destructor Documentation

◆ Qgs3DSceneExporter()

Qgs3DSceneExporter::Qgs3DSceneExporter ( )
inline

Constructor.

Definition at line 60 of file qgs3dsceneexporter.h.

◆ ~Qgs3DSceneExporter()

Qgs3DSceneExporter::~Qgs3DSceneExporter ( )
inline

Destructor.

Definition at line 62 of file qgs3dsceneexporter.h.

Member Function Documentation

◆ exportNormals()

bool Qgs3DSceneExporter::exportNormals ( ) const
inline

Returns whether the normals will be exported.

Definition at line 88 of file qgs3dsceneexporter.h.

◆ exportTextures()

bool Qgs3DSceneExporter::exportTextures ( ) const
inline

Returns whether the textures will be exported.

Definition at line 93 of file qgs3dsceneexporter.h.

◆ parseTerrain()

void Qgs3DSceneExporter::parseTerrain ( QgsTerrainEntity *  terrain,
const QString &  layer 
)

Creates terrain export objects from the terrain entity.

Definition at line 257 of file qgs3dsceneexporter.cpp.

◆ parseVectorLayerEntity()

bool Qgs3DSceneExporter::parseVectorLayerEntity ( Qt3DCore::QEntity *  entity,
QgsVectorLayer layer 
)

Creates necessary export objects from entity if it represents valid vector layer entity Returns false if the no 3D object was extracted from the vector layer.

Definition at line 185 of file qgs3dsceneexporter.cpp.

◆ save()

void Qgs3DSceneExporter::save ( const QString &  sceneName,
const QString &  sceneFolderPath 
)

Saves the scene to a .obj file.

Definition at line 661 of file qgs3dsceneexporter.cpp.

◆ scale()

float Qgs3DSceneExporter::scale ( ) const
inline

Returns the scale of the exported 3D model.

Definition at line 107 of file qgs3dsceneexporter.h.

◆ setExportNormals()

void Qgs3DSceneExporter::setExportNormals ( bool  exportNormals)
inline

Sets whether the normals will be exported.

Definition at line 86 of file qgs3dsceneexporter.h.

◆ setExportTextures()

void Qgs3DSceneExporter::setExportTextures ( bool  exportTextures)
inline

Sets whether the textures will be exported.

Definition at line 91 of file qgs3dsceneexporter.h.

◆ setScale()

void Qgs3DSceneExporter::setScale ( float  scale)
inline

Sets the scale of the exported 3D model.

Definition at line 105 of file qgs3dsceneexporter.h.

◆ setSmoothEdges()

void Qgs3DSceneExporter::setSmoothEdges ( bool  smoothEdges)
inline

Sets whether the triangles will look smooth.

Definition at line 81 of file qgs3dsceneexporter.h.

◆ setTerrainResolution()

void Qgs3DSceneExporter::setTerrainResolution ( int  resolution)
inline

Sets the terrain resolution.

Definition at line 96 of file qgs3dsceneexporter.h.

◆ setTerrainTextureResolution()

void Qgs3DSceneExporter::setTerrainTextureResolution ( int  resolution)
inline

Sets the terrain texture resolution.

Definition at line 101 of file qgs3dsceneexporter.h.

◆ smoothEdges()

bool Qgs3DSceneExporter::smoothEdges ( ) const
inline

Returns whether the triangles will look smooth.

Definition at line 83 of file qgs3dsceneexporter.h.

◆ terrainResolution()

int Qgs3DSceneExporter::terrainResolution ( ) const
inline

Returns the terrain resolution.

Definition at line 98 of file qgs3dsceneexporter.h.

◆ terrainTextureResolution()

int Qgs3DSceneExporter::terrainTextureResolution ( ) const
inline

Returns the terrain resolution.

Definition at line 103 of file qgs3dsceneexporter.h.


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