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
QString description()
Return a description of what the plugin is doing.
Interface class from which all plugins have to be created.
Logtype
Log types for Message Window.
int loadObject(QString _filename)
Loads Object and converts it to a triangle mesh if possible.
Interface for all Plugins which do logging to the logging window of the framework.
Interface class for file handling.
Set options for reader/writer modules.
void handleTrimeshDialog()
Displays a dialog to ask how to load the mesh (triangle, polymesh , autodetect)
void slotLoadDefault()
Slot called when user wants to save the given Load options as default.
Interface for all Plugins which provide scriptable Functions.
void initializePlugin()
Initialize Plugin.
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Interface for all plugins which want to Load or Save files and create Objects.
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
int loadTriMeshObject(QString _filename, OpenMesh::IO::Options &_opt)
Loads a triangle mesh.
int loadPolyMeshObject(QString _filename, OpenMesh::IO::Options &_opt)
Always loads mesh as polymesh.
FilePLYPlugin()
Constructor.
QWidget * loadOptionsWidget(QString)
void backupTextureCoordinates(MeshT &_mesh)
creates a backup of the original per vertex/face texture coordinates
QWidget * saveOptionsWidget(QString)
QString name()
Return a name for the plugin.