Skip to content
Permalink
Browse files

Qgs-ification of classes for chunked rendering

  • Loading branch information
wonder-sk committed Sep 26, 2017
1 parent 2a08a7f commit 894db92b2b2e06b0448cb715d262eb3c2792d144
Showing with 436 additions and 343 deletions.
  1. +15 −12 src/3d/CMakeLists.txt
  2. +0 −30 src/3d/chunks/chunkboundsentity.h
  3. +0 −22 src/3d/chunks/chunkloader.cpp
  4. +3 −3 src/3d/chunks/{chunkboundsentity.cpp → qgschunkboundsentity_p.cpp}
  5. +40 −0 src/3d/chunks/qgschunkboundsentity_p.h
  6. +58 −54 src/3d/chunks/{chunkedentity.cpp → qgschunkedentity_p.cpp}
  7. +36 −24 src/3d/chunks/{chunkedentity.h → qgschunkedentity_p.h}
  8. +18 −14 src/3d/chunks/{chunklist.cpp → qgschunklist_p.cpp}
  9. +34 −21 src/3d/chunks/{chunklist.h → qgschunklist_p.h}
  10. +13 −0 src/3d/chunks/qgschunkloader_p.cpp
  11. +55 −0 src/3d/chunks/qgschunkloader_p.h
  12. +45 −42 src/3d/chunks/{chunknode.cpp → qgschunknode_p.cpp}
  13. +32 −20 src/3d/chunks/{chunknode.h → qgschunknode_p.h}
  14. +14 −0 src/3d/chunks/qgschunkqueuejob_p.cpp
  15. +25 −50 src/3d/chunks/{chunkloader.h → qgschunkqueuejob_p.h}
  16. +12 −14 src/3d/qgs3dmapscene.cpp
  17. +2 −2 src/3d/qgs3dmapscene.h
  18. +1 −1 src/3d/terrain/qgsdemterraingenerator.cpp
  19. +1 −1 src/3d/terrain/qgsdemterraingenerator.h
  20. +2 −2 src/3d/terrain/qgsdemterraintileloader_p.cpp
  21. +1 −1 src/3d/terrain/qgsdemterraintileloader_p.h
  22. +4 −5 src/3d/terrain/qgsflatterraingenerator.cpp
  23. +1 −1 src/3d/terrain/qgsflatterraingenerator.h
  24. +10 −10 src/3d/terrain/qgsterrainentity_p.cpp
  25. +5 −5 src/3d/terrain/qgsterrainentity_p.h
  26. +2 −2 src/3d/terrain/qgsterraingenerator.h
  27. +3 −3 src/3d/terrain/qgsterraintileloader_p.cpp
  28. +3 −3 src/3d/terrain/qgsterraintileloader_p.h
  29. +1 −1 src/3d/terrain/quantizedmeshterraingenerator.h
@@ -13,11 +13,12 @@ SET(QGIS_3D_SRCS
qgstilingscheme.cpp
qgsvectorlayer3drenderer.cpp

chunks/chunkboundsentity.cpp
chunks/chunkedentity.cpp
chunks/chunklist.cpp
chunks/chunkloader.cpp
chunks/chunknode.cpp
chunks/qgschunkboundsentity_p.cpp
chunks/qgschunkedentity_p.cpp
chunks/qgschunklist_p.cpp
chunks/qgschunkloader_p.cpp
chunks/qgschunknode_p.cpp
chunks/qgschunkqueuejob_p.cpp

symbols/qgsabstract3dsymbol.cpp
symbols/qgsline3dsymbol.cpp
@@ -52,8 +53,9 @@ SET(QGIS_3D_MOC_HDRS
qgs3dmapsettings.h
qgscameracontroller.h

chunks/chunkedentity.h
chunks/chunkloader.h
chunks/qgschunkedentity_p.h
chunks/qgschunkloader_p.h
chunks/qgschunkqueuejob_p.h

terrain/qgsdemterraintileloader_p.h
terrain/qgsdemterraintilegeometry_p.h
@@ -83,11 +85,12 @@ SET(QGIS_3D_HDRS
qgstilingscheme.h
qgsvectorlayer3drenderer.h

chunks/chunkboundsentity.h
chunks/chunkedentity.h
chunks/chunklist.h
chunks/chunkloader.h
chunks/chunknode.h
chunks/qgschunkboundsentity_p.h
chunks/qgschunkedentity_p.h
chunks/qgschunklist_p.h
chunks/qgschunkloader_p.h
chunks/qgschunknode_p.h
chunks/qgschunkqueuejob_p.h

symbols/qgsabstract3dsymbol.h
symbols/qgsline3dsymbol.h

This file was deleted.

This file was deleted.

@@ -1,4 +1,4 @@
#include "chunkboundsentity.h"
#include "qgschunkboundsentity_p.h"

#include <Qt3DRender/QAttribute>
#include <Qt3DRender/QBuffer>
@@ -110,7 +110,7 @@ void AABBMesh::setBoxes( const QList<AABB> &bboxes )
// ----------------


ChunkBoundsEntity::ChunkBoundsEntity( Qt3DCore::QNode *parent )
QgsChunkBoundsEntity::QgsChunkBoundsEntity( Qt3DCore::QNode *parent )
: Qt3DCore::QEntity( parent )
{
aabbMesh = new AABBMesh;
@@ -121,7 +121,7 @@ ChunkBoundsEntity::ChunkBoundsEntity( Qt3DCore::QNode *parent )
addComponent( bboxesMaterial );
}

void ChunkBoundsEntity::setBoxes( const QList<AABB> &bboxes )
void QgsChunkBoundsEntity::setBoxes( const QList<AABB> &bboxes )
{
aabbMesh->setBoxes( bboxes );
}
@@ -0,0 +1,40 @@
#ifndef QGSCHUNKBOUNDSENTITY_P_H
#define QGSCHUNKBOUNDSENTITY_P_H

///@cond PRIVATE

//
// W A R N I N G
// -------------
//
// This file is not part of the QGIS API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//

#include <Qt3DCore/QEntity>

class AABB;
class AABBMesh;


/** \ingroup 3d
* Draws bounds of axis aligned bounding boxes
* \since QGIS 3.0
*/
class QgsChunkBoundsEntity : public Qt3DCore::QEntity
{
public:
//! Constructs the entity
QgsChunkBoundsEntity( Qt3DCore::QNode *parent = nullptr );

//! Sets a list of bounding boxes to be rendered by the entity
void setBoxes( const QList<AABB> &bboxes );

private:
AABBMesh *aabbMesh;
};

/// @endcond

#endif // QGSCHUNKBOUNDSENTITY_P_H

0 comments on commit 894db92

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