-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
1,402 additions
and
691 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/*----------------------------------------------------------------------------*/ | ||
#ifndef GMDS_LIMA_WRITER_STREAM_MLI2_H | ||
#define GMDS_LIMA_WRITER_STREAM_MLI2_H | ||
/*----------------------------------------------------------------------------*/ | ||
#include <map> | ||
#include <sstream> | ||
/*----------------------------------------------------------------------------*/ | ||
// headers of GMDS files | ||
#include <gmds/ig/Mesh.h> | ||
#include "GMDSIo_export.h" | ||
/*----------------------------------------------------------------------------*/ | ||
#include <Lima/malipp2.h> | ||
/*----------------------------------------------------------------------------*/ | ||
namespace gmds { | ||
|
||
class GMDSIo_API LimaWriterStreamMli2 | ||
{ | ||
public: | ||
/*------------------------------------------------------------------------*/ | ||
/** \brief Constructor. | ||
* | ||
* \param AMesh the mesh we want to write into a file. | ||
*/ | ||
LimaWriterStreamMli2(Mesh &AMesh); | ||
|
||
/*------------------------------------------------------------------------*/ | ||
/** \brief Destructor. */ | ||
virtual ~LimaWriterStreamMli2(); | ||
|
||
/*------------------------------------------------------------------------*/ | ||
/** \brief Set the mesh length unit. It is the conversion factor from meters | ||
*/ | ||
void setLengthUnit(double AUnit); | ||
|
||
/*------------------------------------------------------------------------*/ | ||
/** \brief Write the content of mesh_ into the file named AFileName. | ||
*/ | ||
void write(const std::string &AFileName, MeshModel AModel, int ACompact = false); | ||
|
||
/*------------------------------------------------------------------------*/ | ||
/** \brief Activate the zlib compression. | ||
*/ | ||
void activateZlibCompression(); | ||
|
||
private: | ||
void writeNodes(); | ||
void writeEdges(); | ||
void writeFaces(); | ||
void writeRegions(); | ||
|
||
void writeClouds(); | ||
void writeLines(); | ||
void writeSurfaces(); | ||
void writeVolumes(); | ||
|
||
void writeNodesAttributes(); | ||
void writeEdgesAttributes(); | ||
void writeFacesAttributes(); | ||
void writeRegionsAttributes(); | ||
|
||
void writeCloudsAttributes(); | ||
void writeLinesAttributes(); | ||
void writeSurfacesAttributes(); | ||
void writeVolumesAttributes(); | ||
|
||
/**@brief Check if the node ids are continuously ordered and | ||
* initialized the MaliPPWriter2 accordingly. | ||
*/ | ||
void checkContinuousNodes(); | ||
/**@brief Check if the edge ids are continuously ordered and | ||
* initialized the MaliPPWriter2 accordingly. | ||
*/ | ||
void checkContinuousEdges(); | ||
/**@brief Check if the face ids are continuously ordered and | ||
* initialized the MaliPPWriter2 accordingly. | ||
*/ | ||
void checkContinuousFaces(); | ||
/**@brief Check if the region ids are continuously ordered and | ||
* initialized the MaliPPWriter2 accordingly. | ||
*/ | ||
void checkContinuousRegions(); | ||
private: | ||
/* a mesh */ | ||
gmds::Mesh &m_mesh; | ||
|
||
/* length unit */ | ||
double m_length_unit; | ||
|
||
Lima::MaliPPWriter2 *m_writer; | ||
}; | ||
} | ||
/*----------------------------------------------------------------------------*/ | ||
#endif //GMDS_LIMA_WRITER_STREAM_MLI2_H |
Oops, something went wrong.