MCPcopy Create free account
hub / github.com/Kitware/VTK / Initialize

Method Initialize

Common/DataModel/vtkHyperTreeGrid.cxx:175–253  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

173
174//------------------------------------------------------------------------------
175void 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

Calls 10

SetMaskMethod · 0.95
UninitializeBoundsFunction · 0.85
SetTuple1Method · 0.80
maxFunction · 0.50
NewFunction · 0.50
assertFunction · 0.50
clearMethod · 0.45
SetNumberOfTuplesMethod · 0.45
SetMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected