Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
VTKWriter.hh
1 //=============================================================================
2 //
3 // Implements an IOManager writer module for VTK files
4 //
5 //=============================================================================
6
7 #ifndef __VTKWRITER_HH__
8 #define __VTKWRITER_HH__
9
10 //=== INCLUDES ================================================================
11
12 #include <string>
13 #include <iosfwd>
14
15 #include <OpenMesh/Core/System/config.h>
16 #include <OpenMesh/Core/Utils/SingletonT.hh>
17 #include <OpenMesh/Core/IO/exporter/BaseExporter.hh>
18 #include <OpenMesh/Core/IO/writer/BaseWriter.hh>
19
20 //== NAMESPACES ===============================================================
21
22 namespace OpenMesh {
23 namespace IO {
24
25 //=== IMPLEMENTATION ==========================================================
26
27 class OPENMESHDLLEXPORT _VTKWriter_ : public BaseWriter
28 {
29 public:
30 _VTKWriter_();
31
32 std::string get_description() const { return "VTK"; }
33 std::string get_extensions() const { return "vtk"; }
34
35 bool write(const std::string&, BaseExporter&, Options, std::streamsize _precision = 6) const;
36 bool write(std::ostream&, BaseExporter&, Options, std::streamsize _precision = 6) const;
37
38 size_t binary_size(BaseExporter&, Options) const { return 0; }
39 };
40
41 //== TYPE DEFINITION ==========================================================
42
44 extern _VTKWriter_ __VTKWriterinstance;
45 OPENMESHDLLEXPORT _VTKWriter_& VTKWriter();
46
47 //=============================================================================
48 } // namespace IO
49 } // namespace OpenMesh
50 //=============================================================================
51 #endif
52 //=============================================================================
OpenMesh::IO::_VTKWriter_::get_extensions
std::string get_extensions() const
Return file format's extension.
Definition: VTKWriter.hh:33
OpenMesh
Definition: MeshItems.hh:64
OpenMesh::IO::__VTKWriterinstance
_VTKWriter_ __VTKWriterinstance
Declare the single entity of the OBJ writer.
Definition: VTKWriter.cc:18
OpenMesh::IO::_VTKWriter_::get_description
std::string get_description() const
Return short description of the supported file format.
Definition: VTKWriter.hh:32
OpenMesh::IO::Options
Set options for reader/writer modules.
Definition: Options.hh:95
config.h
OpenMesh::IO::BaseExporter
Definition: BaseExporter.hh:89
OpenMesh::IO::_VTKWriter_::binary_size
size_t binary_size(BaseExporter &, Options) const
Returns expected size of file if binary format is supported else 0.
Definition: VTKWriter.hh:38
OpenMesh::IO::BaseWriter
Definition: BaseWriter.hh:88
OpenMesh::IO::_VTKWriter_
Definition: VTKWriter.hh:27