33 addEntityForSelectedLines( map, layer, symbol );
34 addEntityForNotSelectedLines( map, layer, symbol );
37 Qt3DExtras::QPhongMaterial *QgsLine3DSymbolEntity::material(
const QgsLine3DSymbol &symbol )
const 39 Qt3DExtras::QPhongMaterial *
material =
new Qt3DExtras::QPhongMaterial;
52 Qt3DExtras::QPhongMaterial *mat =
material( symbol );
64 QgsLine3DSymbolEntityNode *entity =
new QgsLine3DSymbolEntityNode( map, layer, symbol, req );
65 entity->addComponent( mat );
66 entity->setParent(
this );
72 Qt3DExtras::QPhongMaterial *mat =
material( symbol );
83 QgsLine3DSymbolEntityNode *entity =
new QgsLine3DSymbolEntityNode( map, layer, symbol, req );
84 entity->addComponent( mat );
85 entity->setParent(
this );
91 addComponent( renderer( map, symbol, layer, req ) );
102 double mitreLimit = 0;
104 QList<QgsPolygon *> polygons;
121 QgsAbstractGeometry *buffered = engine.buffer( symbol.
width() / 2., nSegments, endCapStyle, joinStyle, mitreLimit );
127 polygons.append( polyBuffered );
138 polygons.append( polyBuffered );
147 Qt3DRender::QGeometryRenderer *renderer =
new Qt3DRender::QGeometryRenderer;
148 renderer->setGeometry( mGeometry );
QgsFeatureRequest & setDestinationCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets the destination crs for feature's geometries.
AltitudeBinding altitudeBinding() const
Returns method that determines how altitude is bound to individual vertices.
Wrapper for iterator of features from vector data provider or vector layer.
float shininess() const
Returns shininess of the surface.
QColor selectionColor() const
Returns color used for selected features.
QgsCoordinateReferenceSystem crs() const
Returns coordinate reference system used in the 3D scene.
bool isNull() const
Returns true if the geometry is null (ie, contains no underlying geometry accessible via geometry() )...
static void clampAltitudes(QgsLineString *lineString, AltitudeClamping altClamp, AltitudeBinding altBind, const QgsPoint ¢roid, float height, const Qgs3DMapSettings &map)
Clamps altitude of vertices of a linestring according to the settings.
QSet< QgsFeatureId > QgsFeatureIds
QColor specular() const
Returns specular color component.
A class to represent a 2D point.
A geometry is the spatial representation of a feature.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
EndCapStyle
End cap styles for buffers.
double y() const
Returns Y coordinate.
3 Definition of the world
QgsVector3D origin() const
Returns coordinates in map CRS at which 3D scene has origin (0,0,0)
float height() const
Returns height (altitude) of the symbol (in map units)
QgsAbstract3DSymbol * clone() const override
Returns a new instance of the symbol with the same settings.
QgsCoordinateTransformContext transformContext() const
Returns the coordinate transform context, which stores various information regarding which datum tran...
float width() const
Returns width of the line symbol (in map units)
const QgsFeatureIds & selectedFeatureIds() const
Returns a list of the selected features IDs in this layer.
void setPolygons(const QList< QgsPolygon *> &polygons, const QgsPointXY &origin, float extrusionHeight, const QList< float > &extrusionHeightPerPolygon=QList< float >())
Initializes vertex buffer from given polygons. Takes ownership of passed polygon geometries.
3 Class derived from Qt3DRender::QGeometry that represents polygons tessellated into 3D geometry...
This class wraps a request for features to a vector layer (or directly its vector data provider)...
QgsPhongMaterialSettings material() const
Returns material used for shading of the symbol.
3 3D symbol that draws linestring geometries as planar polygons (created from lines using a buffer wi...
Abstract base class for all geometries.
QgsGeometry geometry() const
Returns the geometry associated with this feature.
Does vector analysis using the geos library and handles import, export, exception handling*...
QgsWkbTypes::Type wkbType() const
Returns the WKB type of the geometry.
int numGeometries() const
Returns the number of geometries within the collection.
QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const override
Query the layer for features specified in request.
const QgsAbstractGeometry * constGet() const
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
QgsFeatureRequest & setFilterFids(const QgsFeatureIds &fids)
Sets feature IDs that should be fetched.
Multi polygon geometry collection.
float extrusionHeight() const
Returns extrusion height (in map units)
static bool isCurvedType(Type type)
Returns true if the WKB type is a curved type or can contain curved geometries.
const QgsAbstractGeometry * geometryN(int n) const
Returns a const reference to a geometry from within the collection.
QColor ambient() const
Returns ambient color component.
AltitudeClamping altitudeClamping() const
Returns method that determines altitude (whether to clamp to feature to terrain)
QColor diffuse() const
Returns diffuse color component.
bool nextFeature(QgsFeature &f)
JoinStyle
Join styles for buffers.
Represents a vector layer which manages a vector based data sets.
virtual QgsFeatureIds allFeatureIds() const
Returns a list of all feature IDs for features present in the source.
static Type flatType(Type type)
Returns the flat type for a WKB type.
virtual QgsAbstractGeometry * segmentize(double tolerance=M_PI/180., SegmentationToleranceType toleranceType=MaximumAngle) const
Returns a version of the geometry without curves.
void setAmbient(const QColor &ambient)
Sets ambient color component.
double x() const
Returns X coordinate.