86 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-FileOFF")
89 void openedFile(
int _id );
90 void addEmptyObject(
DataType _type,
int& _id);
91 void load(QString _filename,
DataType _type,
int& _id);
92 void save(
int _id , QString _filename );
93 void log(
Logtype _type, QString _message);
94 void log(QString _message);
96 void updatedObject(
int _identifier,
const UpdateType& _type);
98 void deleteObject(
int _id );
101 void showStatusMessage(QString _message,
int _timeout = 0);
106 void fileOpened(
int ){};
127 QString
name() {
return (QString(
"FileOFF")); };
128 QString
description( ) {
return (QString(tr(
"Load/Save OFF-Files"))); };
146 bool saveObject(
int _id, QString _filename);
148 QString version() {
return QString(
"1.1"); };
165 int getColorType(std::string& _line,
bool _texCoordsAvailable);
175 void readValue(std::istream& _in,
float& _value)
const {
178 OpenMesh::IO::restore( _in , tmp,
false );
182 void readValue(std::istream& _in,
int& _value)
const {
185 OpenMesh::IO::restore( _in , tmp,
false );
189 void readValue(std::istream& _in,
unsigned int& _value)
const {
192 OpenMesh::IO::restore( _in , tmp,
false );
196 void writeValue(std::ostream& _out,
int value)
const {
199 OpenMesh::IO::store(_out, tmp,
false);
202 void writeValue(std::ostream& _out,
unsigned int value)
const {
205 OpenMesh::IO::store(_out, tmp,
false);
208 void writeValue(std::ostream& _out,
float value)
const {
211 OpenMesh::IO::store(_out, tmp,
false);
214 void trimString( std::string& _string);
223 bool getCleanLine( std::istream& ifs , std::string& _string,
bool _skipEmptyLines =
true);
229 template<
class MeshT >
233 template<
class MeshT >
237 template<
class MeshT >
241 template <
class MeshT>
245 QWidget* loadOptions_;
246 QWidget* saveOptions_;
248 QCheckBox* saveBinary_;
249 QCheckBox* saveVertexColor_;
250 QCheckBox* saveFaceColor_;
251 QCheckBox* saveAlpha_;
252 QCheckBox* saveNormals_;
253 QCheckBox* saveTexCoords_;
254 QLabel* savePrecisionLabel_;
255 QSpinBox* savePrecision_;
256 QPushButton* saveDefaultButton_;
259 QComboBox* triMeshHandling_;
260 QCheckBox* loadVertexColor_;
261 QCheckBox* loadFaceColor_;
262 QCheckBox* loadAlpha_;
263 QCheckBox* loadNormals_;
264 QCheckBox* loadTexCoords_;
265 QCheckBox* loadCheckManifold_;
266 QPushButton* loadDefaultButton_;
268 unsigned int userReadOptions_;
269 unsigned int userWriteOptions_;
271 bool forceTriangleMesh_;
274 OFFImporter::ObjectOptionsE trimeshOptions_;
bool extendedFaceColorTest(std::istream &_in, uint _nV, uint _nF, int _nB) const
Test if there are face color components (_nV is the initial face valence)