diff options
author | Mike Krus <mike.krus@kdab.com> | 2020-01-22 16:15:24 +0000 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2020-02-11 06:09:02 +0000 |
commit | de168482e6acb4201d369b49b0b71ae0865a6470 (patch) | |
tree | d136f3f431d9eae99829e6b66b5b8f3eb2825b7f /src/render | |
parent | b828609440a4771838c242b3ad9962ecd7a2fe99 (diff) |
Remove old dead code
No more dubious agricultural jokes
Change-Id: If293ed080fc31c51f71d8632383eb7b5bb68ffb1
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/backend/render-backend.pri | 2 | ||||
-rw-r--r-- | src/render/backend/trianglesextractor.cpp | 80 | ||||
-rw-r--r-- | src/render/backend/trianglesextractor_p.h | 89 | ||||
-rw-r--r-- | src/render/frontend/qrenderaspect.cpp | 3 | ||||
-rw-r--r-- | src/render/jobs/calcgeometrytrianglevolumes.cpp | 71 | ||||
-rw-r--r-- | src/render/jobs/calcgeometrytrianglevolumes_p.h | 84 | ||||
-rw-r--r-- | src/render/jobs/jobs.pri | 2 |
7 files changed, 1 insertions, 330 deletions
diff --git a/src/render/backend/render-backend.pri b/src/render/backend/render-backend.pri index 4e46aa65b..7b5f3f068 100644 --- a/src/render/backend/render-backend.pri +++ b/src/render/backend/render-backend.pri @@ -20,7 +20,6 @@ HEADERS += \ $$PWD/boundingvolumedebug_p.h \ $$PWD/nodemanagers_p.h \ $$PWD/triangleboundingvolume_p.h \ - $$PWD/trianglesextractor_p.h \ $$PWD/buffervisitor_p.h \ $$PWD/bufferutils_p.h \ $$PWD/trianglesvisitor_p.h \ @@ -54,7 +53,6 @@ SOURCES += \ $$PWD/boundingvolumedebug.cpp \ $$PWD/nodemanagers.cpp \ $$PWD/triangleboundingvolume.cpp \ - $$PWD/trianglesextractor.cpp \ $$PWD/trianglesvisitor.cpp \ $$PWD/computecommand.cpp \ $$PWD/rendersettings.cpp \ diff --git a/src/render/backend/trianglesextractor.cpp b/src/render/backend/trianglesextractor.cpp deleted file mode 100644 index 2ddb425a0..000000000 --- a/src/render/backend/trianglesextractor.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Paul Lemire paul.lemire350@gmail.com -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "trianglesextractor_p.h" -#include <Qt3DCore/qentity.h> -#include <Qt3DRender/qgeometryrenderer.h> -#include <Qt3DRender/private/managers_p.h> -#include <Qt3DRender/private/nodemanagers_p.h> -#include <Qt3DRender/private/buffermanager_p.h> -#include <Qt3DRender/private/geometryrenderer_p.h> -#include <Qt3DRender/private/geometryrenderermanager_p.h> -#include <Qt3DRender/private/geometry_p.h> -#include <Qt3DRender/private/attribute_p.h> -#include <Qt3DRender/private/buffer_p.h> -#include <Qt3DRender/private/triangleboundingvolume_p.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DRender { -namespace Render { - -TrianglesExtractor::TrianglesExtractor(GeometryRenderer *renderer, NodeManagers *manager) - : TrianglesVisitor(manager) - , m_renderer(renderer) -{ -} - -QVector<RayCasting::QBoundingVolume *> TrianglesExtractor::extract(const Qt3DCore::QNodeId id) -{ - qDeleteAll(m_volumes); - apply(m_renderer, id); - return m_volumes; -} - -void TrianglesExtractor::visit(uint andx, const Vector3D &a, uint bndx, const Vector3D &b, uint cndx, const Vector3D &c) -{ - Q_UNUSED(andx); Q_UNUSED(bndx); Q_UNUSED(cndx); - m_volumes.push_back(new TriangleBoundingVolume(m_nodeId, a, b, c)); -} - -} // namespace Render -} // namespace Qt3DRender - -QT_END_NAMESPACE diff --git a/src/render/backend/trianglesextractor_p.h b/src/render/backend/trianglesextractor_p.h deleted file mode 100644 index df4c20466..000000000 --- a/src/render/backend/trianglesextractor_p.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Paul Lemire paul.lemire350@gmail.com -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3DRENDER_RENDER_TRIANGLESEXTRACTOR_P_H -#define QT3DRENDER_RENDER_TRIANGLESEXTRACTOR_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include "trianglesvisitor_p.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3DRender { -namespace RayCasting { -class QBoundingVolume; -} - -namespace Render { - -class Q_AUTOTEST_EXPORT TrianglesExtractor : private TrianglesVisitor -{ -public: - explicit TrianglesExtractor(GeometryRenderer *renderer, - NodeManagers *manager); - - QVector<RayCasting::QBoundingVolume *> extract(const Qt3DCore::QNodeId id); - -private: - void visit(uint andx, const Vector3D &a, - uint bndx, const Vector3D &b, - uint cndx, const Vector3D &c) override; - - GeometryRenderer *m_renderer; - QVector<RayCasting::QBoundingVolume *> m_volumes; -}; - -} // namespace Render - -} // namespace Qt3DRender - -QT_END_NAMESPACE - - -#endif // QT3DRENDER_RENDER_TRIANGLESEXTRACTOR_P_H diff --git a/src/render/frontend/qrenderaspect.cpp b/src/render/frontend/qrenderaspect.cpp index acfa8a5bb..61567854f 100644 --- a/src/render/frontend/qrenderaspect.cpp +++ b/src/render/frontend/qrenderaspect.cpp @@ -131,7 +131,6 @@ #include <Qt3DRender/private/raycaster_p.h> #include <Qt3DRender/private/boundingvolumedebug_p.h> #include <Qt3DRender/private/nodemanagers_p.h> -#include <Qt3DRender/private/calcgeometrytrianglevolumes_p.h> #include <Qt3DRender/private/handle_types_p.h> #include <Qt3DRender/private/buffermanager_p.h> #include <Qt3DRender/private/geometryrenderermanager_p.h> @@ -504,7 +503,7 @@ QVector<Qt3DCore::QAspectJobPtr> QRenderAspect::jobsToExecute(qint64 time) // 2 CalculateBoundingVolumeJob (depends on LoadBuffer) // 3 WorldTransformJob // 4 UpdateBoundingVolume, FramePreparationJob (depend on WorlTransformJob) - // 5 CalcGeometryTriangleVolumes (frame preparation job), RenderViewJobs + // 5 RenderViewJobs // 6 PickBoundingVolumeJob // 7 Cleanup Job (depends on RV) diff --git a/src/render/jobs/calcgeometrytrianglevolumes.cpp b/src/render/jobs/calcgeometrytrianglevolumes.cpp deleted file mode 100644 index eb31a25a6..000000000 --- a/src/render/jobs/calcgeometrytrianglevolumes.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "calcgeometrytrianglevolumes_p.h" -#include <Qt3DRender/private/trianglesextractor_p.h> -#include <Qt3DRender/private/nodemanagers_p.h> -#include <Qt3DRender/private/geometryrenderermanager_p.h> -#include <Qt3DRender/private/job_common_p.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DRender { -namespace Render { - -CalcGeometryTriangleVolumes::CalcGeometryTriangleVolumes(const Qt3DCore::QNodeId geometryRendererId, NodeManagers *manager) - : Qt3DCore::QAspectJob() - , m_geometryRendererId(geometryRendererId) - , m_manager(manager) -{ - SET_JOB_RUN_STAT_TYPE(this, JobTypes::CalcTriangleVolume, 0) -} - -void CalcGeometryTriangleVolumes::run() -{ - GeometryRenderer *renderer = m_manager->geometryRendererManager()->lookupResource(m_geometryRendererId); - if (renderer != nullptr) { - TrianglesExtractor extractor(renderer, m_manager); - renderer->setTriangleVolumes(extractor.extract(m_geometryRendererId)); - } -} - -} // namespace Render -} // namespace Qt3DRender - -QT_END_NAMESPACE diff --git a/src/render/jobs/calcgeometrytrianglevolumes_p.h b/src/render/jobs/calcgeometrytrianglevolumes_p.h deleted file mode 100644 index 205a23b25..000000000 --- a/src/render/jobs/calcgeometrytrianglevolumes_p.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt3D module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QT3DRENDER_RENDER_CALCGEOMETRYTRIANGLEVOLUMES_P_H -#define QT3DRENDER_RENDER_CALCGEOMETRYTRIANGLEVOLUMES_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of other Qt classes. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <Qt3DCore/qaspectjob.h> -#include <Qt3DCore/qnodeid.h> -#include <QSharedPointer> - -QT_BEGIN_NAMESPACE - -namespace Qt3DRender { -namespace Render { - -class Geometry; -class NodeManagers; - -class Q_AUTOTEST_EXPORT CalcGeometryTriangleVolumes : public Qt3DCore::QAspectJob -{ -public: - explicit CalcGeometryTriangleVolumes(const Qt3DCore::QNodeId geometryRendererId, NodeManagers *manager); - void run() override; - -private: - Qt3DCore::QNodeId m_geometryRendererId; - NodeManagers *m_manager; -}; - -typedef QSharedPointer<CalcGeometryTriangleVolumes> CalcGeometryTriangleVolumesPtr; - -} // namespace Render -} // namespace Qt3DRender - -QT_END_NAMESPACE - -#endif // QT3DRENDER_RENDER_CALCGEOMETRYTRIANGLEVOLUMES_P_H diff --git a/src/render/jobs/jobs.pri b/src/render/jobs/jobs.pri index eb89ab35e..07d6f4799 100644 --- a/src/render/jobs/jobs.pri +++ b/src/render/jobs/jobs.pri @@ -8,7 +8,6 @@ HEADERS += \ $$PWD/loadgeometryjob_p.h \ $$PWD/calcboundingvolumejob_p.h \ $$PWD/pickboundingvolumejob_p.h \ - $$PWD/calcgeometrytrianglevolumes_p.h \ $$PWD/computefilteredboundingvolumejob_p.h \ $$PWD/job_common_p.h \ $$PWD/filterlayerentityjob_p.h \ @@ -39,7 +38,6 @@ SOURCES += \ $$PWD/loadgeometryjob.cpp \ $$PWD/calcboundingvolumejob.cpp \ $$PWD/pickboundingvolumejob.cpp \ - $$PWD/calcgeometrytrianglevolumes.cpp \ $$PWD/computefilteredboundingvolumejob.cpp \ $$PWD/filterlayerentityjob.cpp \ $$PWD/frustumcullingjob.cpp \ |