Developer Documentation
Loading...
Searching...
No Matches
OpenMesh::IO Namespace Reference

Classes

class  _IOManager_
 
class  _OBJReader_
 
class  _OBJWriter_
 
class  _OFFReader_
 
class  _OFFWriter_
 
class  _OMReader_
 
class  _OMWriter_
 
class  _PLYReader_
 
class  _PLYWriter_
 
class  _STLReader_
 
class  _STLWriter_
 
class  _VTKWriter_
 
class  BaseExporter
 
class  BaseImporter
 
class  BaseReader
 
class  BaseWriter
 
struct  binary
 
struct  binary< BaseSkin::SkinWeights >
 
struct  binary< MyData >
 
struct  binary< MyMap >
 
struct  binary< RegisteredDataType >
 
class  ExporterT
 
struct  Handle2Prop
 
struct  Handle2Prop< T, FaceHandle >
 
struct  Handle2Prop< T, VertexHandle >
 
class  ImporterT
 
class  Options
 Set options for reader/writer modules. More...
 

Functions

_IOManager_IOManager ()
 
template<typename T >
size_t store (std::ostream &_os, const T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap, t_signed)
 
template<typename T >
size_t store (std::ostream &_os, const T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap, t_unsigned)
 
template<typename T >
size_t restore (std::istream &_is, T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap, t_signed)
 
template<typename T >
size_t restore (std::istream &_is, T &_val, OMFormat::Chunk::Integer_Size _b, bool _swap, t_unsigned)
 
_OBJReader_OBJReader ()
 
void trimString (std::string &_string)
 
void remove_duplicated_vertices (BaseImporter::VHandles &_indices)
 
_OFFReader_OFFReader ()
 
_OMReader_OMReader ()
 
_PLYReader_PLYReader ()
 
std::string get_property_name (std::string _string1, std::string _string2)
 
_PLYReader_::ValueType get_property_type (const std::string &_string1, const std::string &_string2)
 
_STLReader_STLReader ()
 
void trimStdString (std::string &_string)
 
_OBJWriter_OBJWriter ()
 
_OFFWriter_OFFWriter ()
 
_OMWriter_OMWriter ()
 
_PLYWriter_PLYWriter ()
 
template<typename T >
const PropertyT< T > * castProperty (const BaseProperty *_prop)
 
_STLWriter_STLWriter ()
 
_VTKWriter_VTKWriter ()
 
Mesh Reading / Writing

Option for reader and writer modules.

template<class Mesh >
bool read_mesh (Mesh &_mesh, const std::string &_filename)
 Read a mesh from file _filename.
 
template<class Mesh >
bool read_mesh (Mesh &_mesh, const std::string &_filename, Options &_opt, bool _clear=true)
 Read a mesh from file _filename.
 
template<class Mesh >
bool read_mesh (Mesh &_mesh, std::istream &_is, const std::string &_ext, Options &_opt, bool _clear=true)
 Read a mesh from file open std::istream.
 
template<class Mesh >
bool write_mesh (const Mesh &_mesh, const std::string &_filename, Options _opt=Options::Default, std::streamsize _precision=6)
 Write a mesh to the file _filename.
 
template<class Mesh >
bool write_mesh (const Mesh &_mesh, std::ostream &_os, const std::string &_ext, Options _opt=Options::Default, std::streamsize _precision=6)
 
template<class Mesh >
size_t binary_size (const Mesh &_mesh, const std::string &_ext, Options _opt=Options::Default)
 Get binary size of data.
 

Variables

_OBJReader_ __OBJReaderInstance
 
_OFFReader_ __OFFReaderInstance
 Declare the single entity of the OFF reader.
 
_OMReader_ __OMReaderInstance
 Declare the single entity of the OM reader.
 
_PLYReader_ __PLYReaderInstance
 Declare the single entity of the PLY reader.
 
_STLReader_ __STLReaderInstance
 Declare the single entity of the STL reader.
 
_OBJWriter_ __OBJWriterinstance
 Declare the single entity of the OBJ writer.
 
_OFFWriter_ __OFFWriterInstance
 Declare the single entity of the OFF writer.
 
_OMWriter_ __OMWriterInstance
 Declare the single entity of the OM writer.
 
_PLYWriter_ __PLYWriterInstance
 Declare the single entity of the PLY writer.
 
_STLWriter_ __STLWriterInstance
 
_VTKWriter_ __VTKWriterinstance
 Declare the single entity of the OBJ writer.
 

Handling binary input/output.

These functions take care of swapping bytes to get the right Endian.

typedef unsigned char uchar
 
typedef unsigned short ushort
 
typedef unsigned long ulong
 
typedef signed char int8_t
 
typedef unsigned char uint8_t
 
typedef short int16_t
 
typedef unsigned short uint16_t
 
typedef int int32_t
 
typedef unsigned int uint32_t
 
typedef long long int64_t
 
typedef unsigned long long uint64_t
 
typedef float float32_t
 
typedef double float64_t
 
typedef uint8_t rgb_t[3]
 
typedef uint8_t rgba_t[4]
 
short int read_short (FILE *_in, bool _swap=false)
 
int read_int (FILE *_in, bool _swap=false)
 
float read_float (FILE *_in, bool _swap=false)
 
double read_double (FILE *_in, bool _swap=false)
 
short int read_short (std::istream &_in, bool _swap=false)
 
int read_int (std::istream &_in, bool _swap=false)
 
float read_float (std::istream &_in, bool _swap=false)
 
double read_double (std::istream &_in, bool _swap=false)
 
void write_short (short int _i, FILE *_out, bool _swap=false)
 
void write_int (int _i, FILE *_out, bool _swap=false)
 
void write_float (float _f, FILE *_out, bool _swap=false)
 
void write_double (double _d, FILE *_out, bool _swap=false)
 
void write_short (short int _i, std::ostream &_out, bool _swap=false)
 
void write_int (int _i, std::ostream &_out, bool _swap=false)
 
void write_float (float _f, std::ostream &_out, bool _swap=false)
 
void write_double (double _d, std::ostream &_out, bool _swap=false)
 
template<size_t N>
void _reverse_byte_order_N (uint8_t *_val)
 
template<>
void _reverse_byte_order_N< 1 > (uint8_t *)
 
template<>
void _reverse_byte_order_N< 2 > (uint8_t *_val)
 
template<>
void _reverse_byte_order_N< 4 > (uint8_t *_val)
 
template<>
void _reverse_byte_order_N< 8 > (uint8_t *_val)
 
template<>
void _reverse_byte_order_N< 12 > (uint8_t *_val)
 
template<>
void _reverse_byte_order_N< 16 > (uint8_t *_val)
 
template<typename T >
T * reverse_byte_order (T *t)
 
void compile_time_error__no_fundamental_type ()
 
template<typename T >
T & reverse_byte_order (T &_t)
 
template<>
bool & reverse_byte_order (bool &_t)
 
template<>
char & reverse_byte_order (char &_t)
 
template<>
ucharreverse_byte_order (uchar &_t)
 
template<typename T >
reverse_byte_order (const T &a)
 
template<typename T >
bool is_streamable (void)
 
template<typename T >
bool is_streamable (const T &)
 
template<typename T >
size_t size_of (const T &_v)
 
template<typename T >
size_t size_of (const std::vector< T > &_v, bool _store_size=true)
 
template<typename T >
size_t size_of (void)
 
template<typename T >
size_t size_of (bool _store_size)
 
template<typename T >
size_t store (std::ostream &_os, const T &_v, bool _swap=false)
 
template<typename T >
size_t store (std::ostream &_os, const std::vector< T > &_v, bool _swap=false, bool _store_size=true)
 
template<typename T >
size_t restore (std::istream &_is, T &_v, bool _swap=false)
 
template<typename T >
size_t restore (std::istream &_is, std::vector< T > &_v, bool _swap=false, bool _restore_size=true)
 

Detailed Description

This namespace contains functions for reading and writing polygonal meshes and a list of supported file formats.

Typedef Documentation

◆ float32_t

typedef float OpenMesh::IO::float32_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 92 of file SR_types.hh.

◆ float64_t

typedef double OpenMesh::IO::float64_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 93 of file SR_types.hh.

◆ int16_t

typedef short OpenMesh::IO::int16_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 81 of file SR_types.hh.

◆ int32_t

typedef int OpenMesh::IO::int32_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 85 of file SR_types.hh.

◆ int64_t

typedef long long OpenMesh::IO::int64_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 89 of file SR_types.hh.

◆ int8_t

typedef signed char OpenMesh::IO::int8_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 80 of file SR_types.hh.

◆ rgb_t

typedef uint8_t OpenMesh::IO::rgb_t[3]

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 95 of file SR_types.hh.

◆ rgba_t

typedef uint8_t OpenMesh::IO::rgba_t[4]

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 96 of file SR_types.hh.

◆ uchar

typedef unsigned char OpenMesh::IO::uchar

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 76 of file SR_types.hh.

◆ uint16_t

typedef unsigned short OpenMesh::IO::uint16_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 81 of file SR_types.hh.

◆ uint32_t

typedef unsigned int OpenMesh::IO::uint32_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 85 of file SR_types.hh.

◆ uint64_t

typedef unsigned long long OpenMesh::IO::uint64_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 89 of file SR_types.hh.

◆ uint8_t

typedef unsigned char OpenMesh::IO::uint8_t

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 80 of file SR_types.hh.

◆ ulong

typedef unsigned long OpenMesh::IO::ulong

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 78 of file SR_types.hh.

◆ ushort

typedef unsigned short OpenMesh::IO::ushort

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 77 of file SR_types.hh.

Function Documentation

◆ _reverse_byte_order_N()

template<size_t N>
void OpenMesh::IO::_reverse_byte_order_N ( uint8_t _val)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

◆ _reverse_byte_order_N< 1 >()

template<>
void OpenMesh::IO::_reverse_byte_order_N< 1 > ( uint8_t )
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 95 of file SR_rbo.hh.

◆ _reverse_byte_order_N< 12 >()

template<>
void OpenMesh::IO::_reverse_byte_order_N< 12 > ( uint8_t _val)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 124 of file SR_rbo.hh.

◆ _reverse_byte_order_N< 16 >()

template<>
void OpenMesh::IO::_reverse_byte_order_N< 16 > ( uint8_t _val)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 136 of file SR_rbo.hh.

◆ _reverse_byte_order_N< 2 >()

template<>
void OpenMesh::IO::_reverse_byte_order_N< 2 > ( uint8_t _val)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 99 of file SR_rbo.hh.

◆ _reverse_byte_order_N< 4 >()

template<>
void OpenMesh::IO::_reverse_byte_order_N< 4 > ( uint8_t _val)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 106 of file SR_rbo.hh.

◆ _reverse_byte_order_N< 8 >()

template<>
void OpenMesh::IO::_reverse_byte_order_N< 8 > ( uint8_t _val)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 114 of file SR_rbo.hh.

◆ binary_size()

template<class Mesh >
size_t OpenMesh::IO::binary_size ( const Mesh _mesh,
const std::string &  _ext,
Options  _opt = Options::Default 
)

Get binary size of data.

This function calls the corresponding writer which calculates the size of the data that would be written to a binary file

The file format is determined by parameter _ext. _ext has to include ".[format]" in order to work properly (e.g. ".OFF")

Parameters
_meshMesh to write
_extextension of the file (used to determine the writing module)
_optWriter options (e.g. writing of normals ... depends on the writer capabilities)
Returns
Binary size in bytes used when writing the data

Definition at line 251 of file MeshIO.hh.

◆ castProperty()

template<typename T >
const PropertyT< T > * OpenMesh::IO::castProperty ( const BaseProperty _prop)

Definition at line 151 of file PLYWriter.cc.

◆ compile_time_error__no_fundamental_type()

void OpenMesh::IO::compile_time_error__no_fundamental_type ( )
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 156 of file SR_rbo.hh.

◆ get_property_name()

std::string OpenMesh::IO::get_property_name ( std::string  _string1,
std::string  _string2 
)

Definition at line 1188 of file PLYReader.cc.

◆ get_property_type()

_PLYReader_::ValueType OpenMesh::IO::get_property_type ( const std::string &  _string1,
const std::string &  _string2 
)

Definition at line 1209 of file PLYReader.cc.

◆ IOManager()

OPENMESHDLLEXPORT _IOManager_ & OpenMesh::IO::IOManager ( )

Declare the singleton getter function as friend to access the private constructor and destructor

Definition at line 72 of file IOManager.cc.

◆ is_streamable() [1/2]

template<typename T >
bool OpenMesh::IO::is_streamable ( const T &  )
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 85 of file StoreRestore.hh.

◆ is_streamable() [2/2]

template<typename T >
bool OpenMesh::IO::is_streamable ( void  )
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 81 of file StoreRestore.hh.

◆ OBJReader()

OPENMESHDLLEXPORT _OBJReader_ & OpenMesh::IO::OBJReader ( )

Definition at line 79 of file OBJReader.cc.

◆ OBJWriter()

OPENMESHDLLEXPORT _OBJWriter_ & OpenMesh::IO::OBJWriter ( )

Definition at line 70 of file OBJWriter.cc.

◆ OFFReader()

OPENMESHDLLEXPORT _OFFReader_ & OpenMesh::IO::OFFReader ( )

Definition at line 89 of file OFFReader.cc.

◆ OFFWriter()

OPENMESHDLLEXPORT _OFFWriter_ & OpenMesh::IO::OFFWriter ( )

Definition at line 67 of file OFFWriter.cc.

◆ OMReader()

OPENMESHDLLEXPORT _OMReader_ & OpenMesh::IO::OMReader ( )

Definition at line 76 of file OMReader.cc.

◆ OMWriter()

OPENMESHDLLEXPORT _OMWriter_ & OpenMesh::IO::OMWriter ( )

Definition at line 77 of file OMWriter.cc.

◆ PLYReader()

OPENMESHDLLEXPORT _PLYReader_ & OpenMesh::IO::PLYReader ( )

Definition at line 74 of file PLYReader.cc.

◆ PLYWriter()

OPENMESHDLLEXPORT _PLYWriter_ & OpenMesh::IO::PLYWriter ( )

Definition at line 68 of file PLYWriter.cc.

◆ read_double() [1/2]

double OpenMesh::IO::read_double ( FILE *  _in,
bool  _swap = false 
)

Binary read a double from _is and perform byte swapping if _swap is true

◆ read_double() [2/2]

double OpenMesh::IO::read_double ( std::istream &  _in,
bool  _swap = false 
)

Binary read a double from _is and perform byte swapping if _swap is true

◆ read_float() [1/2]

float OpenMesh::IO::read_float ( FILE *  _in,
bool  _swap = false 
)

Binary read a float from _is and perform byte swapping if _swap is true

◆ read_float() [2/2]

float OpenMesh::IO::read_float ( std::istream &  _in,
bool  _swap = false 
)

Binary read a float from _is and perform byte swapping if _swap is true

◆ read_int() [1/2]

int OpenMesh::IO::read_int ( FILE *  _in,
bool  _swap = false 
)

Binary read an int from _is and perform byte swapping if _swap is true

◆ read_int() [2/2]

int OpenMesh::IO::read_int ( std::istream &  _in,
bool  _swap = false 
)

Binary read an int from _is and perform byte swapping if _swap is true

◆ read_mesh() [1/3]

template<class Mesh >
bool OpenMesh::IO::read_mesh ( Mesh _mesh,
const std::string &  _filename 
)

Read a mesh from file _filename.

The file format is determined by the file extension.

Note
If you link statically against OpenMesh, you have to add the define OM_STATIC_BUILD to your application. This will ensure that readers and writers get initialized correctly.
Parameters
_meshThe target mesh that will be filled with the read data
_filenamefill to load
Returns
Successful?

Definition at line 95 of file MeshIO.hh.

◆ read_mesh() [2/3]

template<class Mesh >
bool OpenMesh::IO::read_mesh ( Mesh _mesh,
const std::string &  _filename,
Options _opt,
bool  _clear = true 
)

Read a mesh from file _filename.

The file format is determined by the file extension.

Note
If you link statically against OpenMesh, you have to add the define OM_STATIC_BUILD to your application. This will ensure that readers and writers get initialized correctly.
Parameters
_meshThe target mesh that will be filled with the read data
_filenamefill to load
_optReader options (e.g. skip loading of normals ... depends on the reader capabilities). Note that simply passing an Options::Flag enum is not sufficient.
_clearClear the target data before filling it (allows to load multiple files into one Mesh). If you only want to read a mesh without clearing set _clear to false. Providing a default Options object is sufficient in this case.
Returns
Successful?

Definition at line 125 of file MeshIO.hh.

◆ read_mesh() [3/3]

template<class Mesh >
bool OpenMesh::IO::read_mesh ( Mesh _mesh,
std::istream &  _is,
const std::string &  _ext,
Options _opt,
bool  _clear = true 
)

Read a mesh from file open std::istream.

The file format is determined by parameter _ext. _ext has to include ".[format]" in order to work properly (e.g. ".OFF")

Note
If you link statically against OpenMesh, you have to add the define OM_STATIC_BUILD to your application. This will ensure that readers and writers get initialized correctly.
Parameters
_meshThe target mesh that will be filled with the read data
_isstream to load the data from
_extThe file format that is written to the stream
_optReader options (e.g. skip loading of normals ... depends on the reader capabilities)
_clearClear the target data before filling it (allows to load multiple files into one Mesh)
Returns
Successful?

Definition at line 157 of file MeshIO.hh.

◆ read_short() [1/2]

short int OpenMesh::IO::read_short ( FILE *  _in,
bool  _swap = false 
)

Binary read a short from _is and perform byte swapping if _swap is true

◆ read_short() [2/2]

short int OpenMesh::IO::read_short ( std::istream &  _in,
bool  _swap = false 
)

Binary read a short from _is and perform byte swapping if _swap is true

◆ remove_duplicated_vertices()

void OpenMesh::IO::remove_duplicated_vertices ( BaseImporter::VHandles &  _indices)

Definition at line 101 of file OBJReader.cc.

◆ restore() [1/4]

template<typename T >
size_t OpenMesh::IO::restore ( std::istream &  _is,
std::vector< T > &  _v,
bool  _swap = false,
bool  _restore_size = true 
)
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 117 of file StoreRestore.hh.

◆ restore() [2/4]

template<typename T >
size_t OpenMesh::IO::restore ( std::istream &  _is,
T &  _v,
bool  _swap = false 
)
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 113 of file StoreRestore.hh.

◆ restore() [3/4]

template<typename T >
size_t OpenMesh::IO::restore ( std::istream &  _is,
T &  _val,
OMFormat::Chunk::Integer_Size  _b,
bool  _swap,
t_signed   
)

Definition at line 146 of file OMFormatT_impl.hh.

◆ restore() [4/4]

template<typename T >
size_t OpenMesh::IO::restore ( std::istream &  _is,
T &  _val,
OMFormat::Chunk::Integer_Size  _b,
bool  _swap,
t_unsigned   
)

Definition at line 193 of file OMFormatT_impl.hh.

◆ reverse_byte_order() [1/6]

template<>
bool & OpenMesh::IO::reverse_byte_order ( bool &  _t)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 171 of file SR_rbo.hh.

◆ reverse_byte_order() [2/6]

template<>
char & OpenMesh::IO::reverse_byte_order ( char &  _t)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 172 of file SR_rbo.hh.

◆ reverse_byte_order() [3/6]

template<typename T >
T OpenMesh::IO::reverse_byte_order ( const T &  a)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 235 of file SR_rbo.hh.

◆ reverse_byte_order() [4/6]

template<typename T >
T & OpenMesh::IO::reverse_byte_order ( T &  _t)

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 164 of file SR_rbo.hh.

◆ reverse_byte_order() [5/6]

template<typename T >
T * OpenMesh::IO::reverse_byte_order ( T *  t)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

◆ reverse_byte_order() [6/6]

template<>
uchar & OpenMesh::IO::reverse_byte_order ( uchar _t)
inline

this does not compile for g++3.4 and higher, hence we comment the function body which will result in a linker error

Definition at line 176 of file SR_rbo.hh.

◆ size_of() [1/4]

template<typename T >
size_t OpenMesh::IO::size_of ( bool  _store_size)
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 101 of file StoreRestore.hh.

◆ size_of() [2/4]

template<typename T >
size_t OpenMesh::IO::size_of ( const std::vector< T > &  _v,
bool  _store_size = true 
)
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 93 of file StoreRestore.hh.

◆ size_of() [3/4]

template<typename T >
size_t OpenMesh::IO::size_of ( const T &  _v)
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 89 of file StoreRestore.hh.

◆ size_of() [4/4]

template<typename T >
size_t OpenMesh::IO::size_of ( void  )
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 97 of file StoreRestore.hh.

◆ STLReader()

OPENMESHDLLEXPORT _STLReader_ & OpenMesh::IO::STLReader ( )

Definition at line 80 of file STLReader.cc.

◆ STLWriter()

OPENMESHDLLEXPORT _STLWriter_ & OpenMesh::IO::STLWriter ( )

Definition at line 69 of file STLWriter.cc.

◆ store() [1/4]

template<typename T >
size_t OpenMesh::IO::store ( std::ostream &  _os,
const std::vector< T > &  _v,
bool  _swap = false,
bool  _store_size = true 
)
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 109 of file StoreRestore.hh.

◆ store() [2/4]

template<typename T >
size_t OpenMesh::IO::store ( std::ostream &  _os,
const T &  _v,
bool  _swap = false 
)
inline

Binary read a short from _is and perform byte swapping if _swap is true

Definition at line 105 of file StoreRestore.hh.

◆ store() [3/4]

template<typename T >
size_t OpenMesh::IO::store ( std::ostream &  _os,
const T &  _val,
OMFormat::Chunk::Integer_Size  _b,
bool  _swap,
t_signed   
)

Definition at line 69 of file OMFormatT_impl.hh.

◆ store() [4/4]

template<typename T >
size_t OpenMesh::IO::store ( std::ostream &  _os,
const T &  _val,
OMFormat::Chunk::Integer_Size  _b,
bool  _swap,
t_unsigned   
)

Definition at line 107 of file OMFormatT_impl.hh.

◆ trimStdString()

void OpenMesh::IO::trimStdString ( std::string &  _string)

Definition at line 198 of file STLReader.cc.

◆ trimString()

void OpenMesh::IO::trimString ( std::string &  _string)

Definition at line 86 of file OBJReader.cc.

◆ VTKWriter()

OPENMESHDLLEXPORT _VTKWriter_ & OpenMesh::IO::VTKWriter ( )

Definition at line 19 of file VTKWriter.cc.

◆ write_double() [1/2]

void OpenMesh::IO::write_double ( double  _d,
FILE *  _out,
bool  _swap = false 
)

Binary write a double to _os and perform byte swapping if _swap is true

◆ write_double() [2/2]

void OpenMesh::IO::write_double ( double  _d,
std::ostream &  _out,
bool  _swap = false 
)

Binary write a double to _os and perform byte swapping if _swap is true

◆ write_float() [1/2]

void OpenMesh::IO::write_float ( float  _f,
FILE *  _out,
bool  _swap = false 
)

Binary write a float to _os and perform byte swapping if _swap is true

◆ write_float() [2/2]

void OpenMesh::IO::write_float ( float  _f,
std::ostream &  _out,
bool  _swap = false 
)

Binary write a float to _os and perform byte swapping if _swap is true

◆ write_int() [1/2]

void OpenMesh::IO::write_int ( int  _i,
FILE *  _out,
bool  _swap = false 
)

Binary write an int to _os and perform byte swapping if _swap is true

◆ write_int() [2/2]

void OpenMesh::IO::write_int ( int  _i,
std::ostream &  _out,
bool  _swap = false 
)

Binary write an int to _os and perform byte swapping if _swap is true

◆ write_mesh() [1/2]

template<class Mesh >
bool OpenMesh::IO::write_mesh ( const Mesh _mesh,
const std::string &  _filename,
Options  _opt = Options::Default,
std::streamsize  _precision = 6 
)

Write a mesh to the file _filename.

The file format is determined by _filename's extension.

Note
If you link statically against OpenMesh, you have to add the define OM_STATIC_BUILD to your application. This will ensure that readers and writers get initialized correctly.
Parameters
_meshThe mesh that will be written to file
_filenameoutput filename
_optWriter options (e.g. writing of normals ... depends on the writer capabilities)
_precisionspecifies stream precision for ascii files
Returns
Successful?

Definition at line 190 of file MeshIO.hh.

◆ write_mesh() [2/2]

template<class Mesh >
bool OpenMesh::IO::write_mesh ( const Mesh _mesh,
std::ostream &  _os,
const std::string &  _ext,
Options  _opt = Options::Default,
std::streamsize  _precision = 6 
)

Write a mesh to an open std::ostream.

The file format is determined by parameter _ext. _ext has to include ".[format]" in order to work properly (e.g. ".OFF")

Note
If you link statically against OpenMesh, you have to add the define OM_STATIC_BUILD to your application. This will ensure that readers and writers get initialized correctly.
Parameters
_meshThe mesh that will be written to file
_osoutput stream to write into
_extextension defining the type of output
_optWriter options (e.g. writing of normals ... depends on the writer capabilities)
_precisionspecifies stream precision for ascii files
Returns
Successful?

Definition at line 222 of file MeshIO.hh.

◆ write_short() [1/2]

void OpenMesh::IO::write_short ( short int  _i,
FILE *  _out,
bool  _swap = false 
)

Binary write a short to _os and perform byte swapping if _swap is true

◆ write_short() [2/2]

void OpenMesh::IO::write_short ( short int  _i,
std::ostream &  _out,
bool  _swap = false 
)

Binary write a short to _os and perform byte swapping if _swap is true

Variable Documentation

◆ __OBJReaderInstance

_OBJReader_ OpenMesh::IO::__OBJReaderInstance

Definition at line 78 of file OBJReader.cc.

◆ __OBJWriterinstance

_OBJWriter_ OpenMesh::IO::__OBJWriterinstance

Declare the single entity of the OBJ writer.

Definition at line 69 of file OBJWriter.cc.

◆ __OFFReaderInstance

_OFFReader_ OpenMesh::IO::__OFFReaderInstance

Declare the single entity of the OFF reader.

Definition at line 88 of file OFFReader.cc.

◆ __OFFWriterInstance

_OFFWriter_ OpenMesh::IO::__OFFWriterInstance

Declare the single entity of the OFF writer.

Definition at line 66 of file OFFWriter.cc.

◆ __OMReaderInstance

_OMReader_ OpenMesh::IO::__OMReaderInstance

Declare the single entity of the OM reader.

Definition at line 75 of file OMReader.cc.

◆ __OMWriterInstance

_OMWriter_ OpenMesh::IO::__OMWriterInstance

Declare the single entity of the OM writer.

Definition at line 76 of file OMWriter.cc.

◆ __PLYReaderInstance

_PLYReader_ OpenMesh::IO::__PLYReaderInstance

Declare the single entity of the PLY reader.

Definition at line 73 of file PLYReader.cc.

◆ __PLYWriterInstance

_PLYWriter_ OpenMesh::IO::__PLYWriterInstance

Declare the single entity of the PLY writer.

Definition at line 67 of file PLYWriter.cc.

◆ __STLReaderInstance

_STLReader_ OpenMesh::IO::__STLReaderInstance

Declare the single entity of the STL reader.

Definition at line 79 of file STLReader.cc.

◆ __STLWriterInstance

_STLWriter_ OpenMesh::IO::__STLWriterInstance

Definition at line 68 of file STLWriter.cc.

◆ __VTKWriterinstance

_VTKWriter_ OpenMesh::IO::__VTKWriterinstance

Declare the single entity of the OBJ writer.

Definition at line 18 of file VTKWriter.cc.