Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FilePLYPlugin Class Reference
Inheritance diagram for FilePLYPlugin:
BaseInterface FileInterface LoadSaveInterface LoggingInterface ScriptInterface

Classes

struct  PLYHeader

Public Slots

int loadObject (QString _filename)
 Loads Object and converts it to a triangle mesh if possible.
int loadObject (QString _filename, DataType _type)
 Loads object with forcing the given datatype.
int loadPolyMeshObject (QString _filename, const PLYHeader &_header)
 Always loads mesh as polymesh.
int loadTriMeshObject (QString _filename, const PLYHeader &_header)
 Loads a triangle mesh.
bool saveObject (int _id, QString _filename)
QString version ()

Signals

void openedFile (int _id)
void addEmptyObject (DataType _type, int &_id)
void load (QString _filename, DataType _type, int &_id)
void save (int _id, QString _filename)
void log (Logtype _type, QString _message)
void log (QString _message)
void updateView ()
void deleteObject (int _id)
- Signals inherited from BaseInterface
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer.
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer.
virtual void updateView ()
 Update current view in Main Application.
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin.
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin.
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden.
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot.
- Signals inherited from FileInterface
virtual void openedFile (int _id)
 This signal has to be emitted if an object has been loaded from a file.
- Signals inherited from LoadSaveInterface
virtual void save (int _id, QString _filename)
 Save object to a file.
virtual void load (QString _filename, DataType _type, int &_id)
 Load object from file with a specific DataType.
virtual void addEmptyObject (DataType _type, int &_id)
virtual void copyObject (int _oldId, int &_newId)
virtual void emptyObjectAdded (int _id)
 DEPRECATED! Emit this signal if an empty object has been created.
virtual void deleteObject (int _id)
 Delete an object.
virtual void deleteAllObjects ()
 Delete all Objects.
virtual void getAllFileFilters (QStringList &_filters)
 Get all file filters that are registered.
- Signals inherited from LoggingInterface
virtual void log (Logtype _type, QString _message)=0
virtual void log (QString _message)=0
- Signals inherited from ScriptInterface
virtual void executeScript (QString _script)
virtual void executeFileScript (QString _filename)
virtual void getAvailableFunctions (QStringList &_functions)
virtual void getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
virtual void scriptInfo (QString _functionWithParameters)
 Emit this signal if a scriptable function is executed.
virtual void getScriptingEngine (QScriptEngine *&_engine)

Public Member Functions

 FilePLYPlugin ()
 Constructor.
QString name ()
QString description ()
DataType supportedType ()
QString getSaveFilters ()
QString getLoadFilters ()
QWidget * saveOptionsWidget (QString)
QWidget * loadOptionsWidget (QString)

Private Types

typedef std::pair< std::string,
std::string > 
PPair

Private Slots

void fileOpened (int)
void noguiSupported ()
void initializePlugin ()
void slotLoadDefault ()
 Slot called when user wants to save the given Load options as default.
void slotSaveDefault ()
 Slot called when user wants to save the given Save options as default.

Private Member Functions

size_t getTypeSize (std::string _type)
bool parseHeader (QString _filename, PLYHeader &_header)
template<class MeshT >
bool readMeshFileAscii (QString _filename, MeshT *_mesh, const PLYHeader &_header)
template<class MeshT >
bool readMeshFileBinary (QString _filename, MeshT *_mesh, const PLYHeader &_header)
template<class MeshT >
bool writeMeshFileAscii (QString _filename, MeshT *_mesh)
template<class MeshT >
bool writeMeshFileBinary (QString _filename, MeshT *_mesh)
template<class MeshT >
void writeHeader (std::ofstream &_os, MeshT *_mesh, bool _binary)
template<class MeshT >
void backupTextureCoordinates (MeshT &_mesh)
 creates a backup of the original per vertex/face texture coordinates
template<class T >
void readValue (std::istream &_in, T &_value, bool _bigEndian) const
 Helper functions for writing/reading of binary data.
template<class T >
void writeValue (std::ostream &_out, T value, bool _bigEndian=false) const
- Private Member Functions inherited from BaseInterface
virtual ~BaseInterface ()
 Destructor.
virtual QString name ()=0
 Return a name for the plugin.
virtual QString description ()=0
 Return a description of what the plugin is doing.
- Private Member Functions inherited from FileInterface
virtual ~FileInterface ()
 Destructor.
virtual QWidget * saveOptionsWidget (QString _currentFilter)=0
virtual QWidget * loadOptionsWidget (QString _currentFilter)=0
virtual DataType supportedType ()=0
 Return your supported object type( e.g. DATA_TRIANGLE_MESH )
virtual QString getLoadFilters ()=0
virtual QString getSaveFilters ()=0
- Private Member Functions inherited from LoadSaveInterface
virtual ~LoadSaveInterface ()
 Destructor.
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor.
- Private Member Functions inherited from ScriptInterface
virtual ~ScriptInterface ()
 Destructor.

Private Attributes

QWidget * loadOptions_
QWidget * saveOptions_
QCheckBox * saveBinary_
QCheckBox * saveVertexNormal_
QCheckBox * saveVertexColor_
QCheckBox * saveVertexTexCoord_
QCheckBox * saveFaceNormal_
QCheckBox * saveFaceColor_
QPushButton * saveDefaultButton_
QComboBox * triMeshHandling_
QCheckBox * loadVertexNormal_
QCheckBox * loadVertexColor_
QCheckBox * loadVertexTexCoord_
QCheckBox * loadFaceNormal_
QCheckBox * loadFaceColor_
QPushButton * loadDefaultButton_

Detailed Description

Definition at line 60 of file FilePLY.hh.

Member Function Documentation

int FilePLYPlugin::loadPolyMeshObject ( QString  _filename,
const PLYHeader _header 
)
slot

Always loads mesh as polymesh.

load a poly-mesh with given filename

Definition at line 561 of file FilePLY.cc.

int FilePLYPlugin::loadTriMeshObject ( QString  _filename,
const PLYHeader _header 
)
slot

Loads a triangle mesh.

load a triangle-mesh with given filename

Definition at line 505 of file FilePLY.cc.

template<class MeshT >
bool FilePLYPlugin::readMeshFileAscii ( QString  _filename,
MeshT *  _mesh,
const PLYHeader _header 
)
private
Todo:
Make this set the ambient vertex color of overlaying material node
Todo:
Make this set the specular vertex color of overlaying material node
Todo:
Make this set the ambient face color of overlaying material node
Todo:
Make this set the specular face color of overlaying material node

Definition at line 54 of file FilePLYT.cc.


The documentation for this class was generated from the following files: