summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/quick3d/imports/bulletphysics/bulletphysics.pro15
-rw-r--r--src/quick3d/imports/bulletphysics/qmldir3
-rw-r--r--src/quick3d/imports/bulletphysics/qt3dquick3dbulletphysicsplugin.cpp60
-rw-r--r--src/quick3d/imports/bulletphysics/qt3dquick3dbulletphysicsplugin.h59
-rw-r--r--src/quick3d/imports/imports.pro5
-rw-r--r--src/quick3d/quick3d.pro6
-rw-r--r--src/quick3d/quick3dbulletphysics/items/items.pri5
-rw-r--r--src/quick3d/quick3dbulletphysics/qt3dquickbulletphysics_global.h57
-rw-r--r--src/quick3d/quick3dbulletphysics/quick3dbulletphysics.pro28
-rw-r--r--sync.profile1
10 files changed, 234 insertions, 5 deletions
diff --git a/src/quick3d/imports/bulletphysics/bulletphysics.pro b/src/quick3d/imports/bulletphysics/bulletphysics.pro
new file mode 100644
index 000000000..9b63c67ec
--- /dev/null
+++ b/src/quick3d/imports/bulletphysics/bulletphysics.pro
@@ -0,0 +1,15 @@
+CXX_MODULE = qml
+TARGET = quick3dbulletphysicsplugin
+TARGETPATH = Qt3D/BulletPhysics
+
+QT += core-private qml 3dcore 3dbulletphysics 3dquick
+
+HEADERS += \
+ qt3dquick3dbulletphysicsplugin.h
+
+SOURCES += \
+ qt3dquick3dbulletphysicsplugin.cpp
+
+OTHER_FILES += qmldir
+
+load(qml_plugin)
diff --git a/src/quick3d/imports/bulletphysics/qmldir b/src/quick3d/imports/bulletphysics/qmldir
new file mode 100644
index 000000000..51cb48726
--- /dev/null
+++ b/src/quick3d/imports/bulletphysics/qmldir
@@ -0,0 +1,3 @@
+module Qt3D.BulletPhysics
+plugin quick3dbulletphysicsplugin
+classname Qt3DQuick3DBulletPhysicsPlugin
diff --git a/src/quick3d/imports/bulletphysics/qt3dquick3dbulletphysicsplugin.cpp b/src/quick3d/imports/bulletphysics/qt3dquick3dbulletphysicsplugin.cpp
new file mode 100644
index 000000000..7d547c356
--- /dev/null
+++ b/src/quick3d/imports/bulletphysics/qt3dquick3dbulletphysicsplugin.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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: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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 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 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQml>
+#include "qt3dquick3dbulletphysicsplugin.h"
+
+#include <Qt3DBulletPhysics/qabstractcollider.h>
+#include <Qt3DBulletPhysics/qspherecollider.h>
+#include <Qt3DBulletPhysics/rigidbody.h>
+
+QT_BEGIN_NAMESPACE
+
+void Qt3DQuick3DBulletPhysicsPlugin::registerTypes(const char *uri)
+{
+ qmlRegisterInterface<Qt3D::BulletPhysics::QAbstractCollider>("QAbstractCollider");
+ qmlRegisterType<Qt3D::BulletPhysics::QSphereCollider>(uri, 2, 0, "SphereCollider");
+ qmlRegisterType<Qt3D::BulletPhysics::RigidBody>(uri, 2, 0, "RigidBody");
+}
+
+QT_END_NAMESPACE
+
+
diff --git a/src/quick3d/imports/bulletphysics/qt3dquick3dbulletphysicsplugin.h b/src/quick3d/imports/bulletphysics/qt3dquick3dbulletphysicsplugin.h
new file mode 100644
index 000000000..49c66633c
--- /dev/null
+++ b/src/quick3d/imports/bulletphysics/qt3dquick3dbulletphysicsplugin.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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: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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 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 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3DQUICK3DRENDERPLUGIN_H
+#define QT3DQUICK3DRENDERPLUGIN_H
+
+#include <QtQml/QQmlExtensionPlugin>
+
+QT_BEGIN_NAMESPACE
+
+class Qt3DQuick3DBulletPhysicsPlugin : 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 // QT3DQUICK3DRENDERPLUGIN_H
diff --git a/src/quick3d/imports/imports.pro b/src/quick3d/imports/imports.pro
index 415f533d9..101efd3d6 100644
--- a/src/quick3d/imports/imports.pro
+++ b/src/quick3d/imports/imports.pro
@@ -3,6 +3,7 @@ CONFIG += ordered
qtHaveModule(3dcore) {
SUBDIRS+= \
- core \
- render
+ core \
+ render \
+ bulletphysics
}
diff --git a/src/quick3d/quick3d.pro b/src/quick3d/quick3d.pro
index 90204568d..92bbeec80 100644
--- a/src/quick3d/quick3d.pro
+++ b/src/quick3d/quick3d.pro
@@ -1,6 +1,6 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS += \
- quick3d \
- quick3drenderer \
- imports
+ quick3d \
+ quick3drenderer \
+ imports
diff --git a/src/quick3d/quick3dbulletphysics/items/items.pri b/src/quick3d/quick3dbulletphysics/items/items.pri
new file mode 100644
index 000000000..e4d92bb8f
--- /dev/null
+++ b/src/quick3d/quick3dbulletphysics/items/items.pri
@@ -0,0 +1,5 @@
+#HEADERS +=
+
+#SOURCES +=
+
+INCLUDEPATH += $$PWD
diff --git a/src/quick3d/quick3dbulletphysics/qt3dquickbulletphysics_global.h b/src/quick3d/quick3dbulletphysics/qt3dquickbulletphysics_global.h
new file mode 100644
index 000000000..9272fd6df
--- /dev/null
+++ b/src/quick3d/quick3dbulletphysics/qt3dquickbulletphysics_global.h
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 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: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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 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 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QT3DQUICKBULLETPHYSICS_GLOBAL_H
+#define QT3DQUICKBULLETPHYSICS_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+#if defined(QT3DQUICKBULLETPHYSICS_LIBRARY)
+# define QT3DQUICKBULLETPHYSICSSHARED_EXPORT Q_DECL_EXPORT
+#else
+# define QT3DQUICKBULLETPHYSICSSHARED_EXPORT Q_DECL_IMPORT
+#endif
+
+QT_END_NAMESPACE
+
+#endif // QT3DQUICKBULLETPHYSICS_GLOBAL_H
diff --git a/src/quick3d/quick3dbulletphysics/quick3dbulletphysics.pro b/src/quick3d/quick3dbulletphysics/quick3dbulletphysics.pro
new file mode 100644
index 000000000..f0a25d703
--- /dev/null
+++ b/src/quick3d/quick3dbulletphysics/quick3dbulletphysics.pro
@@ -0,0 +1,28 @@
+TARGET = Qt3DQuickBulletPhysics
+
+QT += core core-private qml quick 3dcore 3dbulletphysics 3dquick
+
+DEFINES += QT3DQUICKBULLETPHYSICS_LIBRARY
+
+MODULE = 3dquickbulletphysics
+
+load(qt_module)
+
+gcov {
+ CONFIG += static
+ QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
+ QMAKE_LFLAGS += -fprofile-arcs -ftest-coverage
+} else {
+ CONFIG += dll
+}
+
+HEADERS += $$PRIVATE_HEADERS \
+ qt3dquickbulletphysics_global.h
+
+!contains(QT_CONFIG, egl):DEFINES += QT_NO_EGL
+
+# otherwise mingw headers do not declare common functions like ::strcasecmp
+win32-g++*:QMAKE_CXXFLAGS_CXX11 = -std=gnu++0x
+
+include(./items/items.pri)
+
diff --git a/sync.profile b/sync.profile
index d4dbca743..e08f8fd55 100644
--- a/sync.profile
+++ b/sync.profile
@@ -5,6 +5,7 @@
"Qt3DQuickRenderer" => "$basedir/src/quick3d/quick3drenderer",
"Qt3DOpenAL" => "$basedir/src/openal",
"Qt3DBulletPhysics" => "$basedir/src/bulletphysics",
+ "Qt3DQuickBulletPhysics" => "$basedir/src/quick3d/quick3dbulletphysics",
);
%moduleheaders = ( # restrict the module headers to those found in relative path
);