Skip to content
Permalink
Browse files

Replace some qDebug() calls in 3d/point cloud code with more appropriate

logging calls
  • Loading branch information
nyalldawson committed Nov 12, 2020
1 parent 9fe4783 commit b4397c8d3bca12e708ed1462263ebf4f53c352cc
@@ -185,7 +185,13 @@ void QgsChunkedEntity::update( const SceneState &state )
if ( pendingJobsCount() != oldJobsCount )
emit pendingJobsCountChanged();

// qDebug() << "update: active " << mActiveNodes.count() << " enabled " << enabled << " disabled " << disabled << " | culled " << mFrustumCulled << " | loading " << mChunkLoaderQueue->count() << " loaded " << mReplacementQueue->count() << " | unloaded " << unloaded << " elapsed " << t.elapsed() << "ms";
QgsDebugMsgLevel( QStringLiteral( "update: active %1 enabled %2 disabled %3 | culled %4 | loading %5 loaded %6 | unloaded %7 elapsed %8ms" ).arg( mActiveNodes.count() )
.arg( enabled )
.arg( disabled )
.arg( mFrustumCulled )
.arg( mReplacementQueue->count() )
.arg( unloaded )
.arg( t.elapsed() ), 2 );
}

void QgsChunkedEntity::setShowBoundingBoxes( bool enabled )
@@ -259,7 +265,7 @@ void QgsChunkedEntity::update( QgsChunkNode *node, const SceneState &state )
return;
}

//qDebug() << node->tileX() << "|" << node->tileY() << "|" << node->tileZ() << " " << mTau << " " << screenSpaceError(node, state);
//QgsDebugMsgLevel( QStringLiteral( "%1|%2|%3 %4 %5" ).arg( node->tileX() ).arg( node->tileY() ).arg( node->tileZ() ).arg( mTau ).arg( screenSpaceError( node, state ) ), 2 );

if ( mTau > 0 && screenSpaceError( node, state ) <= mTau )
{
@@ -16,7 +16,6 @@
#include "qgs3dexportobject.h"

#include <QVector3D>
#include <QDebug>
#include <QDir>
#include <QImage>

@@ -440,7 +440,7 @@ bool Qgs3DMapScene::updateCameraNearFarPlanes()
{
// the update didn't work out... this should not happen
// well at least temporarily use some conservative starting values
qDebug() << "oops... this should not happen! couldn't determine near/far plane. defaulting to 1...1e9";
qWarning() << "oops... this should not happen! couldn't determine near/far plane. defaulting to 1...1e9";
fnear = 1;
ffar = 1e9;
}
@@ -456,7 +456,7 @@ bool Qgs3DMapScene::updateCameraNearFarPlanes()
}
}
else
qDebug() << "no terrain - not setting near/far plane";
qWarning() << "no terrain - not setting near/far plane";

return false;
}
@@ -370,7 +370,7 @@ void Qgs3DUtils::extractPointPositions( const QgsFeature &f, const Qgs3DMapSetti
break;
}
positions.append( QVector3D( pt.x() - map.origin().x(), h, -( pt.y() - map.origin().y() ) ) );
//qDebug() << positions.last();
QgsDebugMsgLevel( QStringLiteral( "%1 %2 %3" ).arg( positions.last().x() ).arg( positions.last().y() ).arg( positions.last().z() ), 2 );
}
}

@@ -251,7 +251,7 @@ void QgsCameraController::updateCameraFromPose( bool centerPointChanged )
if ( std::isnan( mCameraPose.centerPoint().x() ) || std::isnan( mCameraPose.centerPoint().y() ) || std::isnan( mCameraPose.centerPoint().z() ) )
{
// something went horribly wrong but we need to at least try to fix it somehow
qDebug() << "camera position got NaN!";
qWarning() << "camera position got NaN!";
mCameraPose.setCenterPoint( QgsVector3D( 0, 0, 0 ) );
}

@@ -14,6 +14,7 @@
***************************************************************************/

#include "qgsoffscreen3dengine.h"
#include "qgslogger.h"

#include <QOffscreenSurface>
#include <QSurfaceFormat>
@@ -239,7 +240,7 @@ void QgsOffscreen3DEngine::requestCaptureImage()
{
if ( mReply )
{
qDebug() << "already having a pending capture, skipping";
QgsDebugMsgLevel( QStringLiteral( "already having a pending capture, skipping" ), 2 );
return;
}
mReply = mRenderCapture->requestCapture();
@@ -175,7 +175,7 @@ QgsVectorLayerChunkedEntity::~QgsVectorLayerChunkedEntity()

void QgsVectorLayerChunkedEntity::onTerrainElevationOffsetChanged( float newOffset )
{
qDebug() << "QgsVectorLayerChunkedEntity::onTerrainElevationOffsetChanged";
QgsDebugMsgLevel( QStringLiteral( "QgsVectorLayerChunkedEntity::onTerrainElevationOffsetChanged" ), 2 );
mTransform->setTranslation( QVector3D( 0.0f, newOffset, 0.0f ) );
}

@@ -207,7 +207,7 @@ void QgsPolygon3DSymbolHandler::processFeature( const QgsFeature &f, const Qgs3D
}
}
else
qDebug() << "not a polygon";
qWarning() << "not a polygon";
}


@@ -53,7 +53,7 @@ int QgsTerrainTextureGenerator::render( const QgsRectangle &extent, QgsChunkNode
jobData.debugText = debugText;

mJobs.insert( job, jobData );
//qDebug() << "added job: " << jobData.jobId << " .... in queue: " << jobs.count();
// QgsDebugMsgLevel( QStringLiteral("added job: %1 .... in queue: %2").arg( jobData.jobId ).arg( jobs.count() ), 2);
return jobData.jobId;
}

@@ -63,7 +63,7 @@ void QgsTerrainTextureGenerator::cancelJob( int jobId )
{
if ( jd.jobId == jobId )
{
//qDebug() << "canceling job " << jobId;
// QgsDebugMsgLevel( QStringLiteral("canceling job %1").arg( jobId ), 2 );
jd.job->cancelWithoutBlocking();
disconnect( jd.job, &QgsMapRendererJob::finished, this, &QgsTerrainTextureGenerator::onRenderingFinished );
jd.job->deleteLater();
@@ -130,7 +130,7 @@ void QgsTerrainTextureGenerator::onRenderingFinished()
mapJob->deleteLater();
mJobs.remove( mapJob );

//qDebug() << "finished job " << jobData.jobId << " ... in queue: " << jobs.count();
// QgsDebugMsgLevel( QStringLiteral("finished job %1 ... in queue: %2").arg( jobData.jobId).arg( jobs.count() ), 2 );

QgsEventTracing::addEvent( QgsEventTracing::AsyncEnd, QStringLiteral( "3D" ), QStringLiteral( "Texture" ), jobData.tileId.text() );

0 comments on commit b4397c8

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