57 #ifndef SPLATCLOUDOBJECTSELECTIONPLUGIN_HH
58 #define SPLATCLOUDOBJECTSELECTIONPLUGIN_HH
71 #include <OpenFlipper/BasePlugin/INIInterface.hh>
77 #include <OpenFlipper/INIFile/INIFile.hh>
97 #if QT_VERSION >= 0x050000
98 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-SelectionSplatCloudObject")
111 void updatedObject(
int _objectId,
const UpdateType& _type );
112 void nodeVisibilityChanged(
int _objectId );
113 void setSlotDescription( QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions );
119 void log( QString _message );
120 void log(
Logtype _type, QString _message );
123 void addSelectionEnvironment( QString _modeName, QString _description, QString _icon, QString &_handleName );
124 void registerType( QString _handleName,
DataType _type );
125 void addPrimitiveType( QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType &_typeHandle );
126 void addSelectionOperations( QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type = 0u );
128 void showToggleSelectionMode ( QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes );
129 void showSphereSelectionMode ( QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes );
130 void showLassoSelectionMode ( QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes );
131 void showVolumeLassoSelectionMode( QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes );
133 void getActiveDataTypes( SelectionInterface::TypeList &_types );
134 void getActivePrimitiveType( SelectionInterface::PrimitiveType &_type );
135 void targetObjectsOnly(
bool &_targetsOnly );
137 void registerKeyShortcut(
int _key, Qt::KeyboardModifiers _modifiers = Qt::NoModifier );
140 void deleteObject(
int _objectId );
143 void scriptInfo( QString _functionName );
148 void loadSelection(
int _objectId,
const QString &_filename );
153 void loadIniFile(
INIFile &_ini,
int _objectId );
154 void saveIniFile(
INIFile &_ini,
int _objectId );
157 void initializePlugin();
158 void pluginsInitialized();
159 void noguiSupported() { };
164 void slotToggleSelection ( QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType,
bool _deselect );
165 void slotSphereSelection ( QMouseEvent *_event,
double _radius, SelectionInterface::PrimitiveType _currentType,
bool _deselect );
166 void slotLassoSelection ( QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType,
bool _deselect );
167 void slotVolumeLassoSelection( QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType,
bool _deselect );
177 QString
name() {
return QString( tr(
"SplatCloud Object Selection" ) ); }
178 QString
description() {
return QString( tr(
"Allows to select parts of SplatCloud Objects") ); }
204 QString version() {
return QString(
"1.0" ); }
207 bool vertexTypeActive()
209 SelectionInterface::PrimitiveType t;
210 emit getActivePrimitiveType( t );
235 void lassoSelect( QRegion &_region, PrimitiveType _primitiveType,
bool _deselection );
281 deselection_( _deselection )
301 #endif // SPLATCLOUDOBJECTSELECTIONPLUGIN_HH
void colorizeVertexSelection(int _objectId, int _r, int _g, int _b, int _a)
Colorize the vertex selection.
void slotToggleSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a toggle selection.
QString name()
Return a name for the plugin.
void splatCloudToggleSelection(SplatCloud *_splatCloud, uint _index, ACG::Vec3d &_hit_point, PrimitiveType _primitiveType)
Toggle SplatCloud selection.
void slotLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a lasso selection.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
void clearVertexSelection(int _objectId)
Unselect all vertices.
SelectionInterface::PrimitiveType vertexType_
Primitive type handle.
QPolygon lasso_2Dpoints_
Used for lasso selection tool.
QString environmentHandle_
Handle to selection environment.
void deleteVertexSelection(int _objectId)
Delete vertices that are currently selected.
Interface for all plugins which want to Load or Save files and create Objects.
Traverse the scenegraph and call the selection function for all mesh nodes.
Interface for all Plugins which provide scriptable Functions.
SplatCloudObjectSelectionPlugin()
Default constructor.
Class for the handling of simple configuration files.
void updateSlotDescriptions()
Set descriptions for local public slots.
void splatCloudSphereSelection(SplatCloud *_splatCloud, uint _index, ACG::Vec3d &_hit_point, double _radius, PrimitiveType _primitiveTypes, bool _deselection)
Use the event to paint selection with a sphere.
Interface class for backup handling.
void setColorForSelection(const int _objectId, const PrimitiveType _primitiveType)
Set color for selection.
Interface for all Plugins which do logging to the logging window of the framework.
Interface for all plugins which want to use selection functions.
void slotVolumeLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a volume lasso selection.
QVector< QPoint > volumeLassoPoints_
Used for volume lasso tool.
void slotLoadSelection(const INIFile &_file)
Load selection for specific objects in the scene.
bool splatCloudVolumeSelection(SplatCloud *_splatCloud, ACG::GLState &_state, QRegion *_region, PrimitiveType _primitiveTypes, bool _deselection)
Surface volume selection tool.
Keyboard Event Interface.
void selectAllVertices(int _objectId)
Select all vertices.
IdList getVertexSelection(int _objectId)
Return a list of all selected vertices.
Interface class from which all plugins have to be created.
void splatCloudColorizeSelection(SplatCloud *_splatCloud, PrimitiveType _primitiveTypes, int _r, int _g, int _b, int _a)
Colorize the selection.
Logtype
Log types for Message Window.
void invertVertexSelection(int _objectId)
Invert the current vertex selection.
void slotKeyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers)
One of the previously registered keys has been pressed.
void slotSphereSelection(QMouseEvent *_event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a sphere selection.
void lassoSelect(QRegion &_region, PrimitiveType _primitiveType, bool _deselection)
Lasso selection tool.
SelectionInterface::PrimitiveType allSupportedTypes_
Primitive type handle.
void selectVertices(int _objectId, IdList _vertexList)
Select given vertices.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
QString description()
Return a description of what the plugin is doing.
bool splatCloudDeleteSelection(SplatCloud *_splatCloud, PrimitiveType _primitiveType)
Delete all selected elements of a SplatCloud.
bool operator()(BaseNode *_node)
Traverse the scenegraph and call the selection function for all mesh nodes.
void slotSelectionOperation(QString _operation)
A specific operation is requested.
Interface class for Plugins which have to store information in ini files.
void slotSaveSelection(INIFile &_file)
Save selection for all objects in the scene.
void unselectVertices(int _objectId, IdList _vertexList)
Unselect given vertices.