@@ -191,42 +191,9 @@ Qgs3DMapScene::Qgs3DMapScene( Qgs3DMapSettings &map, QgsAbstract3DEngine *engine
191
191
// listen to changes of layers in order to add/remove 3D renderer entities
192
192
connect ( &map, &Qgs3DMapSettings::layersChanged, this , &Qgs3DMapScene::onLayersChanged );
193
193
194
-
195
- #if 0
196
- ChunkedEntity *testChunkEntity = new ChunkedEntity( AABB( -500, 0, -500, 500, 100, 500 ), 2.f, 3.f, 7, new TestChunkLoaderFactory );
197
- testChunkEntity->setEnabled( false );
198
- testChunkEntity->setParent( this );
199
- chunkEntities << testChunkEntity;
200
- #endif
201
-
202
194
connect ( mCameraController , &QgsCameraController::cameraChanged, this , &Qgs3DMapScene::onCameraChanged );
203
195
connect ( mEngine , &QgsAbstract3DEngine::sizeChanged, this , &Qgs3DMapScene::onCameraChanged );
204
196
205
- #if 0
206
- // experiments with loading of existing 3D models.
207
-
208
- // scene loader only gets loaded only when added to a scene...
209
- // it loads everything: geometries, materials, transforms, lights, cameras (if any)
210
- Qt3DCore::QEntity *loaderEntity = new Qt3DCore::QEntity;
211
- Qt3DRender::QSceneLoader *loader = new Qt3DRender::QSceneLoader;
212
- loader->setSource( QUrl( "file:///home/martin/Downloads/LowPolyModels/tree.dae" ) );
213
- loaderEntity->addComponent( loader );
214
- loaderEntity->setParent( this );
215
-
216
- // mesh loads just geometry as one geometry...
217
- // so if there are different materials (e.g. colors) used in the model, this information is lost
218
- Qt3DCore::QEntity *meshEntity = new Qt3DCore::QEntity;
219
- Qt3DRender::QMesh *mesh = new Qt3DRender::QMesh;
220
- mesh->setSource( QUrl( "file:///home/martin/Downloads/LowPolyModels/tree.obj" ) );
221
- meshEntity->addComponent( mesh );
222
- Qt3DExtras::QPhongMaterial *material = new Qt3DExtras::QPhongMaterial;
223
- material->setAmbient( Qt::red );
224
- meshEntity->addComponent( material );
225
- Qt3DCore::QTransform *meshTransform = new Qt3DCore::QTransform;
226
- meshTransform->setScale( 1 );
227
- meshEntity->addComponent( meshTransform );
228
- meshEntity->setParent( this );
229
- #endif
230
197
onSkyboxSettingsChanged ();
231
198
232
199
// force initial update of chunked entities
0 commit comments