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

Method GetYCoordinates

Common/DataModel/vtkUniformHyperTreeGrid.cxx:225–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225vtkDataArray* vtkUniformHyperTreeGrid::GetYCoordinates()
226{
227 std::cerr << "Bad to call vtkUniformHyperTreeGrid::GetYCoordinates" << std::endl;
228 // Compute coordinates only if necessary
229 if (!this->ComputedYCoordinates)
230 {
231 // Compute and store actual coordinates
232 unsigned int np = this->GetDimensions()[1];
233 this->YCoordinates->SetNumberOfTuples(np);
234 double y = this->Origin[1];
235 for (unsigned int i = 0; i < np; ++i, y += this->GridScale[1])
236 {
237 this->YCoordinates->SetTuple1(i, y);
238 }
239
240 // Keep track that computation was done
241 this->ComputedYCoordinates = true;
242 } // if ( ! this->ComputedCoordinates )
243
244 // Return coordinates
245 return this->YCoordinates;
246}
247
248//------------------------------------------------------------------------------
249void vtkUniformHyperTreeGrid::SetZCoordinates(vtkDataArray* m_ZCoordinates)

Callers

nothing calls this directly

Calls 3

SetTuple1Method · 0.80
GetDimensionsMethod · 0.45
SetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected