1 | // Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include "qabstractcollisionqueryservice_p.h" |
5 | |
6 | #include "qcollisionqueryresult_p.h" |
7 | |
8 | QT_BEGIN_NAMESPACE |
9 | |
10 | namespace Qt3DRender { |
11 | namespace RayCasting { |
12 | |
13 | QAbstractCollisionQueryService::QAbstractCollisionQueryService(const QString &description) |
14 | : QAbstractServiceProvider(*new QAbstractCollisionQueryServicePrivate(description)) |
15 | { |
16 | } |
17 | |
18 | QAbstractCollisionQueryService::QAbstractCollisionQueryService(QAbstractCollisionQueryServicePrivate &dd) |
19 | : QAbstractServiceProvider(dd) |
20 | { |
21 | } |
22 | |
23 | void QAbstractCollisionQueryService::setResultHandle(QCollisionQueryResult &result, const QQueryHandle &handle) |
24 | { |
25 | result.d_func()->setHandle(handle); |
26 | } |
27 | |
28 | void QAbstractCollisionQueryService::addEntityHit(QCollisionQueryResult &result, Qt3DCore::QNodeId entity, |
29 | const Vector3D& intersection, float distance, |
30 | const Vector3D& uvw) |
31 | { |
32 | result.d_func()->addEntityHit(entity, intersection, distance, uvw); |
33 | } |
34 | |
35 | } // RayCasting |
36 | } // Qt3DRender |
37 | |
38 | QT_END_NAMESPACE |
39 | |
40 | #include "moc_qabstractcollisionqueryservice_p.cpp" |
41 |