| 43 | } |
| 44 | |
| 45 | bool vtkCellGridSidesQuery::Initialize() |
| 46 | { |
| 47 | bool ok = this->Superclass::Initialize(); // Reset Pass number. |
| 48 | // If we don't have a side-cache, make one as responders should be able to |
| 49 | // assume it exists. But warn if we have to create one; this is really the |
| 50 | // job of the filter. |
| 51 | if (!this->SideCache) |
| 52 | { |
| 53 | this->TemporarySideCache = true; |
| 54 | auto* sideCache = vtkCellGridSidesCache::New(); |
| 55 | this->SideCache = sideCache; |
| 56 | vtkWarningMacro("No side cache was provided; creating a temporary."); |
| 57 | } |
| 58 | else |
| 59 | { |
| 60 | // If the cache is older than the query, reset the cache. |
| 61 | // Otherwise, allow responders to skip hashing their sides. |
| 62 | if (this->GetMTime() > this->SideCache->GetMTime()) |
| 63 | { |
| 64 | this->SideCache->Initialize(); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | return ok; |
| 69 | } |
| 70 | |
| 71 | void vtkCellGridSidesQuery::StartPass() |
| 72 | { |