| 
    QGIS API Documentation
    3.26.3-Buenos Aires (65e4edfdad)
    
   | 
 
 
 
 
Go to the documentation of this file.
   31   : Qgs3DRenderContext( map )
 
   32   , mSymbol( std::move( symbol ) )
 
   33   , mZValueScale( zValueScale )
 
   34   , mZValueFixedOffset( zValueFixedOffset )
 
   35   , mCoordinateTransform( coordinateTransform )
 
   52   mFilteredOutCategories = categories;
 
   57   QSet<int> filteredOut;
 
   59     filteredOut.insert( category.value() );
 
   70   return mFeedback->isCanceled();
 
  107   return qobject_cast<QgsPointCloudLayer *>( mLayerRef.
layer );
 
  112   return QStringLiteral( 
"pointcloud" );
 
  153   QDomDocument doc = elem.ownerDocument();
 
  155   elem.setAttribute( QStringLiteral( 
"layer" ), mLayerRef.
layerId );
 
  157   elem.setAttribute( QStringLiteral( 
"show-bounding-boxes" ), 
showBoundingBoxes() ? QStringLiteral( 
"1" ) : QStringLiteral( 
"0" ) );
 
  158   elem.setAttribute( QStringLiteral( 
"point-budget" ), mPointBudget );
 
  160   QDomElement elemSymbol = doc.createElement( QStringLiteral( 
"symbol" ) );
 
  163     elemSymbol.setAttribute( QStringLiteral( 
"type" ), mSymbol->symbolType() );
 
  164     mSymbol->writeXml( elemSymbol, context );
 
  166   elem.appendChild( elemSymbol );
 
  171   mLayerRef = 
QgsMapLayerRef( elem.attribute( QStringLiteral( 
"layer" ) ) );
 
  173   const QDomElement elemSymbol = elem.firstChildElement( QStringLiteral( 
"symbol" ) );
 
  175   const QString symbolType = elemSymbol.attribute( QStringLiteral( 
"type" ) );
 
  176   mShowBoundingBoxes = elem.attribute( QStringLiteral( 
"show-bounding-boxes" ), QStringLiteral( 
"0" ) ).toInt();
 
  177   mMaximumScreenError = elem.attribute( QStringLiteral( 
"max-screen-error" ), QStringLiteral( 
"3.0" ) ).toDouble();
 
  178   mPointBudget = elem.attribute( QStringLiteral( 
"point-budget" ), QStringLiteral( 
"5000000" ) ).toInt();
 
  180   if ( symbolType == QLatin1String( 
"single-color" ) )
 
  182   else if ( symbolType == QLatin1String( 
"color-ramp" ) )
 
  184   else if ( symbolType == QLatin1String( 
"rgb" ) )
 
  186   else if ( symbolType == QLatin1String( 
"classification" ) )
 
  192     mSymbol->readXml( elemSymbol, context );
 
  202   return mMaximumScreenError;
 
  207   mMaximumScreenError = error;
 
  212   return mShowBoundingBoxes;
 
  222   mPointBudget = budget;
 
  
void cancelRendering() const
Cancels rendering.
 
QgsCoordinateReferenceSystem crs
 
bool convertFrom2DRenderer(QgsPointCloudRenderer *renderer) override
Updates the 3D renderer's symbol to match that of a given QgsPointCloudRenderer.
 
void setShowBoundingBoxes(bool showBoundingBoxes)
Sets whether bounding boxes will be visible when rendering the point cloud.
 
QgsCoordinateReferenceSystem crs() const
Returns coordinate reference system used in the 3D scene.
 
QString type() const override
Returns unique identifier of the renderer class (used to identify subclass)
 
3D symbol that draws point cloud geometries as 3D objects using RGB colors in the dataset
 
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
Writes renderer's properties to given XML element.
 
The class is used as a container of context for various read/write operations on other objects.
 
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
Reads renderer's properties from given XML element.
 
Point cloud layer specific subclass of QgsMapLayerElevationProperties.
 
Represents a map layer supporting display of point clouds.
 
Base class for all renderers that may to participate in 3D view.
 
void setCoordinateTransform(const QgsCoordinateTransform &coordinateTransform)
Sets the coordinate transform used to transform points from layer CRS to the map CRS.
 
QList< QgsPointCloudCategory > QgsPointCloudCategoryList
 
void setMaximumScreenError(double error)
Sets the maximum screen error allowed when rendering the point cloud.
 
Represents an individual category (class) from a QgsPointCloudClassifiedRenderer.
 
_LayerRef< QgsMapLayer > QgsMapLayerRef
 
Q_INVOKABLE QgsMapLayer * mapLayer(const QString &layerId) const
Retrieve a pointer to a registered layer by layer ID.
 
const QgsPointCloud3DSymbol * symbol() const
Returns 3D symbol associated with the renderer.
 
3D symbol that draws point cloud geometries as 3D objects.
 
QPointer< TYPE > layer
Weak pointer to map layer.
 
QgsCoordinateTransformContext transformContext() const
Returns the coordinate transform context, which stores various information regarding which datum tran...
 
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
 
QgsCoordinateTransform coordinateTransform() const
Returns the coordinate transform used to transform points from layer CRS to the map CRS.
 
void resolveReferences(const QgsProject &project) override
Resolves references to other objects - second phase of loading - after readXml()
 
QSet< int > getFilteredOutValues() const
Returns a set containing the filtered out values.
 
QString layerId
Original layer ID.
 
QgsPointCloudDataProvider * dataProvider() override
Returns the layer's data provider, it may be nullptr.
 
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
 
QgsPointCloudLayer3DRenderer * clone() const override
Returns a cloned instance.
 
void setLayer(TYPE *l)
Sets the reference to point to a specified layer.
 
double zScale() const
Returns the z scale, which is a scaling factor which should be applied to z values from the layer.
 
Base class for feedback objects to be used for cancellation of something running in a worker thread.
 
void setSymbol(QgsPointCloud3DSymbol *symbol)
Sets the 3D symbol associated with the renderer.
 
Collection of point cloud attributes.
 
QgsPointCloud3DRenderContext(const Qgs3DMapSettings &map, const QgsCoordinateTransform &coordinateTransform, std::unique_ptr< QgsPointCloud3DSymbol > symbol, double zValueScale, double zValueFixedOffset)
Constructor for QgsPointCloud3DRenderContext.
 
void copyBaseSettings(QgsAbstract3DSymbol *destination) const override
 
double maximumScreenError() const
Returns the maximum screen error allowed when rendering the point cloud.
 
QgsPointCloudLayer3DRenderer()
Takes ownership of the symbol object.
 
QgsPointCloudAttributeCollection attributes() const
Returns the attributes associated with the rendered block.
 
void setLayer(QgsPointCloudLayer *layer)
Sets point cloud layer associated with the renderer.
 
QgsPointCloudLayer * layer() const
Returns point cloud layer associated with the renderer.
 
3D symbol that draws point cloud geometries as 3D objects.using color ramp shader
 
QgsMapLayerElevationProperties * elevationProperties() override
Returns the layer's elevation properties.
 
void setAttributes(const QgsPointCloudAttributeCollection &attributes)
Sets the attributes associated with the rendered block.
 
bool showBoundingBoxes() const
Returns whether bounding boxes will be visible when rendering the point cloud.
 
Abstract base class for 2d point cloud renderers.
 
3D symbol that draws point cloud geometries as 3D objects.using one color
 
static std::unique_ptr< QgsPointCloudLayer3DRenderer > convert2DPointCloudRendererTo3D(QgsPointCloudRenderer *renderer)
Creates a QgsPointCloudLayer3DRenderer matching the symbol settings of a given QgsPointCloudRenderer.
 
void setFilteredOutCategories(const QgsPointCloudCategoryList &categories)
Sets the list of categories of the classification that won't be rendered.
 
QgsPointCloud3DSymbol * symbol() const
Returns the symbol used for rendering the point cloud.
 
void setPointRenderingBudget(int budget)
Sets the maximum number of points to be rendered in the scene.
 
double zOffset() const
Returns the z offset, which is a fixed offset amount which should be added to z values from the layer...
 
bool isCanceled() const
Returns true if the rendering is canceled.
 
3D renderer that renders all points from a point cloud layer
 
void setSymbol(QgsPointCloud3DSymbol *symbol)
Sets the symbol used for rendering the point cloud Takes ownership over the passed symbol.
 
Qt3DCore::QEntity * createEntity(const Qgs3DMapSettings &map) const override
Returns a 3D entity that will be used to show renderer's data in 3D scene.
 
virtual QgsPointCloudIndex * index() const
Returns the point cloud index associated with the provider.
 
3D symbol that draws point cloud geometries as 3D objects using classification of the dataset