mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 16:30:39 +02:00
Fix for voxelization on removal.
This commit is contained in:
parent
7580951b92
commit
40b1d2f284
3 changed files with 13 additions and 15 deletions
|
@ -136,23 +136,14 @@ int UpdateSpannerVisitor::visit(MetavoxelInfo& info) {
|
||||||
for (int i = 0; i < _steps && parentInfo; i++) {
|
for (int i = 0; i < _steps && parentInfo; i++) {
|
||||||
parentInfo = parentInfo->parentInfo;
|
parentInfo = parentInfo->parentInfo;
|
||||||
}
|
}
|
||||||
if (!parentInfo) {
|
for (int i = 0; i < _outputs.size(); i++) {
|
||||||
for (int i = 0; i < _outputs.size(); i++) {
|
info.outputValues[i] = AttributeValue(_outputs.at(i));
|
||||||
info.outputValues[i] = AttributeValue(_outputs.at(i));
|
|
||||||
}
|
|
||||||
return (info.size > _voxelizationSize) ? DEFAULT_ORDER : STOP_RECURSION;
|
|
||||||
}
|
}
|
||||||
SharedObjectSet objects = parentInfo->inputValues.at(_outputs.size()).getInlineValue<SharedObjectSet>();
|
if (parentInfo) {
|
||||||
if (objects.isEmpty()) {
|
foreach (const SharedObjectPointer& object,
|
||||||
for (int i = 0; i < _outputs.size(); i++) {
|
parentInfo->inputValues.at(_outputs.size()).getInlineValue<SharedObjectSet>()) {
|
||||||
info.outputValues[i] = AttributeValue(_outputs.at(i));
|
static_cast<const Spanner*>(object.data())->blendAttributeValues(info, true);
|
||||||
}
|
}
|
||||||
return (info.size > _voxelizationSize) ? DEFAULT_ORDER : STOP_RECURSION;
|
|
||||||
}
|
|
||||||
SharedObjectSet::const_iterator it = objects.constBegin();
|
|
||||||
static_cast<const Spanner*>(it->data())->getAttributeValues(info, true);
|
|
||||||
for (it++; it != objects.constEnd(); it++) {
|
|
||||||
static_cast<const Spanner*>(it->data())->blendAttributeValues(info, true);
|
|
||||||
}
|
}
|
||||||
return (info.size > _voxelizationSize) ? DEFAULT_ORDER : STOP_RECURSION;
|
return (info.size > _voxelizationSize) ? DEFAULT_ORDER : STOP_RECURSION;
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,6 +299,11 @@ Box operator*(const glm::mat4& matrix, const Box& box) {
|
||||||
return newBox;
|
return newBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDebug& operator<<(QDebug& out, const Box& box) {
|
||||||
|
return out << '(' << box.minimum.x << box.minimum.y << box.minimum.z << ") (" <<
|
||||||
|
box.maximum.x << box.maximum.y << box.maximum.z << ')';
|
||||||
|
}
|
||||||
|
|
||||||
QMetaObjectEditor::QMetaObjectEditor(QWidget* parent) : QWidget(parent) {
|
QMetaObjectEditor::QMetaObjectEditor(QWidget* parent) : QWidget(parent) {
|
||||||
QVBoxLayout* layout = new QVBoxLayout();
|
QVBoxLayout* layout = new QVBoxLayout();
|
||||||
layout->setContentsMargins(QMargins());
|
layout->setContentsMargins(QMargins());
|
||||||
|
|
|
@ -60,6 +60,8 @@ DECLARE_STREAMABLE_METATYPE(Box)
|
||||||
|
|
||||||
Box operator*(const glm::mat4& matrix, const Box& box);
|
Box operator*(const glm::mat4& matrix, const Box& box);
|
||||||
|
|
||||||
|
QDebug& operator<<(QDebug& out, const Box& box);
|
||||||
|
|
||||||
/// Editor for meta-object values.
|
/// Editor for meta-object values.
|
||||||
class QMetaObjectEditor : public QWidget {
|
class QMetaObjectEditor : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
Loading…
Reference in a new issue