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

Method GetZCoordinates

Common/DataModel/vtkUniformHyperTreeGrid.cxx:263–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263vtkDataArray* vtkUniformHyperTreeGrid::GetZCoordinates()
264{
265 std::cerr << "Bad to call vtkUniformHyperTreeGrid::GetZCoordinates" << std::endl;
266 // Compute coordinates only if necessary
267 if (!this->ComputedZCoordinates)
268 {
269 // Compute and store actual coordinates
270 unsigned int np = this->GetDimensions()[2];
271 this->ZCoordinates->SetNumberOfTuples(np);
272 double z = this->Origin[2];
273 for (unsigned int i = 0; i < np; ++i, z += this->GridScale[2])
274 {
275 this->ZCoordinates->SetTuple1(i, z);
276 }
277
278 // Keep track that computation was done
279 this->ComputedZCoordinates = true;
280 } // if ( ! this->ComputedCoordinates )
281
282 // Return coordinates
283 return this->ZCoordinates;
284}
285
286void vtkUniformHyperTreeGrid::CopyCoordinates(const vtkHyperTreeGrid* outputHTG)
287{

Callers

nothing calls this directly

Calls 3

SetTuple1Method · 0.80
GetDimensionsMethod · 0.45
SetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected