DGtal
1.5.beta
|
Aim: Export a Mesh (Mesh object) in different format as OFF and OBJ). More...
#include <DGtal/io/writers/MeshWriter.h>
Static Public Member Functions | |
static bool | export2OFF (std::ostream &out, const Mesh< TPoint > &aMesh, bool exportColor=true) |
static bool | export2OBJ (std::ostream &out, const Mesh< TPoint > &aMesh) |
static bool | export2OBJ_colors (std::ostream &out, std::ostream &outMTL, const std::string nameMTLFile, const Mesh< TPoint > &aMesh) |
static bool | export2OBJ_colors (std::ostream &out, const Mesh< TPoint > &aMesh) |
Aim: Export a Mesh (Mesh object) in different format as OFF and OBJ).
Description of template struct 'MeshWriter'
The exportation can be done automatically according the input file extension with the ">>" operator
Example of typical use: First you have to add the following include files:
Then you create a simple Mesh object:
Finally you can export directly the Mesh object:
Definition at line 76 of file MeshWriter.h.
|
static |
|
static |
|
static |
Export a Mesh towards a OBJ format including face colors.
[out] | out | the output stream of the exported OBJ object. |
[out] | outMTL | the output stream associated to the material file. |
[in] | nameMTLFile | the file name of the material file. If an empty string is given, the material will be written inside the output stream. |
[in] | aMesh | the Mesh object to be exported. |
|
static |
Export Mesh towards a OFF format. By default the face colors are exported (if they are stored in the Mesh object).
out | the output stream of the exported OFF object. |
aMesh | the Mesh object to be exported. |
exportColor | true to try to export the face colors if they are stored in the Mesh object (default true). |
Referenced by DGtal::Shortcuts< TKSpace >::saveOFF(), and testMeshGeneration().