1 | // Copyright (C) 2017 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 | #ifndef QT3DRENDER_RENDER_SEGMENTSVISITOR_P_H |
5 | #define QT3DRENDER_RENDER_SEGMENTSVISITOR_P_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists for the convenience |
12 | // of other Qt classes. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <Qt3DCore/qnodeid.h> |
19 | #include <Qt3DCore/private/vector3d_p.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | namespace Qt3DCore { |
24 | class QEntity; |
25 | } |
26 | |
27 | namespace Qt3DRender { |
28 | |
29 | namespace Render { |
30 | |
31 | class GeometryRenderer; |
32 | class NodeManagers; |
33 | class PickingProxy; |
34 | |
35 | class Q_AUTOTEST_EXPORT SegmentsVisitor |
36 | { |
37 | public: |
38 | explicit SegmentsVisitor(NodeManagers *manager) : m_manager(manager) { } |
39 | virtual ~SegmentsVisitor(); |
40 | |
41 | void apply(const Qt3DCore::QEntity *entity); |
42 | void apply(const GeometryRenderer *renderer, const Qt3DCore::QNodeId id); |
43 | void apply(const PickingProxy *proxy, const Qt3DCore::QNodeId id); |
44 | |
45 | virtual void visit(uint andx, const Vector3D &a, |
46 | uint bndx, const Vector3D &b) = 0; |
47 | |
48 | protected: |
49 | NodeManagers *m_manager; |
50 | Qt3DCore::QNodeId m_nodeId; |
51 | }; |
52 | |
53 | } // namespace Render |
54 | |
55 | } // namespace Qt3DRender |
56 | |
57 | QT_END_NAMESPACE |
58 | |
59 | |
60 | #endif // QT3DRENDER_RENDER_SEGMENTSVISITOR_P_H |
61 | |