43 #ifndef MESHOBJECTSELECTIONPLUGIN_HH
44 #define MESHOBJECTSELECTIONPLUGIN_HH
55 #include <OpenFlipper/BasePlugin/INIInterface.hh>
61 #include <OpenFlipper/INIFile/INIFile.hh>
66 #include "ConversionDialog.hh"
95 void nodeVisibilityChanged(
int _identifier);
96 void setSlotDescription(QString _slotName, QString _slotDescription,
97 QStringList _parameters, QStringList _descriptions);
103 void log(
Logtype _type, QString _message);
104 void log(QString _message);
107 void addSelectionEnvironment(QString _modeName, QString _description, QIcon _icon, QString& _handleName);
108 void registerType(QString _handleName,
DataType _type);
109 void addPrimitiveType(QString _handleName, QString _name, QIcon _icon, SelectionInterface::PrimitiveType& _typeHandle);
110 void addSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type = 0u);
112 void showToggleSelectionMode(QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes);
114 void showLassoSelectionMode(QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes);
115 void showVolumeLassoSelectionMode(QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes);
116 void showSphereSelectionMode(QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes);
117 void showClosestBoundarySelectionMode(QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes);
118 void showFloodFillSelectionMode(QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes);
119 void showComponentsSelectionMode(QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes);
121 void getActiveDataTypes(SelectionInterface::TypeList& _types);
122 void getActivePrimitiveType(SelectionInterface::PrimitiveType& _type);
123 void targetObjectsOnly(
bool& _targetsOnly);
125 void registerKeyShortcut(
int _key, Qt::KeyboardModifiers _modifiers = Qt::NoModifier);
128 void deleteObject(
int _objectId);
129 void addEmptyObject(
DataType _type,
int& _id);
132 void scriptInfo(QString _functionName);
137 void loadSelection(
int _objId,
const QString& _filename);
142 void loadIniFile(
INIFile& _ini,
int _id);
143 void saveIniFile(
INIFile& _ini,
int _id);
146 void initializePlugin();
147 void pluginsInitialized();
148 void noguiSupported() {};
151 void slotSelectionOperation(QString _operation);
152 void slotToggleSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType,
bool _deselect);
154 void slotLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType,
bool _deselect);
155 void slotVolumeLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType,
bool _deselect);
156 void slotSphereSelection(QMouseEvent* _event,
double _radius, SelectionInterface::PrimitiveType _currentType,
bool _deselect);
157 void slotClosestBoundarySelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType,
bool _deselect);
158 void slotFloodFillSelection(QMouseEvent* _event,
double _maxAngle, SelectionInterface::PrimitiveType _currentType,
bool _deselect);
159 void slotComponentsSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType,
bool _deselect);
161 void slotLoadSelection(
const INIFile& _file);
162 void slotSaveSelection(
INIFile& _file);
164 void slotKeyShortcutEvent(
int _key, Qt::KeyboardModifiers _modifiers);
170 return (QString(tr(
"Mesh Object Selection")));
173 QString description() {
174 return (QString(tr(
"Allows to select parts of Mesh Objects")));
205 return QString(
"1.0");
209 bool vertexTypeActive() {
210 SelectionInterface::PrimitiveType t = 0u;
211 emit getActivePrimitiveType(t);
216 bool edgeTypeActive() {
217 SelectionInterface::PrimitiveType t = 0u;
218 emit getActivePrimitiveType(t);
223 bool faceTypeActive() {
224 SelectionInterface::PrimitiveType t = 0u;
225 emit getActivePrimitiveType(t);
437 void lassoSelect(QRegion& _region, PrimitiveType _primitiveType,
bool _deselection);
449 template<
typename MeshT>
453 template<
typename MeshT>
457 template<
typename MeshT>
461 template<
typename MeshT>
463 double _radius, PrimitiveType _primitiveTypes,
bool _deselection);
466 template<
class MeshT>
468 PrimitiveType _primitiveTypes,
bool _deselection);
471 template<
class MeshT>
475 template<
class MeshT>
477 PrimitiveType _primitiveTypes,
bool _deselection);
480 template<
typename MeshT>
484 template<
class MeshT>
485 void colorizeSelection(MeshT* _mesh, PrimitiveType _primitiveTypes,
int _red,
int _green,
int _blue,
int _alpha);
488 template<
class MeshT >
492 template<
class MeshT >
544 unsigned int _type,
bool _deselection,
ACG::GLState& _state) :
545 state_(_state), region_(_region), plugin_(_plugin), type_(_type), deselection_(_deselection) {};
561 #if defined(INCLUDE_TEMPLATES) && !defined(MESHOBJECTSELECTIONPLUGINT_CC)
562 #define MESHOBJECTSELECTIONPLUGINT_TEMPLATES
563 #include "MeshObjectSelectionPluginT.cc"
567 #endif // MESHOBJECTSELECTIONPLUGIN_HH defined