24#include "moc_qgschunkboundsentity_p.cpp"
28QgsChunkBoundsEntity::QgsChunkBoundsEntity(
const QgsVector3D &vertexDataOrigin, Qt3DCore::QNode *parent )
30 , mVertexDataOrigin( vertexDataOrigin )
32 mAabbMesh =
new Qgs3DWiredMesh;
33 addComponent( mAabbMesh );
35 auto *bboxesMaterial =
new QgsUnlitMaterial();
36 bboxesMaterial->setColor( Qt::red );
37 bboxesMaterial->setCastsShadows(
false );
38 addComponent( bboxesMaterial );
40 QgsGeoTransform *transform =
new QgsGeoTransform;
41 transform->setGeoTranslation( mVertexDataOrigin );
42 addComponent( transform );
45void QgsChunkBoundsEntity::setBoxes(
const QList<QgsBox3D> &bboxes )
47 QList<QgsAABB> aabbBoxes;
52 mAabbMesh->setVertices( aabbBoxes );
static QgsAABB fromBox3D(const QgsBox3D &box3D, const QgsVector3D &origin)
Constructs bounding box from QgsBox3D by subtracting origin 3D vector.
A 3-dimensional box composed of x, y, z coordinates.
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...