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

Method GetFieldAsStringVector

IO/Geometry/vtkGLTFWriter.cxx:834–850  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832}
833
834std::vector<std::string> vtkGLTFWriter::GetFieldAsStringVector(vtkDataObject* obj, const char* name)
835{
836 vtkFieldData* fd = obj->GetFieldData();
837 std::vector<std::string> result;
838 if (!fd)
839 {
840 return result;
841 }
842 vtkStringArray* sa = vtkStringArray::SafeDownCast(fd->GetAbstractArray(name));
843 if (!sa)
844 {
845 return result;
846 }
847 for (int i = 0; i < sa->GetNumberOfTuples(); ++i)
848 result.push_back(sa->GetValue(i));
849 return result;
850}
851
852std::string vtkGLTFWriter::WriteToString()
853{

Callers

nothing calls this directly

Calls 5

GetAbstractArrayMethod · 0.80
GetFieldDataMethod · 0.45
GetNumberOfTuplesMethod · 0.45
push_backMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected