diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-11-24 09:46:21 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@theqtcompany.com> | 2015-11-24 16:53:30 +0000 |
commit | 1bb0e00500574800d64808c9d80c9aa9dffac79b (patch) | |
tree | 5a5da5cb954c25db532781e90d5ee7f45c475f02 /src/render/framegraph | |
parent | 96719e0bc3e8c320c2e11d656499adf9640cca07 (diff) |
Add QFrustumCulling framegraph node
Change-Id: I6bdee01f898a477c4c24457de6ab774e03277365
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Diffstat (limited to 'src/render/framegraph')
-rw-r--r-- | src/render/framegraph/framegraph.pri | 6 | ||||
-rw-r--r-- | src/render/framegraph/qfrustumculling.cpp | 56 | ||||
-rw-r--r-- | src/render/framegraph/qfrustumculling.h | 61 |
3 files changed, 121 insertions, 2 deletions
diff --git a/src/render/framegraph/framegraph.pri b/src/render/framegraph/framegraph.pri index 52cad4319..01e5e3292 100644 --- a/src/render/framegraph/framegraph.pri +++ b/src/render/framegraph/framegraph.pri @@ -41,7 +41,8 @@ HEADERS += \ $$PWD/sortmethod_p.h \ $$PWD/statesetnode_p.h \ $$PWD/techniquefilternode_p.h \ - $$PWD/viewportnode_p.h + $$PWD/viewportnode_p.h \ + $$PWD/qfrustumculling.h SOURCES += \ $$PWD/cameraselectornode.cpp \ @@ -71,4 +72,5 @@ SOURCES += \ $$PWD/sortmethod.cpp \ $$PWD/statesetnode.cpp \ $$PWD/techniquefilternode.cpp \ - $$PWD/viewportnode.cpp + $$PWD/viewportnode.cpp \ + $$PWD/qfrustumculling.cpp diff --git a/src/render/framegraph/qfrustumculling.cpp b/src/render/framegraph/qfrustumculling.cpp new file mode 100644 index 000000000..4a8eefb49 --- /dev/null +++ b/src/render/framegraph/qfrustumculling.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qfrustumculling.h" + +QT_BEGIN_NAMESPACE + +namespace Qt3DRender { + +QFrustumCulling::QFrustumCulling(Qt3DCore::QNode *parent) + : QFrameGraphNode(parent) +{ +} + +QFrustumCulling::~QFrustumCulling() +{ + QFrameGraphNode::cleanup(); +} + +} // Qt3DRender + +QT_END_NAMESPACE + diff --git a/src/render/framegraph/qfrustumculling.h b/src/render/framegraph/qfrustumculling.h new file mode 100644 index 000000000..8d5008bef --- /dev/null +++ b/src/render/framegraph/qfrustumculling.h @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt3D module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QT3DRENDER_QFRUSTUMCULLING_H +#define QT3DRENDER_QFRUSTUMCULLING_H + +#include <Qt3DRender/qframegraphnode.h> + +QT_BEGIN_NAMESPACE + +namespace Qt3DRender { + +class QT3DRENDERSHARED_EXPORT QFrustumCulling : public QFrameGraphNode +{ + Q_OBJECT +public: + explicit QFrustumCulling(Qt3DCore::QNode *parent = Q_NULLPTR); + ~QFrustumCulling(); + +private: + QT3D_CLONEABLE(QFrustumCulling) +}; + +} // Qt3DRender + +QT_END_NAMESPACE + +#endif // QT3DRENDER_QFRUSTUMCULLING_H |