2022-06-08 12:47:24 +00:00
|
|
|
// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
|
2024-02-23 14:41:04 +00:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2016-05-07 14:33:52 +00:00
|
|
|
#ifndef POINTLIGHTBLOCK_H
|
|
|
|
#define POINTLIGHTBLOCK_H
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2016-05-07 14:33:52 +00:00
|
|
|
#include <Qt3DRender/QAbstractLight>
|
|
|
|
#include <Qt3DRender/QShaderData>
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2016-05-07 14:33:52 +00:00
|
|
|
class PointLightBlock : public Qt3DRender::QShaderData
|
2014-09-04 14:54:05 +00:00
|
|
|
{
|
2016-05-07 14:33:52 +00:00
|
|
|
Q_OBJECT
|
2020-07-07 12:02:36 +00:00
|
|
|
Q_PROPERTY(QList<Qt3DRender::QAbstractLight *> lights READ lights NOTIFY lightsChanged)
|
2014-09-11 09:23:21 +00:00
|
|
|
public:
|
2016-05-07 14:33:52 +00:00
|
|
|
explicit PointLightBlock(Qt3DCore::QNode *parent = 0);
|
|
|
|
~PointLightBlock();
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2020-07-07 12:02:36 +00:00
|
|
|
QList<Qt3DRender::QAbstractLight *> lights() const;
|
2016-05-07 14:33:52 +00:00
|
|
|
void addLight(Qt3DRender::QAbstractLight *light);
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void lightsChanged();
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2014-09-11 09:23:21 +00:00
|
|
|
private:
|
2020-07-07 12:02:36 +00:00
|
|
|
QList<Qt3DRender::QAbstractLight *> m_lights;
|
2014-09-11 09:23:21 +00:00
|
|
|
};
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2016-05-07 14:33:52 +00:00
|
|
|
#endif // POINTLIGHTBLOCK_H
|