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.
315 "<?xml version=\"1.0\"?>\n"
316 "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" byte_order=\"LittleEndian\">\n"
317 " <UnstructuredGrid>\n"
318 " <Piece NumberOfPoints=\"" << container.size() <<
"\" NumberOfCells=\"0\">\n"
320 " <DataArray type=\"Int32\" name=\"connectivity\" format=\"ascii\">\n"
323 " <DataArray type=\"Float32\" name=\"offset\" format=\"ascii\">\n"
326 " <DataArray type=\"UInt8\" name=\"types\" format=\"ascii\">\n"
334 "format=\"ascii\">\n";
335 for (
const T& mem : container)
348 "Name=\"" << descr->
getName() <<
"\" "
350 "format=\"ascii\">\n";
351 for (
const T& mem : container)
361 " </UnstructuredGrid>\n"
Definition: Tools/VTKData.h:25
std::string getName() const
Returns the name associated with this field.
Definition: Tools/VTKData.h:55
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().