------------------------------------------------------------------------------
| 173 | |
| 174 | //------------------------------------------------------------------------------ |
| 175 | void vtkHyperTreeGrid::Initialize() |
| 176 | { |
| 177 | this->Superclass::Initialize(); |
| 178 | // DataObject Initialize will not do CellData |
| 179 | this->CellData->Initialize(); |
| 180 | // Delete existing trees |
| 181 | this->HyperTrees.clear(); |
| 182 | |
| 183 | // Grid topology |
| 184 | this->TransposedRootIndexing = false; |
| 185 | |
| 186 | // Invalid default grid parameters to force actual initialization |
| 187 | this->Orientation = std::numeric_limits<unsigned int>::max(); |
| 188 | this->BranchFactor = 0; |
| 189 | this->NumberOfChildren = 0; |
| 190 | |
| 191 | // Depth limiter |
| 192 | this->DepthLimiter = std::numeric_limits<unsigned int>::max(); |
| 193 | |
| 194 | // Masked primal leaves |
| 195 | this->SetMask(nullptr); |
| 196 | |
| 197 | // No interface by default |
| 198 | this->HasInterface = false; |
| 199 | |
| 200 | // Interface array names |
| 201 | this->InterfaceNormalsName = nullptr; |
| 202 | this->InterfaceInterceptsName = nullptr; |
| 203 | |
| 204 | // Primal grid geometry |
| 205 | this->WithCoordinates = true; |
| 206 | |
| 207 | // Might be better to set coordinates using this->SetXCoordinates(), |
| 208 | // but there is currently a conflict with vtkUniformHyperTreeGrid |
| 209 | // which inherits from vtkHyperTreeGrid. |
| 210 | // To be fixed when a better inheritance tree is implemented. |
| 211 | this->XCoordinates = vtkSmartPointer<vtkDoubleArray>::New(); |
| 212 | this->XCoordinates->SetNumberOfTuples(1); |
| 213 | this->XCoordinates->SetTuple1(0, 0.0); |
| 214 | |
| 215 | this->YCoordinates = vtkSmartPointer<vtkDoubleArray>::New(); |
| 216 | this->YCoordinates->SetNumberOfTuples(1); |
| 217 | this->YCoordinates->SetTuple1(0, 0.0); |
| 218 | |
| 219 | this->ZCoordinates = vtkSmartPointer<vtkDoubleArray>::New(); |
| 220 | this->ZCoordinates->SetNumberOfTuples(1); |
| 221 | this->ZCoordinates->SetTuple1(0, 0.0); |
| 222 | |
| 223 | // ----------------------------------------------- |
| 224 | // RectilinearGrid |
| 225 | // ----------------------------------------------- |
| 226 | // Invalid default grid parameters to force actual initialization |
| 227 | this->Dimension = 0; |
| 228 | this->Dimensions[0] = 0; // Just used by GetDimensions |
| 229 | this->Dimensions[1] = 0; |
| 230 | this->Dimensions[2] = 0; |
| 231 | |
| 232 | this->CellDims[0] = 0; // Just used by GetCellDims |
no test coverage detected