QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QgsPoint3DSymbol Class Reference

3 More...

#include <qgspoint3dsymbol.h>

Inheritance diagram for QgsPoint3DSymbol:
Inheritance graph
[legend]

Public Member Functions

 QgsPoint3DSymbol ()
 Constructor for QgsPoint3DSymbol with default QgsMarkerSymbol as the billboardSymbol.
 
 QgsPoint3DSymbol (const QgsPoint3DSymbol &other)
 
 ~QgsPoint3DSymbol () override
 
Qgis::AltitudeClamping altitudeClamping () const
 Returns method that determines altitude (whether to clamp to feature to terrain)
 
float billboardHeight () const
 Returns how much the billboard should be elevated upwards.
 
QgsMarkerSymbolbillboardSymbol () const
 Returns a symbol for billboard.
 
QgsAbstract3DSymbolclone () const override
 Returns a new instance of the symbol with the same settings.
 
QList< Qgis::GeometryTypecompatibleGeometryTypes () const override
 Returns the list of the vector layer geometry types which are compatible with this symbol.
 
bool exportGeometries (Qgs3DSceneExporter *exporter, Qt3DCore::QEntity *entity, const QString &objectNamePrefix) const override
 Exports the geometries contained within the hierarchy of entity.
 
QgsAbstractMaterialSettingsmaterialSettings () const
 Returns material settings used for shading of the symbol.
 
void readXml (const QDomElement &elem, const QgsReadWriteContext &context) override
 Reads symbol configuration from the given DOM element.
 
void setAltitudeClamping (Qgis::AltitudeClamping altClamping)
 Sets method that determines altitude (whether to clamp to feature to terrain)
 
void setBillboardSymbol (QgsMarkerSymbol *symbol)
 Set symbol for billboard and the ownership is transferred.
 
void setDefaultPropertiesFromLayer (const QgsVectorLayer *layer) override
 Sets default properties for the symbol based on a layer's configuration.
 
void setMaterialSettings (QgsAbstractMaterialSettings *materialSettings)
 Sets the material settings used for shading of the symbol.
 
void setShape (Qgis::Point3DShape shape)
 Sets 3D shape for points.
 
void setShapeProperties (const QVariantMap &properties)
 Sets a key-value dictionary of point shape properties.
 
void setTransform (const QMatrix4x4 &transform)
 Sets transform for individual objects represented by the symbol.
 
Qgis::Point3DShape shape () const
 Returns 3D shape for points.
 
QVariantMap shapeProperties () const
 Returns a key-value dictionary of point shape properties.
 
QVariant shapeProperty (const QString &property) const
 Returns the value for a specific shape property.
 
QMatrix4x4 transform () const
 Returns transform for individual objects represented by the symbol.
 
QString type () const override
 Returns identifier of symbol type. Each 3D symbol implementation should return a different type.
 
void writeXml (QDomElement &elem, const QgsReadWriteContext &context) const override
 Writes symbol configuration to the given DOM element.
 
- Public Member Functions inherited from QgsAbstract3DSymbol
virtual ~QgsAbstract3DSymbol ()=default
 
QgsPropertyCollectiondataDefinedProperties ()
 Returns a reference to the symbol layer's property collection, used for data defined overrides.
 
const QgsPropertyCollectiondataDefinedProperties () const
 Returns a reference to the symbol layer's property collection, used for data defined overrides.
 
void setDataDefinedProperties (const QgsPropertyCollection &collection)
 Sets the symbol layer's property collection, used for data defined overrides.
 

Static Public Member Functions

static QgsAbstract3DSymbolcreate ()
 Creates a new QgsPoint3DSymbol.
 
static Qgis::Point3DShape shapeFromString (const QString &shape)
 Returns shape enum value from a string.
 
static QString shapeToString (Qgis::Point3DShape shape)
 Returns string from a shape enum value.
 
- Static Public Member Functions inherited from QgsAbstract3DSymbol
static const QgsPropertiesDefinitionpropertyDefinitions ()
 Returns the symbol layer property definitions.
 

Additional Inherited Members

- Public Types inherited from QgsAbstract3DSymbol
enum class  Property : int { Height = 0 , ExtrusionHeight }
 Data definable properties. More...
 
- Protected Member Functions inherited from QgsAbstract3DSymbol
virtual void copyBaseSettings (QgsAbstract3DSymbol *destination) const
 Copies base class settings from this object to a destination object.
 
- Protected Attributes inherited from QgsAbstract3DSymbol
QgsPropertyCollection mDataDefinedProperties
 

Detailed Description

3

3D symbol that draws point geometries as 3D objects using one of the predefined shapes.

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.

Definition at line 38 of file qgspoint3dsymbol.h.

Constructor & Destructor Documentation

◆ QgsPoint3DSymbol() [1/2]

QgsPoint3DSymbol::QgsPoint3DSymbol ( )

Constructor for QgsPoint3DSymbol with default QgsMarkerSymbol as the billboardSymbol.

Definition at line 40 of file qgspoint3dsymbol.cpp.

◆ QgsPoint3DSymbol() [2/2]

QgsPoint3DSymbol::QgsPoint3DSymbol ( const QgsPoint3DSymbol other)

Definition at line 50 of file qgspoint3dsymbol.cpp.

◆ ~QgsPoint3DSymbol()

QgsPoint3DSymbol::~QgsPoint3DSymbol ( )
overridedefault

Member Function Documentation

◆ altitudeClamping()

Qgis::AltitudeClamping QgsPoint3DSymbol::altitudeClamping ( ) const
inline

Returns method that determines altitude (whether to clamp to feature to terrain)

Definition at line 64 of file qgspoint3dsymbol.h.

◆ billboardHeight()

float QgsPoint3DSymbol::billboardHeight ( ) const

Returns how much the billboard should be elevated upwards.

Definition at line 279 of file qgspoint3dsymbol.cpp.

◆ billboardSymbol()

QgsMarkerSymbol * QgsPoint3DSymbol::billboardSymbol ( ) const

Returns a symbol for billboard.

Definition at line 349 of file qgspoint3dsymbol.cpp.

◆ clone()

QgsAbstract3DSymbol * QgsPoint3DSymbol::clone ( ) const
overridevirtual

Returns a new instance of the symbol with the same settings.

Implements QgsAbstract3DSymbol.

Definition at line 30 of file qgspoint3dsymbol.cpp.

◆ compatibleGeometryTypes()

QList< Qgis::GeometryType > QgsPoint3DSymbol::compatibleGeometryTypes ( ) const
overridevirtual

Returns the list of the vector layer geometry types which are compatible with this symbol.

Since
QGIS 3.16

Reimplemented from QgsAbstract3DSymbol.

Definition at line 123 of file qgspoint3dsymbol.cpp.

◆ create()

QgsAbstract3DSymbol * QgsPoint3DSymbol::create ( )
static

Creates a new QgsPoint3DSymbol.

Caller takes ownership of the returned symbol.

Definition at line 35 of file qgspoint3dsymbol.cpp.

◆ exportGeometries()

bool QgsPoint3DSymbol::exportGeometries ( Qgs3DSceneExporter exporter,
Qt3DCore::QEntity *  entity,
const QString &  objectNamePrefix 
) const
overridevirtual

Exports the geometries contained within the hierarchy of entity.

Returns whether any objects were exported

Reimplemented from QgsAbstract3DSymbol.

Definition at line 297 of file qgspoint3dsymbol.cpp.

◆ materialSettings()

QgsAbstractMaterialSettings * QgsPoint3DSymbol::materialSettings ( ) const

Returns material settings used for shading of the symbol.

Definition at line 284 of file qgspoint3dsymbol.cpp.

◆ readXml()

void QgsPoint3DSymbol::readXml ( const QDomElement &  elem,
const QgsReadWriteContext context 
)
overridevirtual

Reads symbol configuration from the given DOM element.

Implements QgsAbstract3DSymbol.

Definition at line 97 of file qgspoint3dsymbol.cpp.

◆ setAltitudeClamping()

void QgsPoint3DSymbol::setAltitudeClamping ( Qgis::AltitudeClamping  altClamping)
inline

Sets method that determines altitude (whether to clamp to feature to terrain)

Definition at line 66 of file qgspoint3dsymbol.h.

◆ setBillboardSymbol()

void QgsPoint3DSymbol::setBillboardSymbol ( QgsMarkerSymbol symbol)

Set symbol for billboard and the ownership is transferred.

Definition at line 354 of file qgspoint3dsymbol.cpp.

◆ setDefaultPropertiesFromLayer()

void QgsPoint3DSymbol::setDefaultPropertiesFromLayer ( const QgsVectorLayer layer)
overridevirtual

Sets default properties for the symbol based on a layer's configuration.

Since
QGIS 3.26

Reimplemented from QgsAbstract3DSymbol.

Definition at line 128 of file qgspoint3dsymbol.cpp.

◆ setMaterialSettings()

void QgsPoint3DSymbol::setMaterialSettings ( QgsAbstractMaterialSettings materialSettings)

Sets the material settings used for shading of the symbol.

Ownership of material is transferred to the symbol.

Definition at line 289 of file qgspoint3dsymbol.cpp.

◆ setShape()

void QgsPoint3DSymbol::setShape ( Qgis::Point3DShape  shape)
inline

Sets 3D shape for points.

Definition at line 86 of file qgspoint3dsymbol.h.

◆ setShapeProperties()

void QgsPoint3DSymbol::setShapeProperties ( const QVariantMap &  properties)
inline

Sets a key-value dictionary of point shape properties.

The available properties depend on the point shape().

Cylinders (Qgis.Point3DShape.Cylinder)

  • radius
  • length

Spheres (Qgis.Point3DShape.Sphere)

  • radius

Cones (Qgis.Point3DShape.Cone)

  • length
  • topRadius
  • bottomRadius

Cubes (Qgis.Point3DShape.Cube)

  • size

Torus (Qgis.Point3DShape.Torus)

  • radius
  • minorRadius

Flat Planes (Qgis.Point3DShape.Plane)

  • size

Extruded Text (Qgis.Point3DShape.ExtrudedText)

  • depth
  • text (string)

Models (Qgis.Point3DShape.Model)

  • model (path to model file)
See also
shapeProperty()

Definition at line 155 of file qgspoint3dsymbol.h.

◆ setTransform()

void QgsPoint3DSymbol::setTransform ( const QMatrix4x4 &  transform)
inline

Sets transform for individual objects represented by the symbol.

Definition at line 165 of file qgspoint3dsymbol.h.

◆ shape()

Qgis::Point3DShape QgsPoint3DSymbol::shape ( ) const
inline

Returns 3D shape for points.

Definition at line 84 of file qgspoint3dsymbol.h.

◆ shapeFromString()

Qgis::Point3DShape QgsPoint3DSymbol::shapeFromString ( const QString &  shape)
static

Returns shape enum value from a string.

Definition at line 137 of file qgspoint3dsymbol.cpp.

◆ shapeProperties()

QVariantMap QgsPoint3DSymbol::shapeProperties ( ) const
inline

Returns a key-value dictionary of point shape properties.

In most cases callers should use shapeProperty() instead, to correctly handle default values when a property has not been explicitly set.

See also
setShapeProperties() for a description of available properties.
shapeProperty()

Definition at line 98 of file qgspoint3dsymbol.h.

◆ shapeProperty()

QVariant QgsPoint3DSymbol::shapeProperty ( const QString &  property) const

Returns the value for a specific shape property.

This method accounts for default property values for the symbol's shape(), used when the property has not been explicitly set.

See also
setShapeProperties() for a description of available properties.
Since
QGIS 3.36

Definition at line 176 of file qgspoint3dsymbol.cpp.

◆ shapeToString()

QString QgsPoint3DSymbol::shapeToString ( Qgis::Point3DShape  shape)
static

Returns string from a shape enum value.

Definition at line 159 of file qgspoint3dsymbol.cpp.

◆ transform()

QMatrix4x4 QgsPoint3DSymbol::transform ( ) const
inline

Returns transform for individual objects represented by the symbol.

Definition at line 163 of file qgspoint3dsymbol.h.

◆ type()

QString QgsPoint3DSymbol::type ( ) const
inlineoverridevirtual

Returns identifier of symbol type. Each 3D symbol implementation should return a different type.

Implements QgsAbstract3DSymbol.

Definition at line 55 of file qgspoint3dsymbol.h.

◆ writeXml()

void QgsPoint3DSymbol::writeXml ( QDomElement &  elem,
const QgsReadWriteContext context 
) const
overridevirtual

Writes symbol configuration to the given DOM element.

Implements QgsAbstract3DSymbol.

Definition at line 63 of file qgspoint3dsymbol.cpp.


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