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
|
|
|
#include "pointlightblock.h"
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2016-05-07 14:33:52 +00:00
|
|
|
PointLightBlock::PointLightBlock(Qt3DCore::QNode *parent)
|
|
|
|
: Qt3DRender::QShaderData(parent)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2016-05-07 14:33:52 +00:00
|
|
|
PointLightBlock::~PointLightBlock()
|
2014-09-04 14:54:05 +00:00
|
|
|
{
|
2016-05-07 14:33:52 +00:00
|
|
|
}
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2020-07-07 12:02:36 +00:00
|
|
|
QList<Qt3DRender::QAbstractLight *> PointLightBlock::lights() const
|
2016-05-07 14:33:52 +00:00
|
|
|
{
|
|
|
|
return m_lights;
|
|
|
|
}
|
2014-09-04 14:54:05 +00:00
|
|
|
|
2016-05-07 14:33:52 +00:00
|
|
|
void PointLightBlock::addLight(Qt3DRender::QAbstractLight *light)
|
|
|
|
{
|
|
|
|
m_lights.append(light);
|
|
|
|
emit lightsChanged();
|
|
|
|
}
|
2014-09-04 14:54:05 +00:00
|
|
|
|