Developer Documentation
Loading...
Searching...
No Matches
MergePlugin Class Reference
Inheritance diagram for MergePlugin:
BaseInterface ToolboxInterface LoggingInterface LoadSaveInterface ScriptInterface

Public Slots

void initializePlugin ()
 init the Toolbox
 
void pluginsInitialized ()
 
void mergeObjects ()
 merge two objects with target flag
 
int mergeObjects (const std::vector< BaseObjectData * > &_objects, QString _name="merged object", bool _deleteSeparateObjects=true, DataType type_=typeId("TriangleMesh"))
 mergeObjects merges multiple OpenFlipper Objects of Type TriMesh or PolyMesh into one combined Mesh.
 
int mergeObjects (IdList _objects, QString _name="merged object", bool _deleteSeparateObjects=true, DataType type_=typeId("TriangleMesh"))
 mergeObjects
 
void slotCleanup (DataType _type, bool _deleteSeparateObjects)
 slotCleanup is called when the cleanup event is processed at the end of mergeObjects.
 
QString version ()
 

Signals

void updateView ()
 
void updatedObject (int _identifier, const UpdateType &_type)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void addEmptyObject (DataType _type, int &_objectId)
 
void deleteObject (int _id)
 
void addToolbox (QString _name, QWidget *_widget)
 
void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 
void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 
void cleanup (DataType _type, bool _deleteSeparateObjects)
 
- Signals inherited from BaseInterface
virtual void updateView ()
 Update current view in Main Application.
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot.
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer.
 
- Signals inherited from ToolboxInterface
virtual void addToolbox (QString _name, QWidget *_widget)
 Add a toolbox widget to the gui with the given name.
 
- Signals inherited from LoggingInterface
virtual void log (Logtype _type, QString _message)=0
 
virtual void log (QString _message)=0
 
- 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.
 
- Signals inherited from ScriptInterface
virtual void scriptInfo (QString _functionWithParameters)
 Emit this signal if a scriptable function is executed.
 
virtual void getScriptingEngine (QScriptEngine *&_engine)
 
virtual void executeFileScript (QString _filename)
 
virtual void getAvailableFunctions (QStringList &_functions)
 

Public Member Functions

QString name ()
 Return a name for the plugin.
 
QString description ()
 Return a description of what the plugin is doing.
 

Private Slots

void noguiSupported ()
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin.
 

Private Member Functions

DataType checkType (const std::vector< BaseObjectData * > &)
 
template<class MeshT >
void mergeMeshes (const std::vector< MeshT * > &_meshes)
 merges Meshes into the first mesh
 
template<class MeshT >
void mergeMeshes (const std::vector< MeshT * > &_meshes, typename MeshT::VertexHandle &_vhB)
 merges meshes together and maps the VertexHandle _vhB from _meshes[max] to its new handle in _meshes[0]
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor.
 
virtual void blockScenegraphUpdates (bool _block)
 Tell the core to prevent scenegraph updates.
 
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 getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer.
 
- Private Member Functions inherited from ToolboxInterface
virtual ~ToolboxInterface ()
 Destructor.
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 Add a toolbox widget to the gui with the given name and an icon.
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon, QWidget *_headerAreaWidget)
 Add a toolbox widget to the gui with the given name, icon and header area widget.
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor.
 
- Private Member Functions inherited from LoadSaveInterface
virtual ~LoadSaveInterface ()
 Destructor.
 
virtual void addEmptyObject (DataType _type, int &_id)
 
virtual void copyObject (int _oldId, int &_newId)
 
virtual void emptyObjectAdded (int _id)
 DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created.
 
virtual void deleteObject (int _id)
 Delete an object
This signal can be called from any thread.
.
 
virtual void deleteAllObjects ()
 Delete all Objects.
 
virtual void getAllFileFilters (QStringList &_filters)
 Get all file filters that are registered.
 
- Private Member Functions inherited from ScriptInterface
virtual ~ScriptInterface ()
 Destructor.
 
virtual void showScriptInEditor (QString _filename)
 
virtual void executeScript (QString _script)
 
virtual void getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
 

Private Attributes

MergeToolBoxtool_
 
QIcon * toolIcon_
 
std::vector< int > convertedIds
 
std::vector< BaseObjectData * > objects
 
int polyMergeID
 
int triMergeID
 

Detailed Description

Definition at line 54 of file MergePlugin.hh.

Constructor & Destructor Documentation

◆ MergePlugin()

MergePlugin::MergePlugin ( )

Definition at line 158 of file MergePlugin.cc.

◆ ~MergePlugin()

MergePlugin::~MergePlugin ( )

Definition at line 167 of file MergePlugin.cc.

Member Function Documentation

◆ checkType()

DataType MergePlugin::checkType ( const std::vector< BaseObjectData * > &  objects)
private

Definition at line 117 of file MergePlugin.cc.

◆ description()

QString MergePlugin::description ( )
inlinevirtual

Return a description of what the plugin is doing.

This function has to return a basic description of the plugin

Implements BaseInterface.

Definition at line 95 of file MergePlugin.hh.

◆ initializePlugin

void MergePlugin::initializePlugin ( )
slot

init the Toolbox

Definition at line 172 of file MergePlugin.cc.

◆ mergeMeshes() [1/2]

template<class MeshT >
void MergePlugin::mergeMeshes ( const std::vector< MeshT * > &  _meshes)
private

merges Meshes into the first mesh

Definition at line 51 of file MergePlugintemplate.cc.

◆ mergeMeshes() [2/2]

template<class MeshT >
void MergePlugin::mergeMeshes ( const std::vector< MeshT * > &  _meshes,
typename MeshT::VertexHandle &  _vhB 
)
private

merges meshes together and maps the VertexHandle _vhB from _meshes[max] to its new handle in _meshes[0]

Definition at line 60 of file MergePlugintemplate.cc.

◆ mergeObjects [1/3]

void MergePlugin::mergeObjects ( )
slot

merge two objects with target flag

Definition at line 279 of file MergePlugin.cc.

◆ mergeObjects [2/3]

int MergePlugin::mergeObjects ( const std::vector< BaseObjectData * > &  _objects,
QString  _name = "merged object",
bool  _deleteSeparateObjects = true,
DataType  type_ = typeId("TriangleMesh") 
)
slot

mergeObjects merges multiple OpenFlipper Objects of Type TriMesh or PolyMesh into one combined Mesh.

Parameters
_objectsa vector of OpenFlipper Objects that shall be merged.
_nameThe name of the merged object (default is "merged object")
_deleteSeparateObjectsflag to determine if the separate objects shall be deleted after merging (default is true)
Returns

Definition at line 214 of file MergePlugin.cc.

◆ mergeObjects [3/3]

int MergePlugin::mergeObjects ( IdList  _objects,
QString  _name = "merged object",
bool  _deleteSeparateObjects = true,
DataType  type_ = typeId("TriangleMesh") 
)
slot

mergeObjects

Parameters
_objects
_name
_deleteSeparateObjects
type_
Returns

Definition at line 202 of file MergePlugin.cc.

◆ name()

QString MergePlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 94 of file MergePlugin.hh.

◆ noguiSupported

void MergePlugin::noguiSupported ( )
inlineprivateslot

Definition at line 108 of file MergePlugin.hh.

◆ pluginsInitialized

void MergePlugin::pluginsInitialized ( )
slot

Definition at line 190 of file MergePlugin.cc.

◆ slotCleanup

void MergePlugin::slotCleanup ( DataType  _type,
bool  _deleteSeparateObjects 
)
slot

slotCleanup is called when the cleanup event is processed at the end of mergeObjects.

Parameters
_typethe datatype that was used for merging
_deleteSeparateObjectsflag to determine if separated objects shall be deleted.

Member functions

Definition at line 94 of file MergePlugin.cc.

◆ version

QString MergePlugin::version ( )
inlineslot

Definition at line 153 of file MergePlugin.hh.

Member Data Documentation

◆ convertedIds

std::vector<int> MergePlugin::convertedIds
private

Definition at line 100 of file MergePlugin.hh.

◆ objects

std::vector< BaseObjectData* > MergePlugin::objects
private

Definition at line 101 of file MergePlugin.hh.

◆ polyMergeID

int MergePlugin::polyMergeID
private

Definition at line 102 of file MergePlugin.hh.

◆ tool_

MergeToolBox* MergePlugin::tool_
private

Definition at line 98 of file MergePlugin.hh.

◆ toolIcon_

QIcon* MergePlugin::toolIcon_
private

Definition at line 99 of file MergePlugin.hh.

◆ triMergeID

int MergePlugin::triMergeID
private

Definition at line 102 of file MergePlugin.hh.


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