| 185 | } |
| 186 | |
| 187 | vtkDataArray* vtkUniformHyperTreeGrid::GetXCoordinates() |
| 188 | { |
| 189 | std::cerr << "Bad to call vtkUniformHyperTreeGrid::GetXCoordinates" << std::endl; |
| 190 | // Compute coordinates only if necessary |
| 191 | if (!this->ComputedXCoordinates) |
| 192 | { |
| 193 | // Compute and store actual coordinates |
| 194 | unsigned int np = this->GetDimensions()[0]; |
| 195 | this->XCoordinates->SetNumberOfTuples(np); |
| 196 | double x = this->Origin[0]; |
| 197 | for (unsigned int i = 0; i < np; ++i, x += this->GridScale[0]) |
| 198 | { |
| 199 | this->XCoordinates->SetTuple1(i, x); |
| 200 | } |
| 201 | |
| 202 | // Keep track that computation was done |
| 203 | this->ComputedXCoordinates = true; |
| 204 | } // if ( ! this->ComputedCoordinates ) |
| 205 | |
| 206 | // Return coordinates |
| 207 | return this->XCoordinates; |
| 208 | } |
| 209 | |
| 210 | //------------------------------------------------------------------------------ |
| 211 | void vtkUniformHyperTreeGrid::SetYCoordinates(vtkDataArray* m_YCoordinates) |
nothing calls this directly
no test coverage detected