50 #ifndef FILEPLYPLUGIN_HH 51 #define FILEPLYPLUGIN_HH 82 #if QT_VERSION >= 0x050000 83 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-PLY")
87 void openedFile(
int _id );
88 void addEmptyObject(
DataType _type,
int& _id);
89 void load(QString _filename,
DataType _type,
int& _id);
90 void save(
int _id , QString _filename );
91 void log(
Logtype _type, QString _message);
92 void log(QString _message);
94 void updatedObject(
int _identifier,
const UpdateType& _type);
96 void deleteObject(
int _id );
100 void fileOpened(
int ){};
121 QString
name() {
return (QString(
"FilePLY")); };
122 QString
description( ) {
return (QString(tr(
"Load/Save PLY-Files"))); };
146 bool saveObject(
int _id, QString _filename);
148 QString version() {
return QString(
"1.0"); };
154 template <
class MeshT>
158 QWidget* loadOptions_;
159 QWidget* saveOptions_;
161 QCheckBox* saveBinary_;
162 QCheckBox* saveVertexNormal_;
163 QCheckBox* saveVertexColor_;
164 QCheckBox* saveVertexTexCoord_;
165 QCheckBox* saveFaceNormal_;
166 QCheckBox* saveFaceColor_;
167 QLabel* savePrecisionLabel_;
168 QSpinBox* savePrecision_;
169 QPushButton* saveDefaultButton_;
171 QComboBox* triMeshHandling_;
172 QCheckBox* loadVertexNormal_;
173 QCheckBox* loadVertexColor_;
174 QCheckBox* loadVertexTexCoord_;
175 QCheckBox* loadFaceNormal_;
176 QCheckBox* loadFaceColor_;
177 QPushButton* loadDefaultButton_;
182 #if defined(INCLUDE_TEMPLATES) && !defined(FILEPLYPLUGIN_C) 183 #define FILEPLYPLUGIN_TEMPLATES 184 #include "FilePLYT.cc" 187 #endif //FILEPLYPLUGIN_HH
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
void initializePlugin()
Initialize Plugin.
Logtype
Log types for Message Window.
int loadPolyMeshObject(QString _filename, OpenMesh::IO::Options &_opt)
Always loads mesh as polymesh.
QString name()
Return a name for the plugin.
Interface for all Plugins which provide scriptable Functions.
Interface class from which all plugins have to be created.
void slotLoadDefault()
Slot called when user wants to save the given Load options as default.
FilePLYPlugin()
Constructor.
Interface for all Plugins which do logging to the logging window of the framework.
QWidget * loadOptionsWidget(QString)
QWidget * saveOptionsWidget(QString)
int loadTriMeshObject(QString _filename, OpenMesh::IO::Options &_opt)
Loads a triangle mesh.
Set options for reader/writer modules.
Interface class for file handling.
QString description()
Return a description of what the plugin is doing.
int loadObject(QString _filename)
Loads Object and converts it to a triangle mesh if possible.
Interface for all plugins which want to Load or Save files and create Objects.
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
void handleTrimeshDialog()
Displays a dialog to ask how to load the mesh (triangle, polymesh , autodetect)
void backupTextureCoordinates(MeshT &_mesh)
creates a backup of the original per vertex/face texture coordinates