File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -961,8 +961,17 @@ template <typename SdfGridT, typename ExtValueT>
961961struct FastSweeping <SdfGridT, ExtValueT>::PruneMinMaxFltKernel {
962962 PruneMinMaxFltKernel (SdfValueT min, SdfValueT max) : mMin (min), mMax (max) {}
963963
964- // Do nothing for the root node
965- void operator ()(typename SdfTreeT::RootNodeType&, size_t = 1 ) const { }
964+ // Root node
965+ void operator ()(typename SdfTreeT::RootNodeType& node, size_t = 1 ) const {
966+ for (auto iter = node.beginValueAll (); iter; ++iter) {
967+ if (*iter == -std::numeric_limits<SdfValueT>::max ()) {
968+ iter.setValue (mMin );
969+ }
970+ if (*iter == std::numeric_limits<SdfValueT>::max ()) {
971+ iter.setValue (mMax );
972+ }
973+ }
974+ }
966975
967976 // Internal nodes
968977 template <typename NodeT>
You can’t perform that action at this time.
0 commit comments