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

Method GetLevelZeroOriginFromIndex

Common/DataModel/vtkUniformHyperTreeGrid.cxx:345–357  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

343
344//------------------------------------------------------------------------------
345void vtkUniformHyperTreeGrid::GetLevelZeroOriginFromIndex(vtkIdType treeindex, double* m_Origin)
346{
347 // Retrieve Cartesian coordinates of root tree
348 unsigned int i, j, k;
349 this->GetLevelZeroCoordinatesFromIndex(treeindex, i, j, k);
350
351 // Compute origin of the cursor
352 const double* origin = this->GetOrigin();
353 const double* scale = this->GetGridScale();
354 m_Origin[0] = origin[0] + i * scale[0];
355 m_Origin[1] = origin[1] + j * scale[1];
356 m_Origin[2] = origin[2] + k * scale[2];
357}
358
359//------------------------------------------------------------------------------
360void vtkUniformHyperTreeGrid::CopyStructure(vtkDataObject* ds)

Callers

nothing calls this directly

Calls 2

GetOriginMethod · 0.45

Tested by

no test coverage detected