| 843 | } |
| 844 | |
| 845 | bool vtkCellGrid::ComputeRangeInternal( |
| 846 | vtkCellAttribute* attribute, int component, bool finiteRange) const |
| 847 | { |
| 848 | auto* self = const_cast<vtkCellGrid*>(this); |
| 849 | auto& cache = this->RangeCache[attribute]; // This inserts a blank entry if none exists. |
| 850 | // Ensure the range vectors are the proper size: |
| 851 | if (cache.size() != static_cast<std::size_t>(attribute->GetNumberOfComponents() + 2)) |
| 852 | { |
| 853 | cache.resize(attribute->GetNumberOfComponents() + 2); |
| 854 | } |
| 855 | vtkNew<vtkCellGridRangeQuery> rangeQuery; |
| 856 | rangeQuery->SetComponent(component); |
| 857 | rangeQuery->SetFiniteRange(finiteRange); |
| 858 | rangeQuery->SetCellGrid(self); |
| 859 | rangeQuery->SetCellAttribute(attribute); |
| 860 | if (!self->Query(rangeQuery)) |
| 861 | { |
| 862 | vtkWarningMacro("Range computation for \"" << attribute->GetName().Data() << "\" " |
| 863 | << "(" << component << ") was partial at best."); |
| 864 | } |
| 865 | return true; |
| 866 | } |
| 867 | |
| 868 | VTK_ABI_NAMESPACE_END |
no test coverage detected