Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ViewControlPlugin Class Reference
Inheritance diagram for ViewControlPlugin:
BaseInterface PickingInterface LoggingInterface ToolbarInterface ContextMenuInterface

Public Slots

bool selectionVisible (int _id)
 For meshes returns if the selection for this object is visible.
 
void showSelection (int _id, bool _state)
 Allows to enable/disable visualization of the objects selection for meshes.
 
bool modelingAreasVisible (int _id)
 For meshes returns if the modeling areas for this object is visible.
 
void showModelingAreas (int _id, bool _state)
 Allows to enable/disable visualization of the objects modeling area for meshes.
 
void disableShader (int _objectId, ACG::SceneGraph::DrawModes::DrawMode _drawMode, ShaderInfo *_shader=0)
 
void setShader (int _id, ACG::SceneGraph::DrawModes::DrawMode _drawMode, ShaderInfo _shader)
 
void setShader (int _id, QString _drawMode, QString _name)
 
QStringList getUniforms (QString _shader)
 get information about available uniforms for a given shader
 
QString getUniformType (QString _shader, QString _uniform)
 
QString getUniformDefault (QString _shader, QString _uniform)
 
QString getUniformMin (QString _shader, QString _uniform)
 
QString getUniformMax (QString _shader, QString _uniform)
 
void setUniform (int _objID, ACG::SceneGraph::DrawModes::DrawMode _drawMode, QString _shader, QString _uniform, QString _value)
 set the value of a uniform in a shader for a specific drawMode
 
void setViewingDirection (Vector _direction, Vector _upvector, int _viewer=PluginFunctions::ALL_VIEWERS)
 Set the viewing direction.
 
void setSceneRadius (double _radius, int _viewer=PluginFunctions::ALL_VIEWERS)
 Set scene radius.
 
void rotate (Vector _axis, double _angle, Vector _center, int _viewer=PluginFunctions::ALL_VIEWERS)
 Rotate Scene.
 
void translate (Vector _vec, int _viewer=PluginFunctions::ALL_VIEWERS)
 translate Scene
 
void setDrawMode (QString _mode, int _viewer=PluginFunctions::ALL_VIEWERS)
 Set the draw mode for a viewer.
 
void setObjectDrawMode (QString _mode, int _objectID, bool _force=true)
 Set the draw mode for an object. More...
 
Vector viewingDirection (int _viewer=PluginFunctions::ACTIVE_VIEWER)
 Get a viewers viewing direction.
 
Vector upVector (int _viewer=PluginFunctions::ACTIVE_VIEWER)
 get a viewers up vector
 
Vector eyePosition (int _viewer=PluginFunctions::ACTIVE_VIEWER)
 get a viewers eye Position
 
Vector sceneCenter (int _viewer=PluginFunctions::ACTIVE_VIEWER)
 Get the scene center.
 
void setSceneCenter (Vector _center, int _viewer=PluginFunctions::ALL_VIEWERS)
 Set the scene center.
 
void enableBackfaceCulling (bool _state, int _viewer=PluginFunctions::ALL_VIEWERS)
 Enable or disable Backface culling.
 
void setEyePosition (Vector _eye)
 
void viewAll ()
 Change View on all viewers to view whole scene.
 
void viewAll (int _viewer)
 Change View on given Viewer to view whole scene.
 
void viewHome ()
 Change View on given Viewer to view home position.
 
void viewHome (int _viewer)
 Change View on all Viewers to view home position.
 
void orthographicProjection ()
 Change Viewer to orthographicProjection.
 
void orthographicProjection (int _viewer)
 Change all Viewers to orthographicProjection.
 
void perspectiveProjection ()
 Change Viewer to perspectiveProjection.
 
void perspectiveProjection (int _viewer)
 Change all Viewers to perspectiveProjection.
 
void setFOVY (double _fovy)
 Set fovy angle of projection.
 
void setCoordsysProjection (bool _orthogonal)
 
void setTwoSidedLighting (bool _enabled)
 

Signals

void updateView ()
 
void addHiddenPickMode (const std::string &_mode)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void addToolbar (QToolBar *_toolbar)
 
void getToolBar (QString _name, QToolBar *&_toolbar)
 
void addContextMenuItem (QAction *_action, ContextMenuType _type)
 
void addContextMenuItem (QAction *_action, DataType _objectType, ContextMenuType _type)
 
void hideContextMenu ()
 
void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 
- 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 PickingInterface
virtual void addPickMode (const std::string &_mode)
 Add a new picking mode to the examiner. More...
 
- Signals inherited from LoggingInterface
virtual void log (Logtype _type, QString _message)=0
 
virtual void log (QString _message)=0
 
- Signals inherited from ToolbarInterface
virtual void addToolbar (QToolBar *_toolbar)
 Adds a Toolbar to the main widget. More...
 
- Signals inherited from ContextMenuInterface
virtual void addContextMenuItem (QAction *_action, ContextMenuType _type)
 Add an entry for a context Menu. More...
 

Public Member Functions

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 contextMenuTriggered (QAction *_action)
 
void slotUpdateContextMenu (int _objectId)
 
QString version ()
 

Private Member Functions

void slotDrawModeSelected (QAction *_action)
 
void slotShaderClicked (QListWidgetItem *_item)
 
void slotShaderDoubleClicked (QListWidgetItem *_item)
 
void slotSetShader ()
 
void itemChanged (QTableWidgetItem *item)
 
void setView (int _mode, int _viewer=PluginFunctions::ACTIVE_VIEWER)
 
void setView (QAction *_action)
 
void updateShaderList ()
 
void initShaderWidget ()
 
void setDescriptions ()
 
bool areasVisible (StatusBits _bits, int _id)
 Return of all of the given modeling areas are visible. More...
 
void showAreas (StatusBits _bits, int _id, bool _state)
 Show or hide modeling areas. More...
 
- 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 PickingInterface
virtual void addHiddenPickMode (const std::string &_mode)
 Add a new picking mode to the examiner which will be invisible. More...
 
virtual void setPickModeCursor (const std::string &_mode, QCursor _cursor)
 Set the cursor of the given PickMode. More...
 
virtual void setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking)
 Set mouse tracking for the given PickMode. More...
 
virtual void setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar)
 Set the additional toolbar of the given PickMode. More...
 
virtual void removePickModeToolbar (const std::string &_mode)
 Removes the additional toolbar of the given PickMode. More...
 
virtual ~PickingInterface ()
 Destructor.
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor.
 
- Private Member Functions inherited from ToolbarInterface
virtual ~ToolbarInterface ()
 Destructor.
 
virtual void removeToolbar (QToolBar *_toolbar)
 Remove a Toolbar from the main widget. More...
 
virtual void getToolBar (QString _name, QToolBar *&_toolbar)
 Get a pointer to a Toolbar of the given name or 0 if it does not exist. 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

QMenu * viewControlMenu_
 
int lastObjectId_
 
ACG::SceneGraph::DrawModes::DrawMode activeDrawModes_
 
ACG::SceneGraph::DrawModes::DrawMode availDrawModes_
 
ShaderWidgetshaderWidget_
 
std::vector< ShaderInfoshaderList_
 
QToolBar * toolbar_
 
QActionGroup * toolbarViewingDirections_
 
QAction * viewTop_
 
QAction * viewBottom_
 
QAction * viewLeft_
 
QAction * viewRight_
 
QAction * viewFront_
 
QAction * viewBack_
 
std::map< QCheckBox
*, ACG::SceneGraph::DrawModes::DrawMode
activeCheckboxes
 

Detailed Description

Definition at line 90 of file ViewControlPlugin.hh.

Member Function Documentation

bool ViewControlPlugin::areasVisible ( StatusBits  _bits,
int  _id 
)
private

Return of all of the given modeling areas are visible.

Parameters
_bitsWhich areas to test
_idId of the object
Returns
All areas visible?

Definition at line 426 of file ViewControlPlugin.cc.

QString ViewControlPlugin::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 141 of file ViewControlPlugin.hh.

void ViewControlPlugin::disableShader ( int  _objectId,
ACG::SceneGraph::DrawModes::DrawMode  _drawMode,
ShaderInfo _shader = 0 
)
slot

Disable the given shader for a given object and draw mode.

Parameters
_objectIdID of the object for which to disable the shader
_drawMode_drawMode for which the shader is disabled
_shaderShader which is disabled. If this shader is not currently active for the given _drawMode, nothing will be disabled. In order to disable all shaders for the given _drawMode, use _shader=0 (default).

Definition at line 983 of file ViewControlPlugin.cc.

QString ViewControlPlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 140 of file ViewControlPlugin.hh.

void ViewControlPlugin::setCoordsysProjection ( bool  _orthogonal)
slot

Set the mode for the coordinate system Perspective or orthogonal

Definition at line 1423 of file ViewControlPlugin.cc.

void ViewControlPlugin::setObjectDrawMode ( QString  _mode,
int  _objectID,
bool  _force = true 
)
slot

Set the draw mode for an object.

This function can be used to set the drawmode for an object.

Parameters
_modeDrawMode as String ( can be a list of drawmodes which will be combined to a new mode )
_objectIDId of the object to set the draw mode
_forceSet the draw mode even if its not directly supported by the objects nodes

Definition at line 1287 of file ViewControlPlugin.cc.

void ViewControlPlugin::setShader ( int  _id,
ACG::SceneGraph::DrawModes::DrawMode  _drawMode,
ShaderInfo  _shader 
)
slot

Sets a shader for the object and the given drawMode( can be a combination of draw modes )

Parameters
_idObject Id
_drawMode; separated list of drawmodes used by the shader
_shaderShader information

Definition at line 1007 of file ViewControlPlugin.cc.

void ViewControlPlugin::setShader ( int  _id,
QString  _drawMode,
QString  _name 
)
slot

Sets a Shader for a specific draw mode

Parameters
_idObject id that should use the shader
_drawModeDraw mode where this shader will be active
_nameName of the shader that should be used

Definition at line 1088 of file ViewControlPlugin.cc.

void ViewControlPlugin::showAreas ( StatusBits  _bits,
int  _id,
bool  _state 
)
private

Show or hide modeling areas.

Parameters
_bitsWhich areas to test
_idId of the object
_stateShow or hide?

Definition at line 456 of file ViewControlPlugin.cc.

Member Data Documentation

ACG::SceneGraph::DrawModes::DrawMode ViewControlPlugin::activeDrawModes_
private

Active draw Modes for the last clicked object and its children

Definition at line 153 of file ViewControlPlugin.hh.

ACG::SceneGraph::DrawModes::DrawMode ViewControlPlugin::availDrawModes_
private

Available draw Modes for the last clicked object and its children

Definition at line 157 of file ViewControlPlugin.hh.

int ViewControlPlugin::lastObjectId_
private

Last object id for context menu. Is -1 if no object was selected

Definition at line 149 of file ViewControlPlugin.hh.

std::vector<ShaderInfo> ViewControlPlugin::shaderList_
private

List of available shaders

Definition at line 163 of file ViewControlPlugin.hh.


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