OMToolkit  1.0
The polygonal mesh processing tool.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OMReaderExt.h
Go to the documentation of this file.
1 //==============================================================================
15 #ifndef _OM_READER_EXT_H_
16 #define _OM_READER_EXT_H_
17 
18 #include <OpenMesh\Core\IO\reader\OMReader.hh>
20 #include <strstream>
21 
22 namespace OpenMesh {
23 namespace IO {
24 
28 class OMReaderExt : public _OMReader_
29 {
30  public:
34  virtual ~OMReaderExt() { }
35 
43  bool read(mds::mod::CChannel& _is, BaseImporter& _bi, Options& _opt );
44 
45  private:
54  bool read_ascii(mds::mod::CChannel& _is, BaseImporter& _bi, Options& _opt) const;
55 
63  bool read_binary(mds::mod::CChannel& _is, BaseImporter& _bi, Options& _opt) const;
64 
68  typedef OMFormat::HeaderExt Header;
69 
73  typedef OMFormat::Chunk::Header ChunkHeader;
74 
78  typedef OMFormat::Chunk::PropertyName PropertyName;
79 
83  mutable size_t bytes_;
84 
88  mutable Header header_;
89 
93  mutable ChunkHeader chunk_header_;
94 
98  mutable PropertyName property_name_;
99 
108  bool read_binary_vertex_chunk(mds::mod::CChannel &_is, BaseImporter &_bi, Options &_opt, bool _swap) const;
109 
118  bool read_binary_face_chunk(mds::mod::CChannel &_is, BaseImporter &_bi, Options &_opt, bool _swap) const;
119 
128  bool read_binary_edge_chunk(mds::mod::CChannel &_is, BaseImporter &_bi, Options &_opt, bool _swap) const;
129 
138  bool read_binary_halfedge_chunk(mds::mod::CChannel &_is, BaseImporter &_bi, Options &_opt, bool _swap) const;
139 
148  bool read_binary_mesh_chunk(mds::mod::CChannel &_is, BaseImporter &_bi, Options &_opt, bool _swap) const;
149 
158  size_t restore_binary_custom_data(mds::mod::CChannel& _is, BaseProperty* _bp, size_t _n_elem, bool _swap) const;
159 };
160 
161 } // namespace IO
162 } // namespace OpenMesh
163 
164 #endif