52#ifndef __BASEWRITER_HH__
53#define __BASEWRITER_HH__
64#include <OpenMesh/Core/System/config.h>
65#include <OpenMesh/Core/IO/Options.hh>
66#include <OpenMesh/Core/IO/exporter/BaseExporter.hh>
87 typedef unsigned int Option;
103 virtual bool can_u_write(
const std::string& _filename)
const;
111 virtual bool write(
const std::string& _filename,
114 std::streamsize _precision = 6)
const = 0;
122 virtual bool write(std::ostream& _os,
125 std::streamsize _precision = 6)
const = 0;
138 return ( !_opt.check(Options::VertexNormal ) || _be.has_vertex_normals())
139 && ( !_opt.check(Options::VertexTexCoord)|| _be.has_vertex_texcoords())
140 && ( !_opt.check(Options::VertexColor) || _be.has_vertex_colors())
141 && ( !_opt.check(Options::FaceNormal) || _be.has_face_normals())
142 && ( !_opt.check(Options::FaceColor) || _be.has_face_colors());
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:59
Definition mconvert.cc:103
Base class for exporter modules.
Definition BaseExporter.hh:85
Set options for reader/writer modules.
Definition Options.hh:91
Base class for all writer modules.
Definition BaseWriter.hh:84
virtual std::string get_extensions() const =0
Return file format's extension.
virtual bool write(const std::string &_filename, BaseExporter &_be, Options _opt, std::streamsize _precision=6) const =0
Write to a file.
virtual ~BaseWriter()
Destructor.
Definition BaseWriter.hh:90
virtual size_t binary_size(BaseExporter &, Options) const
Returns expected size of file if binary format is supported else 0.
Definition BaseWriter.hh:128
virtual std::string get_description() const =0
Return short description of the supported file format.
virtual bool write(std::ostream &_os, BaseExporter &_be, Options _opt, std::streamsize _precision=6) const =0
Write to a std::ostream.