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

Function ReverseDoubleArray

Filters/General/vtkAxisAlignedTransformFilter.cxx:69–78  ·  view source on GitHub ↗

------------------------------------------------------------------------------ TODO: Use implicit array to optimize memory

Source from the content-addressed store, hash-verified

67//------------------------------------------------------------------------------
68// TODO: Use implicit array to optimize memory
69void ReverseDoubleArray(vtkDoubleArray* arr)
70{
71 vtkNew<vtkDoubleArray> tmp;
72 tmp->DeepCopy(arr);
73 for (int i = 0; i < arr->GetNumberOfTuples(); i++)
74 {
75 double value = tmp->GetTuple1(i);
76 arr->SetTuple1(arr->GetNumberOfTuples() - i - 1, -value);
77 }
78}
79
80//------------------------------------------------------------------------------
81void SwapXYZCoordinates(vtkDoubleArray*& XCoordinate, vtkDoubleArray*& YCoordinate,

Callers 1

ReverseAxesFunction · 0.85

Calls 4

GetTuple1Method · 0.80
SetTuple1Method · 0.80
DeepCopyMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected