Developer Documentation
TextureControlPlugin Class Reference
Inheritance diagram for TextureControlPlugin:
ContextMenuInterface LoadSaveInterface LoggingInterface MenuInterface TextureInterface BackupInterface BaseInterface

Public Slots

QString version ()
 

Signals

void updateView ()
 
void updatedObject (int _identifier, const UpdateType &_type)
 
void updateTexture (QString, int)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void addMenubarAction (QAction *_action, QString _type)
 
void addContextMenuItem (QAction *_action, DataType _objectType, ContextMenuType _type)
 
- Signals inherited from BaseInterface
virtual void updateView ()
 Update current view in Main Application. More...
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot. More...
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer. More...
 
- Signals inherited from BackupInterface
virtual void createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
 Tell Backup Plugin to create a backup. More...
 
virtual void aboutToRestore (int _objectid)
 Backup Plugin tells other Plugins that a restore will happen. More...
 
virtual void generateBackup (int _id, QString _name, UpdateType _type)
 This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup. More...
 
- Signals inherited from TextureInterface
virtual void addTexture (QString _name, QString _filename, uint _dimension, int _id)
 Emit this Signal if a texture has been added (Property Name,filename,Dimension) More...
 
- Signals inherited from MenuInterface
virtual void getMenubarMenu (QString _name, QMenu *&_menu, bool _create)
 Get a existing top level menu pointer or create a new one. More...
 
- 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. More...
 
virtual void load (QString _filename, DataType _type, int &_id)
 Load object from file with a specific DataType. More...
 
- Signals inherited from ContextMenuInterface
virtual void addContextMenuItem (QAction *_action, ContextMenuType _type)
 Add an entry for a context Menu. More...
 

Public Member Functions

 TextureControlPlugin ()
 Constructor.
 
 ~TextureControlPlugin ()
 Destructor.
 
QString name ()
 Return a name for the plugin. More...
 
QString description ()
 Return a description of what the plugin is doing. More...
 

Private Slots

void pluginsInitialized ()
 
void slotObjectUpdated (int _identifier, const UpdateType &_type)
 
void slotDrawModeChanged (int _viewerId)
 
void slotUpdateAllTextures ()
 
void slotTextureAdded (QString _textureName, QString _filename, uint _dimension, int _id)
 
void slotTextureAdded (QString _textureName, QString _filename, uint _dimension)
 
void slotMultiTextureAdded (QString _textureGroup, QString _name, QString _filename, int _id, int &_textureId)
 
void slotTextureUpdated (QString _textureName, int _identifier)
 
void slotSetTextureMode (QString _textureName, QString _mode, int _id)
 
void slotSetTextureMode (QString _textureName, QString _mode)
 
void slotSwitchTexture (QString _textureName, int _id)
 
void slotSwitchTexture (QString _textureName)
 
void slotUpdateTexture (QString _textureName, int _identifier)
 
void slotTextureChangeImage (QString _textureName, QImage &_image, int _id)
 
void slotTextureChangeImage (QString _textureName, QImage &_image)
 
void slotTextureGetImage (QString _textureName, QImage &_image, int _id)
 
void slotTextureGetImage (QString _textureName, QImage &_image)
 
void slotTextureIndex (QString _textureName, int _id, int &_index)
 
void slotTextureIndexPropertyName (int _id, QString &_propertyName)
 
void slotTextureName (int _id, int _textureIndex, QString &_textureName)
 
void slotTextureFilename (int _id, QString _textureName, QString &_textureFilename)
 
void slotGetCurrentTexture (int _id, QString &_textureName)
 
void slotGetSubTextures (int _id, QString _multiTextureName, QStringList &_subTextures)
 
void fileOpened (int _id)
 
void addedEmptyObject (int _id)
 
void slotAboutToRestore (int _objectid)
 
void slotRestored (int _objectid)
 
void doSwitchTexture (QString _textureName, int _id)
 
void slotTextureMenu (QAction *_action)
 Called when an action in the TextureMenu is triggered.
 
void slotSetTextureProperties ()
 Slot for showing the TextureProperties Dialog.
 
void applyDialogSettings (TextureData *_texData, QString _textureName, int _id)
 
void getCoordinates1D (QString _textureName, int _id, std::vector< double > &_x)
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 

Private Member Functions

bool StringToBool (QString _value)
 
void switchDrawMode (TextureType _type, int _id)
 Checks for a correct drawmode and changes if necessary.
 
template<typename MeshT >
void doUpdateTexture (Texture &_texture, MeshT &_mesh)
 Calls the correct copyTexture() function to copy the texture property into the displayed OM property.
 
template<typename MeshT >
void getOriginalHistogram (std::vector< double > &_x, std::vector< double > &_y, int _textureid, MeshT &_mesh, OpenMesh::VPropHandleT< double > _texProp)
 
template<typename MeshT >
void handleFileOpenTextures (MeshT *&_mesh, int _objectId)
 Handles data stored in new opened files ( e.g. Texture Information )
 
bool parseMode (QString _mode, Texture &_texture)
 parse texture mode settings Parses the string _mode and changes the settings in _texture according to the string. If the setting changes, it will return true.
 
1D Texture copy functions( copy 1D input textures to target texture coordinates and transform values )
template<typename MeshT >
void copyTexture (Texture &_texture, MeshT &_mesh, OpenMesh::VPropHandleT< double > _texProp)
 Copy the supplied 1D vertex property to both coordinates of the 2D vertex OM texture property.
 
template<typename MeshT >
void copyTexture (Texture &_texture, MeshT &_mesh, OpenMesh::HPropHandleT< double > _texProp)
 Copy the supplied 1D halfedge property to both coordinates of the 2D halfedge OM texture property.
 
2D Texture copy functions( copy 2D input textures to target texture coordinates and transform values )
template<typename MeshT >
void copyTexture (Texture &_texture, MeshT &_mesh, OpenMesh::VPropHandleT< ACG::Vec2d > _texProp)
 Copy the supplied 2D vertex property to the 2D vertex OM property.
 
template<typename MeshT >
void copyTexture (Texture &_texture, MeshT &_mesh, OpenMesh::HPropHandleT< ACG::Vec2d > _texProp)
 Copy the supplied 2D halfedge property to the 2D halfedge OM property.
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor.
 
virtual void blockScenegraphUpdates (bool _block)
 Tell the core to prevent scenegraph updates. More...
 
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin. More...
 
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin. More...
 
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden. More...
 
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer. More...
 
- Private Member Functions inherited from BackupInterface
virtual void createBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
 Tell Backup Plugin to create a group backup. More...
 
virtual void undo (int _objectid)
 Tell Backup Plugin to undo the last action of an object. More...
 
virtual void redo (int _objectid)
 Tell Backup Plugin to redo the last action on an object. More...
 
virtual void undo ()
 Tell Backup Plugin to undo the last action. More...
 
virtual void redo ()
 Tell Backup Plugin to redo the last action. More...
 
virtual ~BackupInterface ()
 Destructor.
 
virtual void restored (int _objectid)
 Backup Plugin tells other Plugins that a restore has happened. More...
 
- Private Member Functions inherited from TextureInterface
virtual void addTexture (QString _name, QString _filename, uint _dimension)
 Emit this Signal if a texture has been added (Property Name,filename,Dimension) More...
 
virtual void addMultiTexture (QString _textureGroup, QString _name, QString _filename, int _id, int &_textureId)
 Emit this Signal if you want to add a texture for a multitexturing mode. More...
 
virtual void updateTexture (QString _textureName, int _identifier)
 Tell Plugins to update the given texture for the given identifier This signal can be called from any thread.
.
 
virtual void updateAllTextures ()
 Tell Plugins to update all textures.
 
virtual void updatedTextures (QString, int)
 emit this signal if you updated a texture More...
 
virtual void switchTexture (QString _textureName, int _id)
 emit this signal if you want to switch the texture of a specific object This signal can be called from any thread.

 
virtual void switchTexture (QString _textureName)
 emit this signal if you want to switch the global texture This signal can be called from any thread.

 
virtual void setTextureMode (QString _textureName, QString _mode)
 emit this signal if you want to set a special mode for this texture (Clamping,...) More...
 
virtual void setTextureMode (QString _textureName, QString _mode, int _id)
 emit this signal if you want to set a special mode for this texture (Clamping,...) More...
 
virtual void textureChangeImage (QString _textureName, QImage &_image, int _id)
 Change the texture image of a given texture. More...
 
virtual void textureChangeImage (QString _textureName, QImage &_image)
 Change the texture image of a given global texture. More...
 
virtual void textureGetImage (QString _textureName, QImage &_image, int _id)
 get the texture image of a given texture More...
 
virtual void textureGetImage (QString _textureName, QImage &_image)
 Get the texture image of a given global texture. More...
 
virtual void textureIndex (QString _textureName, int _id, int &_index)
 Get the texture index of a given texture. More...
 
virtual void textureIndexPropertyName (int _id, QString &_propertyName)
 Get the name of the texture index property. More...
 
virtual void textureName (int _id, int _textureIndex, QString &_textureName)
 get the name of the texture with given texture index More...
 
virtual void textureFilename (int _id, QString _textureName, QString &_textureFilename)
 get the filename of the texture with given texture index More...
 
virtual void getCurrentTexture (int _id, QString &_textureName)
 get the name of the texture which is currently enabled More...
 
virtual void getSubTextures (int _id, QString _multiTextureName, QStringList &_subTextures)
 get the names of all sub-textures under the given multiTexture More...
 
virtual ~TextureInterface ()
 Destructor.
 
- Private Member Functions inherited from MenuInterface
virtual ~MenuInterface ()
 Destructor.
 
virtual void addMenubarAction (QAction *_action, QString _name)
 Adds an action to the menubar. More...
 
virtual void addMenubarActions (std::vector< QAction * > &_actions, QString _name)
 Add multiple actions to the menu bar. More...
 
- 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. More...
 
virtual void deleteObject (int _id)
 Delete an object
This signal can be called from any thread.
. More...
 
virtual void deleteAllObjects ()
 Delete all Objects. More...
 
virtual void getAllFileFilters (QStringList &_filters)
 Get all file filters that are registered. More...
 
- Private Member Functions inherited from ContextMenuInterface
virtual ~ContextMenuInterface ()
 Destructor.
 
virtual void addContextMenuItem (QAction *_action, DataType _objectType, ContextMenuType _type)
 Add an entry for a context Menu. More...
 
virtual void hideContextMenu ()
 hide the main context menu
 

Private Attributes

TextureData globalTextures_
 
texturePropertiesWidgetsettingsDialog_
 
Global texture menu
QMenu * textureMenu_
 
QActionGroup * actionGroup_
 
std::vector< QAction * > textureActions_
 

Context Menu

QMenu * contextMenu_
 Stores the per object context menu.
 
void slotUpdateContextMenu (int _objectId)
 Slot from the context menu interface. More...
 
void slotTextureContextMenu (QAction *_action)
 Called when the context menu has been triggered. More...
 

Detailed Description

Definition at line 87 of file TextureControl.hh.

Member Function Documentation

QString TextureControlPlugin::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 178 of file TextureControl.hh.

QString TextureControlPlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 177 of file TextureControl.hh.

void TextureControlPlugin::slotTextureContextMenu ( QAction *  _action)
privateslot

Called when the context menu has been triggered.

This slot is called when the per object context menu is triggered. It will switch to the requested texture and mode.

Definition at line 1863 of file TextureControl.cc.

void TextureControlPlugin::slotUpdateContextMenu ( int  _objectId)
privateslot

Slot from the context menu interface.

This slot is called, when the core requests a context menu and creates and updates the context menu.

Definition at line 1789 of file TextureControl.cc.


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