|
|
|
@ -166,12 +166,12 @@ template<class Transformation> void Object<Transformation>::setDirty() { |
|
|
|
if(flags & Flag::Dirty) return; |
|
|
|
if(flags & Flag::Dirty) return; |
|
|
|
|
|
|
|
|
|
|
|
/* Make all features dirty */ |
|
|
|
/* Make all features dirty */ |
|
|
|
for(AbstractFeature<Transformation::Dimensions, typename Transformation::Type>& feature: this->features()) |
|
|
|
for (auto feature = this->features().first(); feature; feature = feature->nextFeature()) |
|
|
|
feature.markDirty(); |
|
|
|
feature->markDirty(); |
|
|
|
|
|
|
|
|
|
|
|
/* Make all children dirty */ |
|
|
|
/* Make all children dirty */ |
|
|
|
for(Object<Transformation>& child: children()) |
|
|
|
for(auto child = children().first(); child; child = child->nextSibling()) |
|
|
|
child.setDirty(); |
|
|
|
child->setDirty(); |
|
|
|
|
|
|
|
|
|
|
|
/* Mark object as dirty */ |
|
|
|
/* Mark object as dirty */ |
|
|
|
flags |= Flag::Dirty; |
|
|
|
flags |= Flag::Dirty; |
|
|
|
@ -508,28 +508,28 @@ template<class Transformation> void Object<Transformation>::setCleanInternal(con |
|
|
|
MatrixType matrix, invertedMatrix; |
|
|
|
MatrixType matrix, invertedMatrix; |
|
|
|
|
|
|
|
|
|
|
|
/* Clean all features */ |
|
|
|
/* Clean all features */ |
|
|
|
for(AbstractFeature<Transformation::Dimensions, typename Transformation::Type>& feature: this->features()) { |
|
|
|
for (auto feature = this->features().first(); feature; feature = feature->nextFeature()) { |
|
|
|
/* Cached absolute transformation, compute it if it wasn't
|
|
|
|
/* Cached absolute transformation, compute it if it wasn't
|
|
|
|
computed already */ |
|
|
|
computed already */ |
|
|
|
if(feature.cachedTransformations() & CachedTransformation::Absolute) { |
|
|
|
if(feature->cachedTransformations() & CachedTransformation::Absolute) { |
|
|
|
if(!(cached & CachedTransformation::Absolute)) { |
|
|
|
if(!(cached & CachedTransformation::Absolute)) { |
|
|
|
cached |= CachedTransformation::Absolute; |
|
|
|
cached |= CachedTransformation::Absolute; |
|
|
|
matrix = Implementation::Transformation<Transformation>::toMatrix(absoluteTransformation); |
|
|
|
matrix = Implementation::Transformation<Transformation>::toMatrix(absoluteTransformation); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
feature.clean(matrix); |
|
|
|
feature->clean(matrix); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Cached inverse absolute transformation, compute it if it wasn't
|
|
|
|
/* Cached inverse absolute transformation, compute it if it wasn't
|
|
|
|
computed already */ |
|
|
|
computed already */ |
|
|
|
if(feature.cachedTransformations() & CachedTransformation::InvertedAbsolute) { |
|
|
|
if(feature->cachedTransformations() & CachedTransformation::InvertedAbsolute) { |
|
|
|
if(!(cached & CachedTransformation::InvertedAbsolute)) { |
|
|
|
if(!(cached & CachedTransformation::InvertedAbsolute)) { |
|
|
|
cached |= CachedTransformation::InvertedAbsolute; |
|
|
|
cached |= CachedTransformation::InvertedAbsolute; |
|
|
|
invertedMatrix = Implementation::Transformation<Transformation>::toMatrix( |
|
|
|
invertedMatrix = Implementation::Transformation<Transformation>::toMatrix( |
|
|
|
Implementation::Transformation<Transformation>::inverted(absoluteTransformation)); |
|
|
|
Implementation::Transformation<Transformation>::inverted(absoluteTransformation)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
feature.cleanInverted(invertedMatrix); |
|
|
|
feature->cleanInverted(invertedMatrix); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|