Skip to content
Permalink
Browse files

GUI for rule-based 3D renderer

  • Loading branch information
wonder-sk committed Jan 17, 2019
1 parent 5d05d46 commit 42f157f7ca7a7f5d5f71346968ff0a3d758e2919
@@ -27,6 +27,10 @@
#include "qgsabstract3dengine.h"
#include "qgsterraingenerator.h"

#include "qgsline3dsymbol.h"
#include "qgspoint3dsymbol.h"
#include "qgspolygon3dsymbol.h"


QImage Qgs3DUtils::captureSceneImage( QgsAbstract3DEngine &engine, Qgs3DMapScene *scene )
{
@@ -374,3 +378,18 @@ QgsVector3D Qgs3DUtils::transformWorldCoordinates( const QgsVector3D &worldPoint
return mapToWorldCoordinates( mapPoint2, origin2 );
}

QgsAbstract3DSymbol *Qgs3DUtils::symbolForGeometryType( QgsWkbTypes::GeometryType geomType )
{
switch ( geomType )
{
case QgsWkbTypes::PointGeometry:
return new QgsPoint3DSymbol;
case QgsWkbTypes::LineGeometry:
return new QgsLine3DSymbol;
case QgsWkbTypes::PolygonGeometry:
return new QgsPolygon3DSymbol;
default:
return nullptr;
}
}

@@ -22,6 +22,7 @@ class QgsLineString;
class QgsPolygon;

class QgsAbstract3DEngine;
class QgsAbstract3DSymbol;
class Qgs3DMapScene;

#include "qgs3dmapsettings.h"
@@ -99,6 +100,8 @@ class _3D_EXPORT Qgs3DUtils
//! Transforms a world point from (origin1, crs1) to (origin2, crs2)
static QgsVector3D transformWorldCoordinates( const QgsVector3D &worldPoint1, const QgsVector3D &origin1, const QgsCoordinateReferenceSystem &crs1, const QgsVector3D &origin2, const QgsCoordinateReferenceSystem &crs2,
const QgsCoordinateTransformContext &context );

static QgsAbstract3DSymbol *symbolForGeometryType( QgsWkbTypes::GeometryType geomType );
};

#endif

0 comments on commit 42f157f

Please sign in to comment.
You can’t perform that action at this time.