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
21QT_BEGIN_NAMESPACE
22
23namespace Qt3DCore {
24class QEntity;
25}
26
27namespace Qt3DRender {
28
29namespace Render {
30
31class GeometryRenderer;
32class NodeManagers;
33class PickingProxy;
34
35class Q_AUTOTEST_EXPORT SegmentsVisitor
36{
37public:
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
48protected:
49 NodeManagers *m_manager;
50 Qt3DCore::QNodeId m_nodeId;
51};
52
53} // namespace Render
54
55} // namespace Qt3DRender
56
57QT_END_NAMESPACE
58
59
60#endif // QT3DRENDER_RENDER_SEGMENTSVISITOR_P_H
61

source code of qt3d/src/render/backend/segmentsvisitor_p.h