QGIS API Documentation 3.39.0-Master (47f7b3a4989)
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
18#include <Qt3DExtras/QPhongMaterial>
19
20#include "qgsaabb.h"
21#include "qgs3dwiredmesh_p.h"
22
23
25
26QgsChunkBoundsEntity::QgsChunkBoundsEntity( Qt3DCore::QNode *parent )
27 : Qt3DCore::QEntity( parent )
28{
29 mAabbMesh = new Qgs3DWiredMesh;
30 addComponent( mAabbMesh );
31
32 Qt3DExtras::QPhongMaterial *bboxesMaterial = new Qt3DExtras::QPhongMaterial;
33 bboxesMaterial->setAmbient( Qt::red );
34 addComponent( bboxesMaterial );
35}
36
37void QgsChunkBoundsEntity::setBoxes( const QList<QgsAABB> &bboxes )
38{
39 mAabbMesh->setVertices( bboxes );
40}
41