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

Method GetXCoordinates

Common/DataModel/vtkUniformHyperTreeGrid.cxx:187–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187vtkDataArray* 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//------------------------------------------------------------------------------
211void vtkUniformHyperTreeGrid::SetYCoordinates(vtkDataArray* m_YCoordinates)

Callers

nothing calls this directly

Calls 3

SetTuple1Method · 0.80
GetDimensionsMethod · 0.45
SetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected