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

Function OffsetPoints

Filters/Sources/vtkPartitionedDataSetCollectionSource.cxx:68–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67template <typename ArrayType>
68void OffsetPoints(ArrayType* array, const vtkVector3d& delta)
69{
70 VTK_ASSUME(array->GetNumberOfComponents() == 3);
71
72 using ValueType = vtk::GetAPIType<ArrayType>;
73
74 vtkSMPTools::For(0, array->GetNumberOfTuples(),
75 [&](vtkIdType start, vtkIdType end)
76 {
77 ValueType tuple[3];
78 for (vtkIdType tidx = start; tidx < end; ++tidx)
79 {
80 array->GetTypedTuple(tidx, tuple);
81 tuple[0] += delta[0];
82 tuple[1] += delta[1];
83 tuple[2] += delta[2];
84 array->SetTypedTuple(tidx, tuple);
85 }
86 });
87}
88
89}
90

Callers 1

RequestDataMethod · 0.85

Calls 5

ForFunction · 0.50
GetNumberOfComponentsMethod · 0.45
GetNumberOfTuplesMethod · 0.45
GetTypedTupleMethod · 0.45
SetTypedTupleMethod · 0.45

Tested by

no test coverage detected