QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
qgschunkboundsentity_p.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgschunkboundsentity_p.cpp
3 --------------------------------------
4 Date : July 2017
5 Copyright : (C) 2017 by Martin Dobias
6 Email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
17#include "moc_qgschunkboundsentity_p.cpp"
18
19#include <Qt3DExtras/QPhongMaterial>
20
21#include "qgsaabb.h"
22#include "qgs3dwiredmesh_p.h"
23
24
26
27QgsChunkBoundsEntity::QgsChunkBoundsEntity( Qt3DCore::QNode *parent )
28 : Qt3DCore::QEntity( parent )
29{
30 mAabbMesh = new Qgs3DWiredMesh;
31 addComponent( mAabbMesh );
32
33 Qt3DExtras::QPhongMaterial *bboxesMaterial = new Qt3DExtras::QPhongMaterial;
34 bboxesMaterial->setAmbient( Qt::red );
35 addComponent( bboxesMaterial );
36}
37
38void QgsChunkBoundsEntity::setBoxes( const QList<QgsAABB> &bboxes )
39{
40 mAabbMesh->setVertices( bboxes );
41}
42