mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 02:03:57 +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++) {
|
||||
parentInfo = parentInfo->parentInfo;
|
||||
}
|
||||
if (!parentInfo) {
|
||||
for (int i = 0; i < _outputs.size(); i++) {
|
||||
info.outputValues[i] = AttributeValue(_outputs.at(i));
|
||||
}
|
||||
return (info.size > _voxelizationSize) ? DEFAULT_ORDER : STOP_RECURSION;
|
||||
for (int i = 0; i < _outputs.size(); i++) {
|
||||
info.outputValues[i] = AttributeValue(_outputs.at(i));
|
||||
}
|
||||
SharedObjectSet objects = parentInfo->inputValues.at(_outputs.size()).getInlineValue<SharedObjectSet>();
|
||||
if (objects.isEmpty()) {
|
||||
for (int i = 0; i < _outputs.size(); i++) {
|
||||
info.outputValues[i] = AttributeValue(_outputs.at(i));
|
||||
if (parentInfo) {
|
||||
foreach (const SharedObjectPointer& object,
|
||||
parentInfo->inputValues.at(_outputs.size()).getInlineValue<SharedObjectSet>()) {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -299,6 +299,11 @@ Box operator*(const glm::mat4& matrix, const Box& box) {
|
|||
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) {
|
||||
QVBoxLayout* layout = new QVBoxLayout();
|
||||
layout->setContentsMargins(QMargins());
|
||||
|
|
|
@ -60,6 +60,8 @@ DECLARE_STREAMABLE_METATYPE(Box)
|
|||
|
||||
Box operator*(const glm::mat4& matrix, const Box& box);
|
||||
|
||||
QDebug& operator<<(QDebug& out, const Box& box);
|
||||
|
||||
/// Editor for meta-object values.
|
||||
class QMetaObjectEditor : public QWidget {
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Reference in a new issue