16#ifndef QGSRUBBERBAND3D_H
17#define QGSRUBBERBAND3D_H
48#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
57#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
62 class QGeometryRenderer;
76class _3D_EXPORT QgsRubberBand3D
101 void setWidth(
float width );
104 QColor color()
const;
107 void setColor( QColor color );
112 void setMarkerType( MarkerType marker );
117 MarkerType markerType()
const;
121 void addPoint(
const QgsPoint &pt );
125 void removeLastPoint();
127 void moveLastPoint(
const QgsPoint &pt );
130 void setHideLastMarker(
bool hide ) { mHideLastMarker = hide; }
132 bool isEmpty()
const {
return mLineString.isEmpty(); }
135 void updateGeometry();
136 void updateMarkerMaterial();
140 bool mHideLastMarker =
false;
147 MarkerType mMarkerType = Circle;
149 QColor mColor = Qt::red;
151 Qt3DCore::QEntity *mLineEntity =
nullptr;
152 Qt3DCore::QEntity *mMarkerEntity =
nullptr;
155 Qt3DRender::QGeometryRenderer *mLineGeomRenderer =
nullptr;
156#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
157 Qt3DRender::QGeometry *mGeometry =
nullptr;
158 Qt3DRender::QAttribute *mPositionAttribute =
nullptr;
159 Qt3DRender::QAttribute *mIndexAttribute =
nullptr;
161 Qt3DCore::QGeometry *mGeometry =
nullptr;
162 Qt3DCore::QAttribute *mPositionAttribute =
nullptr;
163 Qt3DCore::QAttribute *mIndexAttribute =
nullptr;
165 QgsLineMaterial *mLineMaterial =
nullptr;
168 Qt3DRender::QGeometryRenderer *mMarkerGeometryRenderer =
nullptr;
172 std::unique_ptr<QgsMarkerSymbol> mMarkerSymbol;
175 QgsRubberBand3D(
const QgsRubberBand3D & ) =
delete;
176 QgsRubberBand3D &operator=(
const QgsRubberBand3D & ) =
delete;
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Line string geometry type, with support for z-dimension and m-values.
A marker symbol type, for rendering Point and MultiPoint geometries.
Point geometry type, with support for z-dimension and m-values.