template<typename T>
class VTKUnstructuredGrid< T >
This function writes single output frames. this requires an filename and a descriptor. To actually write it, we need a collection.
template<typename T >
template<typename C >
Writes out the container C containing T's, which all get written using the information in the descriptor. C should contain the forward iterable traits, as well as a method size() to give the number of elements stored in this container. All STL containers have this property. Yours should too.
336 "<?xml version=\"1.0\"?>\n"
337 "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" byte_order=\"LittleEndian\">\n"
338 " <UnstructuredGrid>\n"
339 " <Piece NumberOfPoints=\"" << container.size() <<
"\" NumberOfCells=\"0\">\n"
341 " <DataArray type=\"Int32\" name=\"connectivity\" format=\"ascii\">\n"
344 " <DataArray type=\"Float32\" name=\"offset\" format=\"ascii\">\n"
347 " <DataArray type=\"UInt8\" name=\"types\" format=\"ascii\">\n"
355 "format=\"ascii\">\n";
356 for (
const T& mem : container)
369 "Name=\"" << descr->
getName() <<
"\" "
371 "format=\"ascii\">\n";
372 for (
const T& mem : container)
382 " </UnstructuredGrid>\n"
Definition: Tools/VTKData.h:46
std::string getName() const
Returns the name associated with this field.
Definition: Tools/VTKData.h:76
virtual void emit(std::ostream &out, const T &t) const =0
writes this VTKData to the given output stream for a single T
virtual std::size_t getNumberOfComponents() const =0
Returns the number of components in this type.
virtual std::string getTypeName() const =0
Gives the VTKDataType for VTK.
References VTKUnstructuredGrid< T >::descriptor_, Detail::VTKPointDescriptorEntry< T >::emit(), Detail::VTKPointDescriptorEntry< T >::getName(), Detail::VTKPointDescriptorEntry< T >::getNumberOfComponents(), Detail::VTKPointDescriptorEntry< T >::getTypeName(), and VTKUnstructuredGrid< T >::outFile_.
Referenced by transformMercuryToVTK().