diff options
27 files changed, 0 insertions, 1888 deletions
diff --git a/src/collision/collision.pri b/src/collision/collision.pri deleted file mode 100644 index 5a9291fe4..000000000 --- a/src/collision/collision.pri +++ /dev/null @@ -1,24 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/qt3dcollision_global.h \ - $$PWD/qcollisionaspect.h \ - $$PWD/qcollisionaspect_p.h \ - $$PWD/qspherecollider.h \ - $$PWD/qspherecollider_p.h \ - $$PWD/qboxcollider.h \ - $$PWD/qboxcollider_p.h \ - $$PWD/qcapsulecollider.h \ - $$PWD/qcapsulecollider_p.h \ - $$PWD/qgeometrycollider.h \ - $$PWD/qgeometrycollider_p.h \ - $$PWD/qabstractcollider.h \ - $$PWD/qabstractcollider_p.h - -SOURCES += \ - $$PWD/qcollisionaspect.cpp \ - $$PWD/qspherecollider.cpp \ - $$PWD/qboxcollider.cpp \ - $$PWD/qcapsulecollider.cpp \ - $$PWD/qgeometrycollider.cpp \ - $$PWD/qabstractcollider.cpp diff --git a/src/collision/collision.pro b/src/collision/collision.pro deleted file mode 100644 index 4b3fecd18..000000000 --- a/src/collision/collision.pro +++ /dev/null @@ -1,18 +0,0 @@ -TARGET = Qt3DCollision -MODULE = 3dcollision -QT = core-private gui-private 3dcore 3dcore-private - -load(qt_module) - -DEFINES += QT3DCOLLISION_LIBRARY - -gcov { - CONFIG += static - QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage - QMAKE_LFLAGS += -fprofile-arcs -ftest-coverage -} - -# otherwise mingw headers do not declare common functions like ::strcasecmp -win32-g++*:QMAKE_CXXFLAGS_CXX11 = -std=gnu++0x - -include(collision.pri) diff --git a/src/collision/qabstractcollider.cpp b/src/collision/qabstractcollider.cpp deleted file mode 100644 index f9ed5a943..000000000 --- a/src/collision/qabstractcollider.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** 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 "qabstractcollider.h" -#include "qabstractcollider_p.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -/*! - \class Qt3DCollision::QAbstractColliderPrivate - \internal -*/ -QAbstractColliderPrivate::QAbstractColliderPrivate() - : QComponentPrivate() -{ -} - -/*! \internal */ -QAbstractCollider::QAbstractCollider(QAbstractColliderPrivate &dd, QNode *parent) - : QComponent(dd, parent) -{ -} - -QAbstractCollider::~QAbstractCollider() -{ - QNode::cleanup(); -} - -void QAbstractCollider::onEntered(QCollisionEvent *e) -{ - // TODO: Emit with other collider (or event for more info about the collision) - Q_UNUSED(e); - emit entered(Q_NULLPTR); -} - -void QAbstractCollider::onCollidingWith(QCollisionEvent *e) -{ - // TODO: Emit with other collider (or event for more info about the collision) - Q_UNUSED(e); - emit collidingWith(Q_NULLPTR); -} - -void QAbstractCollider::onExited(QCollisionEvent *e) -{ - // TODO: Emit with other collider (or event for more info about the collision) - Q_UNUSED(e); - emit exited(Q_NULLPTR); -} - -QT_END_NAMESPACE - -} // namespace Qt3DCollision - diff --git a/src/collision/qabstractcollider.h b/src/collision/qabstractcollider.h deleted file mode 100644 index e788c7b39..000000000 --- a/src/collision/qabstractcollider.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QABSTRACTCOLLIDER_H -#define QT3D_QABSTRACTCOLLIDER_H - -#include <Qt3DCore/qcomponent.h> -#include <Qt3DCollision/qt3dcollision_global.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QAbstractColliderPrivate; -class QCollisionEvent; - -class QT3DCOLLISIONSHARED_EXPORT QAbstractCollider : public Qt3DCore::QComponent -{ - Q_OBJECT - -public: - ~QAbstractCollider(); - -Q_SIGNALS: - void entered(QAbstractCollider *other); - void collidingWith(QAbstractCollider *other); - void exited(QAbstractCollider *other); - -protected: - QAbstractCollider(QAbstractColliderPrivate &dd, QNode *parent = 0); - - virtual void onEntered(QCollisionEvent *e); - virtual void onCollidingWith(QCollisionEvent *e); - virtual void onExited(QCollisionEvent *e); - -private: - Q_DECLARE_PRIVATE(QAbstractCollider) -}; - -} // namespace Qt3DCollision - -QT_END_NAMESPACE - -#endif // QT3D_QABSTRACTCOLLIDER_H diff --git a/src/collision/qabstractcollider_p.h b/src/collision/qabstractcollider_p.h deleted file mode 100644 index 3fe9ca92d..000000000 --- a/src/collision/qabstractcollider_p.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QABSTRACTCOLLIDER_P_H -#define QT3D_QABSTRACTCOLLIDER_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/private/qcomponent_p.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QAbstractCollider; - -class QAbstractColliderPrivate : public Qt3DCore::QComponentPrivate -{ -public: - QAbstractColliderPrivate(); - - Q_DECLARE_PUBLIC(QAbstractCollider) -}; - -} // namespace Qt3DCollision - -QT_END_NAMESPACE - -#endif // QT3D_QABSTRACTCOLLIDER_P_H - diff --git a/src/collision/qboxcollider.cpp b/src/collision/qboxcollider.cpp deleted file mode 100644 index a1fa76e21..000000000 --- a/src/collision/qboxcollider.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/**************************************************************************** -** -** 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 "qboxcollider.h" -#include "qboxcollider_p.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -/*! - \class Qt3DCollision::QBoxColliderPrivate - \internal -*/ -QBoxColliderPrivate::QBoxColliderPrivate() - : QAbstractColliderPrivate() - , m_center() - , m_radii(0.5f, 0.5f, 0.5f) // Unit cube -{ -} - -/*! - \class Qt3DCollision::QBoxCollider - \inmodule Qt3DCollision - \since 5.5 - \brief Represents a box used for collision detection -*/ - -/*! - \qmltype BoxCollider - \inqmlmodule Qt3D.Collision - \instantiates Qt3DCollision::QBoxCollider - \inherits Component3D - \since 5.5 -*/ - -/*! - Constructs a new QBoxCollider instance with parent \a parent. - */ -QBoxCollider::QBoxCollider(QNode *parent) - : QAbstractCollider(*new QBoxColliderPrivate, parent) -{ -} - -/*! \internal */ -QBoxCollider::QBoxCollider(QBoxColliderPrivate &dd, QNode *parent) - : QAbstractCollider(dd, parent) -{ -} - -QBoxCollider::~QBoxCollider() -{ - QNode::cleanup(); -} - -QVector3D QBoxCollider::center() const -{ - Q_D(const QBoxCollider); - return d->m_center; -} - -QVector3D QBoxCollider::radii() const -{ - Q_D(const QBoxCollider); - return d->m_radii; -} - -void QBoxCollider::setCenter(const QVector3D ¢er) -{ - Q_D(QBoxCollider); - if (d->m_center == center) - return; - - d->m_center = center; - emit centerChanged(center); -} - -void QBoxCollider::setRadii(const QVector3D &radii) -{ - Q_D(QBoxCollider); - if (d->m_radii == radii) - return; - - d->m_radii = radii; - emit radiiChanged(radii); -} - -QT_END_NAMESPACE - -} // namespace Qt3DCollision - diff --git a/src/collision/qboxcollider.h b/src/collision/qboxcollider.h deleted file mode 100644 index 4d435ec60..000000000 --- a/src/collision/qboxcollider.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QBOXCOLLIDER_H -#define QT3D_QBOXCOLLIDER_H - -#include <Qt3DCollision/qabstractcollider.h> -#include <Qt3DCollision/qt3dcollision_global.h> -#include <QtGui/qvector3d.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QBoxColliderPrivate; - -class QT3DCOLLISIONSHARED_EXPORT QBoxCollider : public QAbstractCollider -{ - Q_OBJECT - Q_PROPERTY(QVector3D center READ center WRITE setCenter NOTIFY centerChanged) - Q_PROPERTY(QVector3D radii READ radii WRITE setRadii NOTIFY radiiChanged) - -public: - explicit QBoxCollider(QNode *parent = 0); - ~QBoxCollider(); - - QVector3D center() const; - QVector3D radii() const; - -public Q_SLOTS: - void setCenter(const QVector3D ¢er); - void setRadii(const QVector3D &radii); - -Q_SIGNALS: - void centerChanged(QVector3D center); - void radiiChanged(QVector3D radii); - -protected: - QBoxCollider(QBoxColliderPrivate &dd, QNode *parent = 0); - -private: - Q_DECLARE_PRIVATE(QBoxCollider) - QT3D_CLONEABLE(QBoxCollider) -}; - -} // namespace Qt3DCollision - -QT_END_NAMESPACE - -#endif // QT3D_QBOXCOLLIDER_H diff --git a/src/collision/qboxcollider_p.h b/src/collision/qboxcollider_p.h deleted file mode 100644 index 03746c7d1..000000000 --- a/src/collision/qboxcollider_p.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QBOXCOLLIDER_P_H -#define QT3D_QBOXCOLLIDER_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 <Qt3DCollision/private/qabstractcollider_p.h> -#include <QtGui/QVector3D> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QBoxCollider; - -class QBoxColliderPrivate : public QAbstractColliderPrivate -{ - QBoxColliderPrivate(); - - Q_DECLARE_PUBLIC(QBoxCollider) - - QVector3D m_center; - QVector3D m_radii; -}; - -} // namespace Qt3DCollision - -QT_END_NAMESPACE - -#endif // QT3D_QBOXCOLLIDER_P_H - diff --git a/src/collision/qcapsulecollider.cpp b/src/collision/qcapsulecollider.cpp deleted file mode 100644 index c9aadd33b..000000000 --- a/src/collision/qcapsulecollider.cpp +++ /dev/null @@ -1,158 +0,0 @@ -/**************************************************************************** -** -** 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 "qcapsulecollider.h" -#include "qcapsulecollider_p.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -/*! - \class Qt3DCollision::QCapsuleColliderPrivate - \internal -*/ -QCapsuleColliderPrivate::QCapsuleColliderPrivate() - : QAbstractColliderPrivate() - , m_center() - , m_radius(1.0f) - , m_length(1.0f) - , m_axisDirection(QCapsuleCollider::YAxis) -{ -} - -/*! - \class Qt3DCollision::QCapsuleCollider - \inmodule Qt3DCollision - \since 5.5 - \brief Represents a capsule used for collision detection -*/ - -/*! - \qmltype CapsuleCollider - \inqmlmodule Qt3D.Collision - \instantiates Qt3DCollision::QCapsuleCollider - \inherits Component3D - \since 5.5 -*/ - -/*! - Constructs a new QCapsuleCollider instance with parent \a parent. - */ -QCapsuleCollider::QCapsuleCollider(QNode *parent) - : QAbstractCollider(*new QCapsuleColliderPrivate, parent) -{ -} - -/*! \internal */ -QCapsuleCollider::QCapsuleCollider(QCapsuleColliderPrivate &dd, QNode *parent) - : QAbstractCollider(dd, parent) -{ -} - -QCapsuleCollider::~QCapsuleCollider() -{ - QNode::cleanup(); -} - -QVector3D QCapsuleCollider::center() const -{ - Q_D(const QCapsuleCollider); - return d->m_center; -} - -float QCapsuleCollider::radius() const -{ - Q_D(const QCapsuleCollider); - return d->m_radius; -} - -float QCapsuleCollider::length() const -{ - Q_D(const QCapsuleCollider); - return d->m_length; -} - -QCapsuleCollider::Direction QCapsuleCollider::axisDirection() const -{ - Q_D(const QCapsuleCollider); - return d->m_axisDirection; -} - -void QCapsuleCollider::setCenter(const QVector3D ¢er) -{ - Q_D(QCapsuleCollider); - if (d->m_center == center) - return; - - d->m_center = center; - emit centerChanged(center); -} - -void QCapsuleCollider::setRadius(float radius) -{ - Q_D(QCapsuleCollider); - if (d->m_radius == radius) - return; - - d->m_radius = radius; - emit radiusChanged(radius); -} - -void QCapsuleCollider::setLength(float length) -{ - Q_D(QCapsuleCollider); - if (d->m_length == length) - return; - - d->m_length = length; - emit lengthChanged(length); -} - -void QCapsuleCollider::setAxisDirection(Qt3DCollision::QCapsuleCollider::Direction axisDirection) -{ - Q_D(QCapsuleCollider); - if (d->m_axisDirection == axisDirection) - return; - - d->m_axisDirection = axisDirection; - emit axisDirectionChanged(axisDirection); -} - -QT_END_NAMESPACE - -} // namespace Qt3DCollision - diff --git a/src/collision/qcapsulecollider.h b/src/collision/qcapsulecollider.h deleted file mode 100644 index 5804ea71c..000000000 --- a/src/collision/qcapsulecollider.h +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QCAPSULECOLLIDER_H -#define QT3D_QCAPSULECOLLIDER_H - -#include <Qt3DCollision/qabstractcollider.h> -#include <Qt3DCollision/qt3dcollision_global.h> -#include <QtGui/qvector3d.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QCapsuleColliderPrivate; - -class QT3DCOLLISIONSHARED_EXPORT QCapsuleCollider : public QAbstractCollider -{ - Q_OBJECT - Q_PROPERTY(QVector3D center READ center WRITE setCenter NOTIFY centerChanged) - Q_PROPERTY(float radius READ radius WRITE setRadius NOTIFY radiusChanged) - Q_PROPERTY(float length READ length WRITE setLength NOTIFY lengthChanged) - Q_PROPERTY(Direction axisDirection READ axisDirection WRITE setAxisDirection NOTIFY axisDirectionChanged) - -public: - explicit QCapsuleCollider(QNode *parent = 0); - ~QCapsuleCollider(); - - enum Direction { - XAxis, - YAxis, - ZAxis - }; - Q_ENUM(Direction) - - QVector3D center() const; - float radius() const; - float length() const; - Direction axisDirection() const; - -public Q_SLOTS: - void setCenter(const QVector3D ¢er); - void setRadius(float radius); - void setLength(float length); - void setAxisDirection(Qt3DCollision::QCapsuleCollider::Direction axisDirection); - -Q_SIGNALS: - void centerChanged(QVector3D center); - void radiusChanged(float radius); - void lengthChanged(float length); - void axisDirectionChanged(Qt3DCollision::QCapsuleCollider::Direction axisDirection); - -protected: - QCapsuleCollider(QCapsuleColliderPrivate &dd, QNode *parent = 0); - -private: - Q_DECLARE_PRIVATE(QCapsuleCollider) - QT3D_CLONEABLE(QCapsuleCollider) -}; - -} // namespace Qt3DCollision - -QT_END_NAMESPACE - -#endif // QT3D_QCAPSULECOLLIDER_H diff --git a/src/collision/qcapsulecollider_p.h b/src/collision/qcapsulecollider_p.h deleted file mode 100644 index bd6d7d783..000000000 --- a/src/collision/qcapsulecollider_p.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QCAPSULECOLLIDER_P_H -#define QT3D_QCAPSULECOLLIDER_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 <Qt3DCollision/private/qabstractcollider_p.h> -#include <QtGui/QVector3D> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QCapsuleCollider; - -class QCapsuleColliderPrivate : public QAbstractColliderPrivate -{ - QCapsuleColliderPrivate(); - - Q_DECLARE_PUBLIC(QCapsuleCollider) - - QVector3D m_center; - float m_radius; - float m_length; - QCapsuleCollider::Direction m_axisDirection; -}; - -} // namespace Qt3DCollision - -QT_END_NAMESPACE - -#endif // QT3D_QCAPSULECOLLIDER_P_H - diff --git a/src/collision/qcollisionaspect.cpp b/src/collision/qcollisionaspect.cpp deleted file mode 100644 index 33fa826eb..000000000 --- a/src/collision/qcollisionaspect.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/**************************************************************************** -** -** 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 "qcollisionaspect.h" -#include "qcollisionaspect_p.h" - -#include <Qt3DCore/qnodevisitor.h> -#include <Qt3DCore/qscenepropertychange.h> - -#include <Qt3DCore/qnode.h> -#include <Qt3DCore/private/qchangearbiter_p.h> -#include <Qt3DCore/private/qscene_p.h> -#include <Qt3DCore/qaspectfactory.h> -#include <Qt3DCore/qservicelocator.h> - -QT_BEGIN_NAMESPACE - -using namespace Qt3DCore; - -namespace Qt3DCollision { - -/*! - \class Qt3DCollision::QCollisionAspectPrivate - \internal -*/ -QCollisionAspectPrivate::QCollisionAspectPrivate() - : QAbstractAspectPrivate() - , m_time(0) -{ - m_aspectType = QAbstractAspect::AspectCollision; -} - -QCollisionAspect::QCollisionAspect(QObject *parent) - : QAbstractAspect(*new QCollisionAspectPrivate(), parent) -{ - registerBackendTypes(); -} - -/*! \internal */ -QCollisionAspect::QCollisionAspect(QCollisionAspectPrivate &dd, QObject *parent) - : QAbstractAspect(dd, parent) -{ - registerBackendTypes(); -} - -void QCollisionAspect::registerBackendTypes() -{ - //registerBackendType<QSphereCollider>(QBackendNodeFunctorPtr(new Collision::SphereColliderFunctor(d_func()->m_manager.data()))); -} - -QVector<Qt3DCore::QAspectJobPtr> QCollisionAspect::jobsToExecute(qint64 time) -{ - Q_D(QCollisionAspect); - d->m_time = time; - - // Create jobs that will get exectued by the threadpool - QVector<Qt3DCore::QAspectJobPtr> jobs; - return jobs; -} - -void QCollisionAspect::sceneNodeAdded(Qt3DCore::QSceneChangePtr &e) -{ - QScenePropertyChangePtr propertyChange = e.staticCast<Qt3DCore::QScenePropertyChange>(); - QNodePtr nodePtr = propertyChange->value().value<QNodePtr>(); - QNode *n = nodePtr.data(); - QNodeVisitor visitor; - visitor.traverse(n, this, &QCollisionAspect::visitNode); -} - -void QCollisionAspect::sceneNodeRemoved(Qt3DCore::QSceneChangePtr &e) -{ - QScenePropertyChangePtr propertyChange = e.staticCast<Qt3DCore::QScenePropertyChange>(); - QNodePtr nodePtr = propertyChange->value().value<Qt3DCore::QNodePtr>(); - QNode *n = nodePtr.data(); - QAbstractAspect::clearBackendNode(n); -} - -void QCollisionAspect::setRootEntity(Qt3DCore::QEntity *rootObject) -{ - Qt3DCore::QNodeVisitor visitor; - visitor.traverse(rootObject, this, &QCollisionAspect::visitNode); -} - -void QCollisionAspect::onInitialize(const QVariantMap &data) -{ - Q_UNUSED(data); -} - -void QCollisionAspect::onCleanup() -{ -} - -void QCollisionAspect::visitNode(Qt3DCore::QNode *node) -{ - QAbstractAspect::createBackendNode(node); -} - -} // Qt3DCollision - -QT_END_NAMESPACE - -QT3D_REGISTER_NAMESPACED_ASPECT("collision", QT_PREPEND_NAMESPACE(Qt3DCollision), QCollisionAspect) - diff --git a/src/collision/qcollisionaspect.h b/src/collision/qcollisionaspect.h deleted file mode 100644 index 36f79c68b..000000000 --- a/src/collision/qcollisionaspect.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QCOLLISIONASPECT_H -#define QT3D_QCOLLISIONASPECT_H - -#include <Qt3DCollision/qt3dcollision_global.h> -#include <Qt3DCore/qabstractaspect.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QCollisionAspectPrivate; - -class QT3DCOLLISIONSHARED_EXPORT QCollisionAspect : public Qt3DCore::QAbstractAspect -{ - Q_OBJECT -public: - explicit QCollisionAspect(QObject *parent = 0); - - QVector<Qt3DCore::QAspectJobPtr> jobsToExecute(qint64 time) Q_DECL_OVERRIDE; - - void sceneNodeAdded(Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE; - void sceneNodeRemoved(Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE; - -protected: - void registerBackendTypes(); - -private: - void setRootEntity(Qt3DCore::QEntity *rootObject) Q_DECL_OVERRIDE; - void onInitialize(const QVariantMap &data) Q_DECL_OVERRIDE; - void onCleanup() Q_DECL_OVERRIDE; - - void visitNode(Qt3DCore::QNode *node); - - Q_DECLARE_PRIVATE(QCollisionAspect) - QCollisionAspect(QCollisionAspectPrivate &dd, QObject *parent); -}; - -} - -QT_END_NAMESPACE - -#endif // QT3D_QCOLLISIONASPECT_H - diff --git a/src/collision/qcollisionaspect_p.h b/src/collision/qcollisionaspect_p.h deleted file mode 100644 index 3a6733fd8..000000000 --- a/src/collision/qcollisionaspect_p.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_COLLISION_QCOLLISIONASPECT_P_H -#define QT3D_COLLISION_QCOLLISIONASPECT_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/private/qabstractaspect_p.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QCollisionAspectPrivate : public Qt3DCore::QAbstractAspectPrivate -{ - QCollisionAspectPrivate(); - - Q_DECLARE_PUBLIC(QCollisionAspect) - - qint64 m_time; -}; - -} - -QT_END_NAMESPACE - -#endif // QT3D_COLLISION_QCOLLISIONASPECT_P_H - diff --git a/src/collision/qgeometrycollider.cpp b/src/collision/qgeometrycollider.cpp deleted file mode 100644 index 48ce072f7..000000000 --- a/src/collision/qgeometrycollider.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -** -** 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 "qgeometrycollider.h" -#include "qgeometrycollider_p.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -/*! - \class Qt3DCollision::QGeometryColliderPrivate - \internal -*/ -QGeometryColliderPrivate::QGeometryColliderPrivate() - : QAbstractColliderPrivate() -{ -} - -/*! - \class Qt3DCollision::QGeometryCollider - \inmodule Qt3DCollision - \since 5.5 - \brief Represents a geometric mesh used for collision detection -*/ - -/*! - \qmltype GeometryCollider - \inqmlmodule Qt3D.Collision - \instantiates Qt3DCollision::QGeometryCollider - \inherits Component3D - \since 5.5 -*/ - -/*! - Constructs a new QGeometryCollider instance with parent \a parent. - */ -QGeometryCollider::QGeometryCollider(QNode *parent) - : QAbstractCollider(*new QGeometryColliderPrivate, parent) -{ -} - -/*! \internal */ -QGeometryCollider::QGeometryCollider(QGeometryColliderPrivate &dd, QNode *parent) - : QAbstractCollider(dd, parent) -{ -} - -QGeometryCollider::~QGeometryCollider() -{ - QNode::cleanup(); -} - -QT_END_NAMESPACE - -} // namespace Qt3DCollision - diff --git a/src/collision/qgeometrycollider.h b/src/collision/qgeometrycollider.h deleted file mode 100644 index 893f097c0..000000000 --- a/src/collision/qgeometrycollider.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QGEOMETRYCOLLIDER_H -#define QT3D_QGEOMETRYCOLLIDER_H - -#include <Qt3DCollision/qabstractcollider.h> -#include <Qt3DCollision/qt3dcollision_global.h> -#include <QtGui/qvector3d.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QGeometryColliderPrivate; - -class QT3DCOLLISIONSHARED_EXPORT QGeometryCollider : public QAbstractCollider -{ - Q_OBJECT - // TODO: Add QAbstractGeometry * property to hold the mesh data. Can we reuse functors from render aspect? - -public: - explicit QGeometryCollider(QNode *parent = 0); - ~QGeometryCollider(); - -protected: - QGeometryCollider(QGeometryColliderPrivate &dd, QNode *parent = 0); - -private: - Q_DECLARE_PRIVATE(QGeometryCollider) - QT3D_CLONEABLE(QGeometryCollider) -}; - -} // namespace Qt3DCollision - -QT_END_NAMESPACE - -#endif // QT3D_QGEOMETRYCOLLIDER_H diff --git a/src/collision/qgeometrycollider_p.h b/src/collision/qgeometrycollider_p.h deleted file mode 100644 index 5bea72acb..000000000 --- a/src/collision/qgeometrycollider_p.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QGEOMETRYCOLLIDER_P_H -#define QT3D_QGEOMETRYCOLLIDER_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 <Qt3DCollision/private/qabstractcollider_p.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QGeometryCollider; - -class QGeometryColliderPrivate : public QAbstractColliderPrivate -{ - QGeometryColliderPrivate(); - - Q_DECLARE_PUBLIC(QGeometryCollider) -}; - -} // namespace Qt3DCollision - -QT_END_NAMESPACE - -#endif // QT3D_QGEOMETRYCOLLIDER_P_H - diff --git a/src/collision/qspherecollider.cpp b/src/collision/qspherecollider.cpp deleted file mode 100644 index 1f038da51..000000000 --- a/src/collision/qspherecollider.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/**************************************************************************** -** -** 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 "qspherecollider.h" -#include "qspherecollider_p.h" - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -/*! - \class Qt3DCollision::QSphereColliderPrivate - \internal -*/ -QSphereColliderPrivate::QSphereColliderPrivate() - : QAbstractColliderPrivate() - , m_center() - , m_radius(1.0f) -{ -} - -/*! - \class Qt3DCollision::QSphereCollider - \inmodule Qt3DCollision - \since 5.5 - \brief Represents a sphere used for collision detection -*/ - -/*! - \qmltype SphereCollider - \inqmlmodule Qt3D.Collision - \instantiates Qt3DCollision::QSphereCollider - \inherits Component3D - \since 5.5 -*/ - -/*! - Constructs a new QSphereCollider instance with parent \a parent. - */ -QSphereCollider::QSphereCollider(QNode *parent) - : QAbstractCollider(*new QSphereColliderPrivate, parent) -{ -} - -/*! \internal */ -QSphereCollider::QSphereCollider(QSphereColliderPrivate &dd, QNode *parent) - : QAbstractCollider(dd, parent) -{ -} - -QSphereCollider::~QSphereCollider() -{ - QNode::cleanup(); -} - -QVector3D QSphereCollider::center() const -{ - Q_D(const QSphereCollider); - return d->m_center; -} - -float QSphereCollider::radius() const -{ - Q_D(const QSphereCollider); - return d->m_radius; -} - -void QSphereCollider::setCenter(const QVector3D ¢er) -{ - Q_D(QSphereCollider); - if (d->m_center == center) - return; - - d->m_center = center; - emit centerChanged(center); -} - -void QSphereCollider::setRadius(float radius) -{ - Q_D(QSphereCollider); - if (d->m_radius == radius) - return; - - d->m_radius = radius; - emit radiusChanged(radius); -} - -} - -QT_END_NAMESPACE diff --git a/src/collision/qspherecollider.h b/src/collision/qspherecollider.h deleted file mode 100644 index 4e9cfc68d..000000000 --- a/src/collision/qspherecollider.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_QCOLLISIONCOMPONENT_H -#define QT3D_QCOLLISIONCOMPONENT_H - -#include <Qt3DCollision/qabstractcollider.h> -#include <Qt3DCollision/qt3dcollision_global.h> -#include <QtGui/qvector3d.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QSphereColliderPrivate; - -class QT3DCOLLISIONSHARED_EXPORT QSphereCollider : public QAbstractCollider -{ - Q_OBJECT - Q_PROPERTY(QVector3D center READ center WRITE setCenter NOTIFY centerChanged) - Q_PROPERTY(float radius READ radius WRITE setRadius NOTIFY radiusChanged) - -public: - explicit QSphereCollider(QNode *parent = 0); - ~QSphereCollider(); - - QVector3D center() const; - float radius() const; - -public Q_SLOTS: - void setCenter(const QVector3D ¢er); - void setRadius(float radius); - -Q_SIGNALS: - void centerChanged(QVector3D center); - void radiusChanged(float radius); - -protected: - QSphereCollider(QSphereColliderPrivate &dd, QNode *parent = 0); - -private: - Q_DECLARE_PRIVATE(QSphereCollider) - QT3D_CLONEABLE(QSphereCollider) -}; - -} - -QT_END_NAMESPACE - -#endif // QT3D_QCOLLISIONCOMPONENT_H diff --git a/src/collision/qspherecollider_p.h b/src/collision/qspherecollider_p.h deleted file mode 100644 index 78d9b0294..000000000 --- a/src/collision/qspherecollider_p.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** 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 QT3D_COLLISION_QSPHERECOLLIDER_P_H -#define QT3D_COLLISION_QSPHERECOLLIDER_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 <Qt3DCollision/private/qabstractcollider_p.h> -#include <QtGui/qvector3d.h> - -QT_BEGIN_NAMESPACE - -namespace Qt3DCollision { - -class QSphereCollider; - -class QSphereColliderPrivate : public QAbstractColliderPrivate -{ -public: - QSphereColliderPrivate(); - - Q_DECLARE_PUBLIC(QSphereCollider) - - QVector3D m_center; - float m_radius; -}; - -} // Qt3D - -QT_END_NAMESPACE - -#endif // QT3D_COLLISION_QSPHERECOLLIDER_P_H diff --git a/src/collision/qt3dcollision_global.h b/src/collision/qt3dcollision_global.h deleted file mode 100644 index a1a2706dd..000000000 --- a/src/collision/qt3dcollision_global.h +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** 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 QT3DCOLLISION_GLOBAL_H -#define QT3DCOLLISION_GLOBAL_H - -#include <QtCore/qglobal.h> - -QT_BEGIN_NAMESPACE - -#if defined(QT_SHARED) || !defined(QT_STATIC) -# if defined(QT3DCOLLISION_LIBRARY) -# define QT3DCOLLISIONSHARED_EXPORT Q_DECL_EXPORT -# else -# define QT3DCOLLISIONSHARED_EXPORT Q_DECL_IMPORT -# endif -#else -# define QT3DCOLLISIONSHARED_EXPORT -#endif - -QT_END_NAMESPACE - -#endif // QT3DCOLLISION_GLOBAL_H diff --git a/src/quick3d/imports/collision/importscollision.pro b/src/quick3d/imports/collision/importscollision.pro deleted file mode 100644 index 8225bd81b..000000000 --- a/src/quick3d/imports/collision/importscollision.pro +++ /dev/null @@ -1,15 +0,0 @@ -CXX_MODULE = qml -TARGET = quick3dcollisionplugin -TARGETPATH = Qt3D/Collision - -QT += core-private qml 3dcore 3dcollision - -OTHER_FILES += qmldir - -load(qml_plugin) - -HEADERS += \ - qt3dquick3dcollisionplugin.h - -SOURCES += \ - qt3dquick3dcollisionplugin.cpp diff --git a/src/quick3d/imports/collision/qmldir b/src/quick3d/imports/collision/qmldir deleted file mode 100644 index f81a3f2e4..000000000 --- a/src/quick3d/imports/collision/qmldir +++ /dev/null @@ -1,3 +0,0 @@ -module Qt3D.Collision -plugin quick3dcolisionplugin -classname Qt3DQuick3DCollisionPlugin diff --git a/src/quick3d/imports/collision/qt3dquick3dcollisionplugin.cpp b/src/quick3d/imports/collision/qt3dquick3dcollisionplugin.cpp deleted file mode 100644 index 25e3cce6e..000000000 --- a/src/quick3d/imports/collision/qt3dquick3dcollisionplugin.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** 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 <QtQml> -#include <Qt3DCollision/qabstractcollider.h> -#include <Qt3DCollision/qboxcollider.h> -#include <Qt3DCollision/qcapsulecollider.h> -#include <Qt3DCollision/qgeometrycollider.h> -#include <Qt3DCollision/qspherecollider.h> -#include "qt3dquick3dcollisionplugin.h" - -QT_BEGIN_NAMESPACE - -void Qt3DQuick3DCollisionPlugin::registerTypes(const char *uri) -{ - qmlRegisterUncreatableType<Qt3DCollision::QAbstractCollider>(uri, 2, 0, "AbstractCollider", "AbstractColliders are only used for references"); - qmlRegisterType<Qt3DCollision::QBoxCollider>(uri, 2, 0, "BoxCollider"); - qmlRegisterType<Qt3DCollision::QCapsuleCollider>(uri, 2, 0, "CapsuleCollider"); - qmlRegisterType<Qt3DCollision::QGeometryCollider>(uri, 2, 0, "GeometryCollider"); - qmlRegisterType<Qt3DCollision::QSphereCollider>(uri, 2, 0, "SphereCollider"); -} - -QT_END_NAMESPACE diff --git a/src/quick3d/imports/collision/qt3dquick3dcollisionplugin.h b/src/quick3d/imports/collision/qt3dquick3dcollisionplugin.h deleted file mode 100644 index e98fe25d6..000000000 --- a/src/quick3d/imports/collision/qt3dquick3dcollisionplugin.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** 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 QT3DQUICK3DCOLLISIONPLUGIN_H -#define QT3DQUICK3DCOLLISIONPLUGIN_H - -#include <QtQml/QQmlExtensionPlugin> - -QT_BEGIN_NAMESPACE - -class Qt3DQuick3DCollisionPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0") -public: - void registerTypes(const char *uri) Q_DECL_OVERRIDE; -}; - -QT_END_NAMESPACE - -#endif // QT3DQUICK3DCOLLISIONPLUGIN_H diff --git a/src/src.pro b/src/src.pro index 55bf6c13b..7dd028085 100644 --- a/src/src.pro +++ b/src/src.pro @@ -15,10 +15,6 @@ src_logic.subdir = $$PWD/logic src_logic.target = sub-logic src_logic.depends = src_core -src_collision.subdir = $$PWD/collision -src_collision.target = sub-collision -src_collision.depends = src_core - # Quick3D libs src_quick3d_core.subdir = $$PWD/quick3d/quick3d src_quick3d_core.target = sub-quick3d-core @@ -50,10 +46,6 @@ src_quick3d_imports_logic.file = $$PWD/quick3d/imports/logic/importslogic.pro src_quick3d_imports_logic.target = sub-quick3d-imports-logic src_quick3d_imports_logic.depends = src_logic -src_quick3d_imports_collision.file = $$PWD/quick3d/imports/collision/importscollision.pro -src_quick3d_imports_collision.target = sub-quick3d-imports-collision -src_quick3d_imports_collision.depends = src_collision - # Qt3D Scene Parser plugins src_plugins_sceneparsers.file = $$PWD/plugins/sceneparsers/sceneparsers.pro src_plugins_sceneparsers.target = sub-plugins-sceneparsers @@ -64,7 +56,6 @@ SUBDIRS += \ src_render \ src_input \ src_logic \ - src_collision \ src_quick3d_core \ src_quick3d_core_imports \ src_quick3d_render \ @@ -72,7 +63,6 @@ SUBDIRS += \ src_quick3d_imports_scene3d \ src_quick3d_imports_input \ src_quick3d_imports_logic \ - src_quick3d_imports_collision \ src_plugins_sceneparsers \ doc diff --git a/sync.profile b/sync.profile index 958a4a3ca..dd40b381e 100644 --- a/sync.profile +++ b/sync.profile @@ -5,7 +5,6 @@ "Qt3DQuickRender" => "$basedir/src/quick3d/quick3drender", "Qt3DInput" => "$basedir/src/input", "Qt3DLogic" => "$basedir/src/logic", - "Qt3DCollision" => "$basedir/src/collision", ); %moduleheaders = ( # restrict the module headers to those found in relative path ); |