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

Function GetArrayRawPointer

IO/Legacy/vtkDataWriter.cxx:1071–1084  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1069// for that in which case the calling function must delete it.
1070template <class T, class Array>
1071T* GetArrayRawPointer(vtkAbstractArray* array, int isAOSArray)
1072{
1073 if (isAOSArray)
1074 {
1075 return GetPointer<T, Array>(array);
1076 }
1077
1078 auto nc = array->GetNumberOfComponents();
1079 auto nt = array->GetNumberOfTuples();
1080
1081 T* data = new T[nc * nt];
1082 array->ExportToVoidPointer(data);
1083 return data;
1084}
1085
1086} // end anonymous namespace
1087

Callers

nothing calls this directly

Calls 3

ExportToVoidPointerMethod · 0.80
GetNumberOfComponentsMethod · 0.45
GetNumberOfTuplesMethod · 0.45

Tested by

no test coverage detected