------------------------------------------------------------------------------
| 50 | |
| 51 | //------------------------------------------------------------------------------ |
| 52 | vtkHyperTree* vtkUniformHyperTreeGrid::GetTree(vtkIdType index, bool create) |
| 53 | { |
| 54 | // Wrap convenience macro for outside use |
| 55 | vtkHyperTree* tree = GetHyperTreeFromThisMacro(index); |
| 56 | |
| 57 | // Create a new cursor if only required to do so |
| 58 | if (create && !tree) |
| 59 | { |
| 60 | tree = vtkHyperTree::New(); |
| 61 | tree->Initialize(this->BranchFactor, this->Dimension); |
| 62 | tree->SetTreeIndex(index); |
| 63 | this->HyperTrees[index] = tree; |
| 64 | tree->Delete(); |
| 65 | |
| 66 | if (!tree->HasScales()) |
| 67 | { |
| 68 | if (!this->Scales) |
| 69 | { |
| 70 | this->Scales = |
| 71 | std::make_shared<vtkHyperTreeGridScales>(this->BranchFactor, this->GridScale); |
| 72 | } |
| 73 | tree->SetScales(this->Scales); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | return tree; |
| 78 | } |
| 79 | |
| 80 | //------------------------------------------------------------------------------ |
| 81 | void vtkUniformHyperTreeGrid::PrintSelf(ostream& os, vtkIndent indent) |
nothing calls this directly
no test coverage detected